|
PageMixer API - 3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jp.ne.dti.lares.foozy.pagemixer.servlet.ReqHeaderKey
Key to identify value in "Servlet request header" storage class.
Field Summary | |
static int |
DATE
Type ID to find Long object out. |
static ReqHeaderKey |
HOST
Key to get value from "Host" request header. |
static int |
INT
Type ID to find Integer object out. |
static int |
STRING
Type ID to find String object out. |
Constructor Summary | |
ReqHeaderKey(java.lang.String name)
Construct key named as specified name. |
|
ReqHeaderKey(java.lang.String name,
boolean single)
Construct key named as specified name. |
|
ReqHeaderKey(java.lang.String name,
int type)
Constructor. |
Method Summary | |
boolean |
equals(java.lang.Object object)
|
java.lang.Integer |
getInteger(ConsumerContext context)
Utility to look data object up easily. |
java.lang.Long |
getLong(ConsumerContext context)
Utility to look data object up easily. |
java.lang.String |
getString(ConsumerContext context)
Utility to look data object up easily. |
java.lang.Object |
getValue(javax.servlet.http.HttpServletRequest request)
Get value from HttpServletRequest . |
java.lang.Object |
getValue(javax.servlet.http.HttpServlet servlet,
javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get value from HttpServletRequest . |
int |
hashCode()
|
void |
setValue(javax.servlet.http.HttpServlet servlet,
javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object value)
This is not supported. |
java.lang.String |
toString()
|
void |
unsetValue(javax.servlet.http.HttpServlet servlet,
javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This is not supported. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final ReqHeaderKey HOST
This finds String
value out in context.
public static final int STRING
String
object out.
This causes invocation of
HttpServletRequest#getHeader(String)
.
public static final int INT
Integer
object out.
This causes invocation of
HttpServletRequest#getIntHeader(String)
.
public static final int DATE
Long
object out.
This causes invocation of
HttpServletRequest#getDateHeader(String)
.
Constructor Detail |
public ReqHeaderKey(java.lang.String name, boolean single)
You can get Enumeratoin
object by this class,
if you specify "true" as single
.
name
- of headersingle
- whether use getHeader()
or
getHeaders()
public ReqHeaderKey(java.lang.String name)
This is equivalent to
ReqHeaderKey(name, STRING)
.
name
- of headerpublic ReqHeaderKey(java.lang.String name, int type)
This constructor allows you to get
data object other than String
.
Type of data object is corresponded to
type
parameter.
type | invocation | data type | comment |
---|---|---|---|
STRING |
getHeader |
String |
|
INT |
getIntHeader |
Integer |
|
DATE |
getDateHeader |
Long |
not java.util.Date !!!! |
name
- of headertype
- of data to be looked upMethod Detail |
public final java.lang.Integer getInteger(ConsumerContext context)
This is equivalent to
(Integer)(context.getValue(key))
,
when instance of this class is referred as key
.
context
- in which data object is looked uppublic final java.lang.Long getLong(ConsumerContext context)
This is equivalent to
(Long)(context.getValue(key))
,
when instance of this class is referred as key
.
context
- in which data object is looked uppublic final java.lang.String getString(ConsumerContext context)
This is equivalent to
(String)(context.getValue(key))
,
when instance of this class is referred as key
.
context
- in which data object is looked uppublic final java.lang.Object getValue(javax.servlet.http.HttpServletRequest request)
HttpServletRequest
.
ServletRequest#getHeader
(as String) is used,
if invocation target is constructed with "single" parameter "true".
Otherwise,
ServletRequest#getHeaders
(as Enumeration of String) is used.
request
- on which consumer context depends.public java.lang.Object getValue(javax.servlet.http.HttpServlet servlet, javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
HttpServletRequest
.
This is equivalent to getValue(request)
getValue
in interface ServletConsumerContext.KeyCommand
servlet
- on which consumer context depends.context
- on which consumer context depends.request
- on which consumer context depends.response
- on which consumer context depends.public void setValue(javax.servlet.http.HttpServlet servlet, javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object value)
setValue
in interface ServletConsumerContext.KeyCommand
servlet
- on which consumer context depends.context
- on which consumer context depends.request
- on which consumer context depends.response
- on which consumer context depends.value
- value to be setUnsupportedOperationException
- alwayspublic void unsetValue(javax.servlet.http.HttpServlet servlet, javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
unsetValue
in interface ServletConsumerContext.KeyCommand
servlet
- on which consumer context depends.context
- on which consumer context depends.request
- on which consumer context depends.response
- on which consumer context depends.UnsupportedOperationException
- alwayspublic boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
PageMixer API - 3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |