org.jboss.soa.esb.actions.routing.http
Class POSTHttpMethodFactory
java.lang.Object
org.jboss.soa.esb.actions.routing.http.AbstractHttpMethodFactory
org.jboss.soa.esb.actions.routing.http.POSTHttpMethodFactory
- All Implemented Interfaces:
- HttpMethodFactory, Configurable
public class POSTHttpMethodFactory
- extends AbstractHttpMethodFactory
HTTP POST Factory. Handles messages whose payload is a byte[] by
converting the byte[] to a String; all other payloads are
stringified by calling their toString() method.
CONTENT_TYPE and CHARSET can be overridden in the ConfigTree.
- Author:
- tom.fennelly@jboss.com
Method Summary |
org.apache.commons.httpclient.HttpMethodBase |
getInstance(Message message)
Given the input message get the PostMethod. |
org.apache.commons.httpclient.HttpMethodBase |
getMethod(java.lang.String message,
java.lang.String contentType,
java.lang.String charset)
Given the serialized input message get the PostMethod. |
void |
setConfiguration(ConfigTree config)
Set the component configuration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONTENT_TYPE
public static final java.lang.String CONTENT_TYPE
- See Also:
- Constant Field Values
CHARSET
public static final java.lang.String CHARSET
- See Also:
- Constant Field Values
POSTHttpMethodFactory
public POSTHttpMethodFactory()
setConfiguration
public void setConfiguration(ConfigTree config)
throws ConfigurationException
- Description copied from interface:
Configurable
- Set the component configuration.
- Specified by:
setConfiguration
in interface Configurable
- Overrides:
setConfiguration
in class AbstractHttpMethodFactory
- Parameters:
config
- The conponent configuration.
- Throws:
ConfigurationException
- Bad component configuration.
getInstance
public org.apache.commons.httpclient.HttpMethodBase getInstance(Message message)
throws java.io.IOException
- Given the input message get the PostMethod.
Content-type and charset can be overridden at configuration time.
- Throws:
java.io.IOException
getMethod
public org.apache.commons.httpclient.HttpMethodBase getMethod(java.lang.String message,
java.lang.String contentType,
java.lang.String charset)
throws java.io.IOException
- Given the serialized input message get the PostMethod.
- Parameters:
messsage
- The serialized message.contentType
- The content type for the message.charset
- The charcter encoding for the message.
- Returns:
- The PostMethod wrapping the serialized message.
- Throws:
java.io.IOException