|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.soa.esb.listeners.message.AbstractMessageComposer<T>
org.jboss.soa.esb.listeners.gateway.HttpMessageComposer<T>
public class HttpMessageComposer<T extends HttpRequestWrapper>
Http Message Composer.
This class is used to compose the HttpServletRquest to ESB aware message and decompse the ESB aware message to HttpServletResponesThis class will put the http request header and other requst information in ESB message properties with the key "RequestInfoMap".
If the request is the submitted from html form(with the Content-Type: application/x-www-form-urlencoded
), HttpServletRequest.getParameterMap() result)
will be put in ESB message properties. The key for it is "RequestParamterMap". It put the the byte array read from request inputstream in message payload.
In decompose process, the header map in message properties will be added in HttpServletResponse. The value for "ReponseStatus" store in ESB message properties will put in the http response. The message payload byte[] or String object will be wrote to HttpServletResponse. If the object in message payload is not byte[],it will throw exception when the ESB message is decomposed
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jboss.soa.esb.listeners.message.MessageComposer |
---|
MessageComposer.Factory |
Field Summary | |
---|---|
static java.lang.String |
HTTP_REQUEST_INFO_MAP
Deprecated. Request information map key in esb message properties |
static java.lang.String |
HTTP_REQUEST_PARAMETER_MAP
Deprecated. Request parameter map key in esb message properties |
static java.lang.String |
HTTP_RESPONSE_HEADER_MAP
Deprecated. Reponse header map key in esb message properties |
static java.lang.String |
HTTP_RESPONSE_STATUS
Deprecated. Response status key in esb message properties |
Constructor Summary | |
---|---|
HttpMessageComposer()
Deprecated. |
Method Summary | |
---|---|
java.lang.Object |
decompose(Message message,
T requestWrapper)
Deprecated. Decompose the message. |
protected MessagePayloadProxy |
getPayloadProxy()
Deprecated. |
java.util.Map<java.lang.String,java.lang.Object> |
getRequestInfo(javax.servlet.http.HttpServletRequest request)
Deprecated. Method for get request information from a servlet request The result includes the http header and other servlet request information |
protected void |
populateMessage(Message message,
T requestWrapper)
Deprecated. Populate |
void |
setConfiguration(ConfigTree config)
Deprecated. Set the composers configuration. |
Methods inherited from class org.jboss.soa.esb.listeners.message.AbstractMessageComposer |
---|
compose, getConfiguration |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String HTTP_REQUEST_PARAMETER_MAP
public static final java.lang.String HTTP_REQUEST_INFO_MAP
public static final java.lang.String HTTP_RESPONSE_HEADER_MAP
public static final java.lang.String HTTP_RESPONSE_STATUS
Constructor Detail |
---|
public HttpMessageComposer()
Method Detail |
---|
public void setConfiguration(ConfigTree config)
AbstractMessageComposer
setConfiguration
in interface MessageComposer<T extends HttpRequestWrapper>
setConfiguration
in class AbstractMessageComposer<T extends HttpRequestWrapper>
config
- Composer configuration.protected MessagePayloadProxy getPayloadProxy()
getPayloadProxy
in class AbstractMessageComposer<T extends HttpRequestWrapper>
protected void populateMessage(Message message, T requestWrapper) throws MessageDeliverException
AbstractMessageComposer
populateMessage
in class AbstractMessageComposer<T extends HttpRequestWrapper>
message
- The message instance to be populated.requestWrapper
- The message payload to to be populated into the message.
MessageDeliverException
- Unable to populate message with payload.public java.lang.Object decompose(Message message, T requestWrapper) throws MessageDeliverException
AbstractMessageComposer
Message
decomposition strategy.
decompose
in interface MessageComposer<T extends HttpRequestWrapper>
decompose
in class AbstractMessageComposer<T extends HttpRequestWrapper>
message
- The message to be decomposed.requestWrapper
- The original input message payload used to
compose this (or ther original) message. The original message can sometimes contain
information relevant during the decomposition process. Whether or not this parameter
can be null depends on the MessageComposer implementation.
MessageDeliverException
- Failed to decompose message payload.public java.util.Map<java.lang.String,java.lang.Object> getRequestInfo(javax.servlet.http.HttpServletRequest request)
request
- ServletRequest
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |