org.jboss.soa.esb.actions.routing.http
Class POSTHttpMethodFactory

java.lang.Object
  extended by org.jboss.soa.esb.actions.routing.http.AbstractHttpMethodFactory
      extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.soa.esb.actions.routing.http.HttpMethodFactory
HttpMethodFactory.Factory
 
Field Summary
static java.lang.String CHARSET
           
static java.lang.String CONTENT_TYPE
           
 
Constructor Summary
POSTHttpMethodFactory()
           
 
Method Summary
 org.apache.commons.httpclient.HttpMethodBase getInstance(Message message)
          Given the input message get the PostMethod.
 void setConfiguration(ConfigTree config)
          Set the component configuration.
 
Methods inherited from class org.jboss.soa.esb.actions.routing.http.AbstractHttpMethodFactory
getEndpointPathAndQuery, setEndpoint, wrapRetryHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

POSTHttpMethodFactory

public POSTHttpMethodFactory()
Method Detail

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