org.mule.transport.http.components
Class HttpResponseBuilder

java.lang.Object
  extended by org.mule.processor.AbstractMuleObjectOwner<MessageProcessor>
      extended by org.mule.processor.AbstractMessageProcessorOwner
          extended by org.mule.transport.http.components.HttpResponseBuilder
All Implemented Interfaces:
AnnotatedObject, FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor

public class HttpResponseBuilder
extends AbstractMessageProcessorOwner
implements Initialisable, MessageProcessor


Field Summary
 
Fields inherited from class org.mule.processor.AbstractMuleObjectOwner
flowConstruct, muleContext
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Fields inherited from interface org.mule.api.AnnotatedObject
PROPERTY_NAME
 
Constructor Summary
HttpResponseBuilder()
           
 
Method Summary
 void addHeader(String key, String value)
           
protected  void checkVersion(MuleMessage message)
           
protected  void copyOutboundProperties(HttpResponse response, MuleMessage message)
           
protected  List<MessageProcessor> getOwnedMessageProcessors()
           
 String getVersion()
           
 void initialise()
          Method used to perform any initialisation work.
 MuleEvent process(MuleEvent event)
          Invokes the MessageProcessor.
protected  void setBody(HttpResponse response, MuleMessage message, MuleEvent event)
           
 void setCacheControl(CacheControlHeader cacheControl)
           
protected  void setCacheControl(HttpResponse response, MuleMessage message)
           
protected  void setContentType(HttpResponse response, MuleMessage message)
           
 void setContentType(String contentType)
           
protected  void setCookies(HttpResponse response, MuleMessage message)
           
 void setCookies(List<CookieWrapper> cookies)
           
protected  void setHeaders(HttpResponse response, MuleMessage message)
           
 void setHeaders(Map<String,String> headers)
           
 void setMessageProcessor(MessageProcessor messageProcessor)
           
 void setPropagateMuleProperties(boolean propagateMuleProperties)
           
 void setStatus(String status)
           
 void setVersion(String version)
           
 
Methods inherited from class org.mule.processor.AbstractMessageProcessorOwner
getAnnotation, getAnnotations, getOwnedObjects, setAnnotations
 
Methods inherited from class org.mule.processor.AbstractMuleObjectOwner
dispose, getFlowConstruct, getMuleContext, setFlowConstruct, setMuleContext, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.api.lifecycle.Startable
start
 
Methods inherited from interface org.mule.api.lifecycle.Stoppable
stop
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 
Methods inherited from interface org.mule.api.context.MuleContextAware
setMuleContext
 
Methods inherited from interface org.mule.api.construct.FlowConstructAware
setFlowConstruct
 

Constructor Detail

HttpResponseBuilder

public HttpResponseBuilder()
Method Detail

initialise

public void initialise()
                throws InitialisationException
Description copied from interface: Initialisable
Method used to perform any initialisation work. If a fatal error occurs during initialisation an InitialisationException should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a RecoverableException should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

Specified by:
initialise in interface Initialisable
Overrides:
initialise in class AbstractMuleObjectOwner<MessageProcessor>
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from

process

public MuleEvent process(MuleEvent event)
                  throws MuleException
Description copied from interface: MessageProcessor
Invokes the MessageProcessor.

Specified by:
process in interface MessageProcessor
Parameters:
event - MuleEvent to be processed
Returns:
optional response MuleEvent
Throws:
MuleException

getOwnedMessageProcessors

protected List<MessageProcessor> getOwnedMessageProcessors()
Specified by:
getOwnedMessageProcessors in class AbstractMessageProcessorOwner

setBody

protected void setBody(HttpResponse response,
                       MuleMessage message,
                       MuleEvent event)
                throws MuleException
Throws:
MuleException

copyOutboundProperties

protected void copyOutboundProperties(HttpResponse response,
                                      MuleMessage message)

setCacheControl

protected void setCacheControl(HttpResponse response,
                               MuleMessage message)

setCookies

protected void setCookies(HttpResponse response,
                          MuleMessage message)
                   throws MuleException
Throws:
MuleException

setHeaders

protected void setHeaders(HttpResponse response,
                          MuleMessage message)

checkVersion

protected void checkVersion(MuleMessage message)

setContentType

protected void setContentType(HttpResponse response,
                              MuleMessage message)

setHeaders

public void setHeaders(Map<String,String> headers)

setStatus

public void setStatus(String status)

setContentType

public void setContentType(String contentType)

setVersion

public void setVersion(String version)

setCookies

public void setCookies(List<CookieWrapper> cookies)

addHeader

public void addHeader(String key,
                      String value)

setCacheControl

public void setCacheControl(CacheControlHeader cacheControl)

getVersion

public String getVersion()

setPropagateMuleProperties

public void setPropagateMuleProperties(boolean propagateMuleProperties)

setMessageProcessor

public void setMessageProcessor(MessageProcessor messageProcessor)


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