org.mule.transport.legstar.http
Class LegstarHttpMessageDispatcher

java.lang.Object
  extended by org.mule.transport.AbstractTransportMessageHandler
      extended by org.mule.transport.AbstractMessageDispatcher
          extended by org.mule.transport.http.HttpClientMessageDispatcher
              extended by org.mule.transport.legstar.http.LegstarHttpMessageDispatcher
All Implemented Interfaces:
org.mule.api.lifecycle.Disposable, org.mule.api.lifecycle.Initialisable, org.mule.api.lifecycle.Lifecycle, org.mule.api.lifecycle.LifecycleStateEnabled, org.mule.api.lifecycle.Startable, org.mule.api.lifecycle.Stoppable, org.mule.api.processor.MessageProcessor, org.mule.api.transport.Connectable, org.mule.api.transport.MessageDispatcher

public class LegstarHttpMessageDispatcher
extends org.mule.transport.http.HttpClientMessageDispatcher

LegstarMessageDispatcher delegates most of its behavior to HttpClientMessageDispatcher.


Field Summary
 
Fields inherited from class org.mule.transport.http.HttpClientMessageDispatcher
ERROR_STATUS_CODE_RANGE_START, httpConnector, REDIRECT_STATUS_CODE_RANGE_START
 
Fields inherited from class org.mule.transport.AbstractMessageDispatcher
defaultOutboundTransformers, defaultResponseTransformers
 
Fields inherited from class org.mule.transport.AbstractTransportMessageHandler
connected, connector, endpoint, lifecycleManager, logger, muleMessageFactory, retryTemplate
 
Fields inherited from interface org.mule.api.transport.MessageDispatcher
RECEIVE_NO_WAIT, RECEIVE_WAIT_INDEFINITELY
 
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
 
Constructor Summary
LegstarHttpMessageDispatcher(org.mule.api.endpoint.OutboundEndpoint endpoint)
          Constructor.
 
Method Summary
protected  org.apache.commons.httpclient.HostConfiguration getHostConfig(URI uri)
           
 org.apache.commons.httpclient.HttpMethod getMethod(org.mule.api.MuleEvent event)
          We override this method because we need to perform LegStar messaging specific transformations and also need to force the http header content type.
protected  org.mule.api.MuleMessage getResponseFromMethod(org.apache.commons.httpclient.HttpMethod httpMethod, org.mule.api.ExceptionPayload ep)
          We need to override this in order to clean up some HTTP headers which would percolate back to the client.
 boolean isHostTraceOn(org.mule.api.MuleMessage esbMessage)
           
 
Methods inherited from class org.mule.transport.http.HttpClientMessageDispatcher
createEntityMethod, doConnect, doDisconnect, doDispatch, doDispose, doInitialise, doSend, execute, handleRedirect, processCookies, returnException, setPropertyFromEndpoint
 
Methods inherited from class org.mule.transport.AbstractMessageDispatcher
applyOutboundTransformers, applyResponseTransformers, createLifecycleManager, getDispatcherName, getEndpoint, getWorkManager, process, returnResponse, returnResponse
 
Methods inherited from class org.mule.transport.AbstractTransportMessageHandler
activate, connect, connectHandler, createMuleMessage, createMuleMessage, createMuleMessage, createMuleMessageFactory, createNullMuleMessage, disconnect, dispose, disposeAndLogException, doStart, doStartHandler, doStop, getConnectEventId, getConnectionDescription, getConnector, getLifecycleState, initialise, initializeMessageFactory, initializeRetryPolicy, isConnected, isDoThreading, isStarted, isStarting, isStopped, isStopping, passivate, setEndpoint, start, stop, toString, validate, validateConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.api.transport.MessageDispatcher
activate, createMuleMessage, createMuleMessage, getConnector, passivate, validate
 
Methods inherited from interface org.mule.api.transport.Connectable
connect, disconnect, getConnectionDescription, isConnected, validateConnection
 
Methods inherited from interface org.mule.api.lifecycle.Initialisable
initialise
 
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.lifecycle.LifecycleStateEnabled
getLifecycleState
 

Constructor Detail

LegstarHttpMessageDispatcher

public LegstarHttpMessageDispatcher(org.mule.api.endpoint.OutboundEndpoint endpoint)
Constructor.

Parameters:
endpoint - the endpoint to dispatch to
Method Detail

getMethod

public final org.apache.commons.httpclient.HttpMethod getMethod(org.mule.api.MuleEvent event)
                                                         throws org.mule.api.transformer.TransformerException
We override this method because we need to perform LegStar messaging specific transformations and also need to force the http header content type.

Overrides:
getMethod in class org.mule.transport.http.HttpClientMessageDispatcher
Throws:
org.mule.api.transformer.TransformerException

getResponseFromMethod

protected org.mule.api.MuleMessage getResponseFromMethod(org.apache.commons.httpclient.HttpMethod httpMethod,
                                                         org.mule.api.ExceptionPayload ep)
                                                  throws IOException,
                                                         org.mule.api.MuleException
We need to override this in order to clean up some HTTP headers which would percolate back to the client.

Overrides:
getResponseFromMethod in class org.mule.transport.http.HttpClientMessageDispatcher
Throws:
IOException
org.mule.api.MuleException

getHostConfig

protected org.apache.commons.httpclient.HostConfiguration getHostConfig(URI uri)
                                                                 throws Exception
Overrides:
getHostConfig in class org.mule.transport.http.HttpClientMessageDispatcher
Throws:
Exception

isHostTraceOn

public boolean isHostTraceOn(org.mule.api.MuleMessage esbMessage)
Parameters:
esbMessage - the mule message
Returns:
true if the mainframe should trace execution requests


Copyright © 2013 LegSem. All Rights Reserved.