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

java.lang.Object
  extended by org.jboss.soa.esb.actions.routing.http.POSTHttpMethodFactory
All Implemented Interfaces:
HttpMethodFactory, Configurable

public class POSTHttpMethodFactory
extends java.lang.Object
implements HttpMethodFactory

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.
 void setEndpoint(java.net.URL url)
           
 
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

setEndpoint

public void setEndpoint(java.net.URL url)
Specified by:
setEndpoint in interface HttpMethodFactory

setConfiguration

public void setConfiguration(ConfigTree config)
                      throws ConfigurationException
Description copied from interface: Configurable
Set the component configuration.

Specified by:
setConfiguration in interface Configurable
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.

Specified by:
getInstance in interface HttpMethodFactory
Throws:
java.io.IOException