org.mule.providers.http
Class HttpConnector

java.lang.Object
  extended by org.mule.providers.AbstractConnector
      extended by org.mule.providers.tcp.TcpConnector
          extended by org.mule.providers.http.HttpConnector
All Implemented Interfaces:
ExceptionListener, EventListener, javax.resource.spi.work.WorkListener, Disposable, Initialisable, UMOConnectable, UMOConnector
Direct Known Subclasses:
HttpsConnector, JettyConnector

public class HttpConnector
extends TcpConnector

HttpConnector provides a way of receiving and sending http requests and responses. The UMOConnector itself handles dispatching http requests. The HttpMessageReceiver handles the receiving requests and processing of headers This endpoint recognises the following properties -


Field Summary
protected  HttpConnectionManager clientConnectionManager
           
static String COOKIE_SPEC_NETSCAPE
           
static String COOKIE_SPEC_RFC2109
           
static String DEFAULT_HTTP_GET_BODY_PARAM_PROPERTY
           
static String HTTP_COOKIE_SPEC_PROPERTY
           
static String HTTP_COOKIES_PROPERTY
           
static String HTTP_CUSTOM_HEADERS_MAP_PROPERTY
           
static String HTTP_ENABLE_COOKIES_PROPERTY
           
static String HTTP_GET_BODY_PARAM_PROPERTY
           
static String HTTP_METHOD_PROPERTY
           
static String HTTP_PARAMS_PROPERTY
          Allows the user to set a HttpMethodParams object in the client request to be set on the HttpMethod request object
static String HTTP_POST_BODY_PARAM_PROPERTY
           
static String HTTP_REQUEST_PROPERTY
           
static String HTTP_STATUS_PROPERTY
          Event property to pass back the status for the response
static String HTTP_VERSION_PROPERTY
           
 
Fields inherited from class org.mule.providers.tcp.TcpConnector
DEFAULT_BACKLOG, DEFAULT_BUFFER_SIZE, DEFAULT_SOCKET_TIMEOUT, KEEP_SEND_SOCKET_OPEN_PROPERTY
 
Fields inherited from class org.mule.providers.AbstractConnector
connected, connecting, connectionStrategy, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, defaultInboundTransformer, defaultOutboundTransformer, defaultResponseTransformer, dispatcherFactory, dispatchers, disposed, disposing, exceptionListener, initialised, logger, name, numberOfConcurrentTransactedReceivers, receivers, serviceDescriptor, serviceOverrides, sessionHandler, started, startOnConnect
 
Fields inherited from interface org.mule.umo.provider.UMOConnector
INT_VALUE_NOT_SET
 
Constructor Summary
HttpConnector()
           
 
Method Summary
protected  void doInitialise()
           
 HttpConnectionManager getClientConnectionManager()
           
 String getCookieSpec()
           
 String getProtocol()
           
 String getProxyHostname()
           
 String getProxyPassword()
           
 int getProxyPort()
           
 String getProxyUsername()
           
protected  Object getReceiverKey(UMOComponent component, UMOEndpoint endpoint)
          The method determines the key used to store the receiver against.
 Map getReceivers()
          Getter for property 'receivers'.
 boolean isEnableCookies()
           
 UMOMessageReceiver registerListener(UMOComponent component, UMOEndpoint endpoint)
          This creates a UMOMessageReceiver associated with this endpoint and registers it with the connector.
 void setClientConnectionManager(HttpConnectionManager clientConnectionManager)
           
 void setCookieSpec(String cookieSpec)
           
 void setEnableCookies(boolean enableCookies)
           
 void setProxyHostname(String host)
           
 void setProxyPassword(String string)
           
 void setProxyPort(int port)
           
 void setProxyUsername(String string)
           
 
Methods inherited from class org.mule.providers.tcp.TcpConnector
doConnect, doDisconnect, doDispose, doStart, doStop, getBacklog, getBufferSize, getOutputStream, getReceiveBacklog, getReceiveBufferSize, getReceiveTimeout, getSendBufferSize, getSendSocketLinger, getSendTimeout, getServerSocket, getServerSocketFactory, getSocket, getSocketFactory, getTcpProtocol, getTcpProtocolClassName, isKeepAlive, isKeepSendSocketOpen, isRemoteSyncEnabled, isReuseAddress, isSendTcpNoDelay, isValidateConnections, setBacklog, setBufferSize, setKeepAlive, setKeepSendSocketOpen, setReceiveBacklog, setReceiveBufferSize, setReceiveTimeout, setReuseAddress, setSendBufferSize, setSendSocketLinger, setSendTcpNoDelay, setSendTimeout, setServerSocketFactory, setSocketFactory, setTcpProtocol, setTcpProtocolClassName, setTimeout, setValidateConnections
 
Methods inherited from class org.mule.providers.AbstractConnector
checkDisposed, connect, createReceiver, destroyReceiver, disconnect, dispatch, dispose, disposeDispatchers, disposeReceivers, disposeWorkManagers, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getConnectionStrategy, getDefaultInboundTransformer, getDefaultOutboundTransformer, getDefaultResponseTransformer, getDispatcherFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getExceptionListener, getMaxDispatchersActive, getMessageAdapter, getName, getNumberOfConcurrentTransactedReceivers, getReceiver, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getReplyToHandler, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getStreamMessageAdapter, getSupportedProtocols, handleException, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, isConnected, isCreateMultipleTransactedReceivers, isDisposed, isDisposing, isEnableMessageEvents, isStarted, lookupReceiver, receive, receive, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, send, setConnectionStrategy, setCreateMultipleTransactedReceivers, setDefaultInboundTransformer, setDefaultOutboundTransformer, setDefaultResponseTransformer, setDispatcherFactory, setDispatcherThreadingProfile, setEnableMessageEvents, setExceptionListener, setMaxDispatchersActive, setName, setNumberOfConcurrentTransactedReceivers, setReceiverThreadingProfile, setServiceOverrides, setSessionHandler, setSupportedProtocols, startConnector, stopConnector, supportsProtocol, toString, unregisterListener, unregisterSupportedProtocol, workAccepted, workCompleted, workRejected, workStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HTTP_STATUS_PROPERTY

