org.mule.transport.http.transformers
Class ObjectToHttpClientMethodRequest

java.lang.Object
  extended by org.mule.transformer.AbstractTransformer
      extended by org.mule.transformer.AbstractMessageTransformer
          extended by org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest
All Implemented Interfaces:
MuleContextAware, MuleContextNotificationListener<MuleContextNotification>, ServerNotificationListener<MuleContextNotification>, Disposable, Initialisable, NamedObject, MessageProcessor, MessageTransformer, Transformer, EndpointAware

public class ObjectToHttpClientMethodRequest
extends AbstractMessageTransformer

ObjectToHttpClientMethodRequest transforms a MuleMessage into a HttpClient HttpMethod that represents an HttpRequest.


Field Summary
 
Fields inherited from class org.mule.transformer.AbstractTransformer
encoding, endpoint, logger, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, sourceTypes
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
ObjectToHttpClientMethodRequest()
           
 
Method Summary
protected  HttpMethod createGetMethod(MuleMessage msg, java.lang.String outputEncoding)
           
protected  MultipartRequestEntity createMultiPart(MuleMessage msg, EntityEnclosingMethod method)
           
protected  HttpMethod createPostMethod(MuleMessage msg, java.lang.String outputEncoding)
           
protected  HttpMethod createPutMethod(MuleMessage msg, java.lang.String outputEncoding)
           
protected  java.lang.String detectHttpMethod(MuleMessage msg)
           
protected  java.net.URI getURI(MuleMessage message)
           
protected  void setHeaders(HttpMethod httpMethod, MuleMessage msg)
           
protected  void setupEntityMethod(java.lang.Object src, java.lang.String encoding, MuleMessage msg, EntityEnclosingMethod postMethod)
           
 java.lang.Object transformMessage(MuleMessage msg, java.lang.String outputEncoding)
          Transform the message
 
Methods inherited from class org.mule.transformer.AbstractMessageTransformer
checkReturnClass, doTransform, isSourceDataTypeSupported, transform, transform, transform
 
Methods inherited from class org.mule.transformer.AbstractTransformer
checkReturnClass, dispose, generateTransformerName, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, initialise, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, onNotification, process, registerSourceType, registerSourceType, setAllowNullReturn, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, unregisterSourceType, unregisterSourceType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.api.transformer.Transformer
getEncoding, getEndpoint, getMimeType, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, setReturnClass, setReturnDataType, transform
 
Methods inherited from interface org.mule.api.processor.MessageProcessor
process
 
Methods inherited from interface org.mule.api.lifecycle.Initialisable
initialise
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 
Methods inherited from interface org.mule.api.NamedObject
getName, setName
 
Methods inherited from interface org.mule.api.context.MuleContextAware
setMuleContext
 
Methods inherited from interface org.mule.endpoint.EndpointAware
setEndpoint
 

Constructor Detail

ObjectToHttpClientMethodRequest

public ObjectToHttpClientMethodRequest()
Method Detail

transformMessage

public java.lang.Object transformMessage(MuleMessage msg,
                                         java.lang.String outputEncoding)
                                  throws TransformerException
Description copied from class: AbstractMessageTransformer
Transform the message

Specified by:
transformMessage in class AbstractMessageTransformer
Returns:
Throws:
TransformerException

detectHttpMethod

protected java.lang.String detectHttpMethod(MuleMessage msg)

createGetMethod

protected HttpMethod createGetMethod(MuleMessage msg,
                                     java.lang.String outputEncoding)
                              throws java.lang.Exception
Throws:
java.lang.Exception

createPostMethod

protected HttpMethod createPostMethod(MuleMessage msg,
                                      java.lang.String outputEncoding)
                               throws java.lang.Exception
Throws:
java.lang.Exception

createPutMethod

protected HttpMethod createPutMethod(MuleMessage msg,
                                     java.lang.String outputEncoding)
                              throws java.lang.Exception
Throws:
java.lang.Exception

getURI

protected java.net.URI getURI(MuleMessage message)
                       throws java.net.URISyntaxException,
                              TransformerException
Throws:
java.net.URISyntaxException
TransformerException

setupEntityMethod

protected void setupEntityMethod(java.lang.Object src,
                                 java.lang.String encoding,
                                 MuleMessage msg,
                                 EntityEnclosingMethod postMethod)
                          throws java.io.UnsupportedEncodingException,
                                 TransformerException
Throws:
java.io.UnsupportedEncodingException
TransformerException

setHeaders

protected void setHeaders(HttpMethod httpMethod,
                          MuleMessage msg)
                   throws TransformerException
Throws:
TransformerException

createMultiPart

protected MultipartRequestEntity createMultiPart(MuleMessage msg,
                                                 EntityEnclosingMethod method)
                                          throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.