public static final String HTTP_STATUS_PROPERTY
Event property to pass back the status for the response

See Also:
Constant Field Values

HTTP_VERSION_PROPERTY

public static final String HTTP_VERSION_PROPERTY
See Also:
Constant Field Values

HTTP_CUSTOM_HEADERS_MAP_PROPERTY

public static final String HTTP_CUSTOM_HEADERS_MAP_PROPERTY
See Also:
Constant Field Values

HTTP_METHOD_PROPERTY

public static final String HTTP_METHOD_PROPERTY
See Also:
Constant Field Values

HTTP_REQUEST_PROPERTY

public static final String HTTP_REQUEST_PROPERTY
See Also:
Constant Field Values

HTTP_PARAMS_PROPERTY

public static final String HTTP_PARAMS_PROPERTY
Allows the user to set a HttpMethodParams object in the client request to be set on the HttpMethod request object

See Also:
Constant Field Values

HTTP_GET_BODY_PARAM_PROPERTY

public static final String HTTP_GET_BODY_PARAM_PROPERTY
See Also:
Constant Field Values

DEFAULT_HTTP_GET_BODY_PARAM_PROPERTY

public static final String DEFAULT_HTTP_GET_BODY_PARAM_PROPERTY
See Also:
Constant Field Values

HTTP_POST_BODY_PARAM_PROPERTY

public static final String HTTP_POST_BODY_PARAM_PROPERTY
See Also:
Constant Field Values

HTTP_COOKIE_SPEC_PROPERTY

public static final String HTTP_COOKIE_SPEC_PROPERTY
See Also:
Constant Field Values

HTTP_COOKIES_PROPERTY

public static final String HTTP_COOKIES_PROPERTY
See Also:
Constant Field Values

HTTP_ENABLE_COOKIES_PROPERTY

public static final String HTTP_ENABLE_COOKIES_PROPERTY
See Also:
Constant Field Values

COOKIE_SPEC_NETSCAPE

public static final String COOKIE_SPEC_NETSCAPE
See Also:
Constant Field Values

COOKIE_SPEC_RFC2109

public static final String COOKIE_SPEC_RFC2109
See Also:
Constant Field Values

clientConnectionManager

protected HttpConnectionManager clientConnectionManager
Constructor Detail

HttpConnector

public HttpConnector()
Method Detail

doInitialise

protected void doInitialise()
                     throws InitialisationException
Overrides:
doInitialise in class TcpConnector
Throws:
InitialisationException

registerListener

public UMOMessageReceiver registerListener(UMOComponent component,
                                           UMOEndpoint endpoint)
                                    throws Exception
Description copied from class: AbstractConnector
This creates a UMOMessageReceiver associated with this endpoint and registers it with the connector.

Specified by:
registerListener in interface UMOConnector
Overrides:
registerListener in class AbstractConnector
Parameters:
component - the listening component
endpoint - the endpoint contains the listener endpointUri on which to listen on.
Returns:
message receiver
Throws:
Exception - if the UMOMessageReceiver cannot be created or the Receiver cannot be registered
See Also:
UMOConnector.registerListener(UMOComponent, UMOEndpoint)

getReceiverKey

protected Object getReceiverKey(UMOComponent component,
                                UMOEndpoint endpoint)
The method determines the key used to store the receiver against.

Overrides:
getReceiverKey in class AbstractConnector
Parameters:
component - the component for which the endpoint is being registered
endpoint - the endpoint being registered for the component
Returns:
the key to store the newly created receiver against

getProtocol

public String getProtocol()
Specified by:
getProtocol in interface UMOConnector
Overrides:
getProtocol in class TcpConnector
Returns:
the primary protocol name for endpoints of this connector
See Also:
UMOConnector.getProtocol()

getProxyHostname

public String getProxyHostname()
Returns:

getProxyPassword

public String getProxyPassword()
Returns:

getProxyPort

public int getProxyPort()
Returns:

getProxyUsername

public String getProxyUsername()
Returns:

setProxyHostname

public void setProxyHostname(String host)
Parameters:
host -

setProxyPassword

public void setProxyPassword(String string)
Parameters:
string -

setProxyPort

public void setProxyPort(int port)
Parameters:
port -

setProxyUsername

public void setProxyUsername(String string)
Parameters:
string -

getReceivers

public Map getReceivers()
Description copied from class: AbstractConnector
Getter for property 'receivers'.

Overrides:
getReceivers in class AbstractConnector
Returns:
Value for property 'receivers'.

getCookieSpec

public String getCookieSpec()

setCookieSpec

public void setCookieSpec(String cookieSpec)

isEnableCookies

public boolean isEnableCookies()

setEnableCookies

public void setEnableCookies(boolean enableCookies)

getClientConnectionManager

public HttpConnectionManager getClientConnectionManager()

setClientConnectionManager

public void setClientConnectionManager(HttpConnectionManager clientConnectionManager)


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.