public class HttpConnector extends TcpConnector
HttpConnector
provides a way of receiving and sending http requests
and responses. The Connector itself handles dispatching http requests. The
HttpMessageReceiver
handles the receiving requests and processing
of headers This endpoint recognises the following properties -
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.httpclient.HttpConnectionManager |
clientConnectionManager |
static String |
COOKIE_SPEC_NETSCAPE |
static String |
COOKIE_SPEC_RFC2109 |
static String |
DEFAULT_HTTP_GET_BODY_PARAM_PROPERTY |
static String |
HTTP |
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_PREFIX |
static String |
HTTP_REQUEST_PROPERTY |
static String |
HTTP_STATUS_PROPERTY
MuleEvent property to pass back the status for the response
|
static String |
HTTP_VERSION_PROPERTY |
CLIENT, DEFAULT_BACKLOG, DEFAULT_BUFFER_SIZE, DEFAULT_SO_LINGER, DEFAULT_SOCKET_TIMEOUT, KEEP_SEND_SOCKET_OPEN_PROPERTY, SERVER, TCP
connected, connectedSemaphore, connecting, connectionStrategy, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, dispatcherFactory, dispatchers, disposed, disposing, exceptionListener, initialised, logger, muleContext, name, numberOfConcurrentTransactedReceivers, receivers, requesterFactory, requesters, serviceDescriptor, serviceOverrides, sessionHandler, started, startOnConnect
INT_VALUE_NOT_SET
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
HttpConnector() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.commons.httpclient.HttpClient |
doClientConnect() |
protected void |
doInitialise() |
org.apache.commons.httpclient.HttpConnectionManager |
getClientConnectionManager() |
String |
getCookieSpec() |
String |
getProtocol() |
String |
getProxyHostname() |
String |
getProxyPassword() |
int |
getProxyPort() |
String |
getProxyUsername() |
protected Object |
getReceiverKey(Service service,
InboundEndpoint endpoint)
The method determines the key used to store the receiver against.
|
Map |
getReceivers()
Getter for property 'receivers'.
|
boolean |
isEnableCookies() |
MessageReceiver |
registerListener(Service service,
InboundEndpoint endpoint)
This creates a
MessageReceiver associated with this endpoint
and registers it with the connector |
void |
setClientConnectionManager(org.apache.commons.httpclient.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) |
protected void |
setupClientAuthorization(MuleEvent event,
org.apache.commons.httpclient.HttpMethod httpMethod,
org.apache.commons.httpclient.HttpClient client,
ImmutableEndpoint endpoint) |
configureSocket, doConnect, doDisconnect, doDispose, doStart, doStop, getBacklog, getBufferSize, getClientSoTimeout, getKeepAliveMonitor, getKeepAliveTimeout, getOutputStream, getReceiveBacklog, getReceiveBufferSize, getSendBufferSize, getServerSocket, getServerSocketFactory, getServerSoTimeout, getSocket, getSocketFactory, getSocketSoLinger, getTcpProtocol, isKeepAlive, isKeepSendSocketOpen, isRemoteSyncEnabled, isReuseAddress, isSendTcpNoDelay, isValidateConnections, setBacklog, setBufferSize, setClientSoTimeout, setKeepAlive, setKeepAliveTimeout, setKeepSendSocketOpen, setReceiveBacklog, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSendTcpNoDelay, setServerSocketFactory, setServerSoTimeout, setSocketFactory, setSocketSoLinger, setTcpProtocol, setTimeout, setValidateConnections
checkDisposed, connect, createReceiver, destroyReceiver, disconnect, dispatch, dispose, disposeDispatchers, disposeReceivers, disposeRequesters, disposeWorkManagers, exceptionThrown, fireNotification, getConnectedSemaphore, getConnectEventId, getConnectionDescription, getConnectionStrategy, getDefaultInboundTransformers, getDefaultOutboundTransformers, getDefaultResponseTransformers, getDispatcherFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getExceptionListener, getMaxDispatchersActive, getMaxRequestersActive, getMessageAdapter, getMuleContext, getName, getNumberOfConcurrentTransactedReceivers, getOutputStream, getReceiver, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getReplyToHandler, getRequesterFactory, getRequesterThreadingProfile, getRequesterWorkManager, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getSupportedProtocols, handleException, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, initWorkManagers, isConnected, isCreateMultipleTransactedReceivers, isDisposed, isDisposing, isEnableMessageEvents, isStarted, isSyncEnabled, lookupReceiver, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, request, request, send, setConnectionStrategy, setCreateMultipleTransactedReceivers, setDispatcherFactory, setDispatcherThreadingProfile, setDynamicNotification, setExceptionListener, setMaxDispatchersActive, setMaxRequestersActive, setMuleContext, setName, setNumberOfConcurrentTransactedReceivers, setReceiverThreadingProfile, setRequesterFactory, setRequesterThreadingProfile, setServiceOverrides, setSessionHandler, setSupportedProtocols, setupDispatchReturn, setupRequestReturn, start, stop, supportsProtocol, toString, unregisterListener, unregisterSupportedProtocol, updateCachedNotificationHandler, workAccepted, workCompleted, workRejected, workStarted
public static final String HTTP
public static final String HTTP_PREFIX
public static final String HTTP_STATUS_PROPERTY
public static final String HTTP_VERSION_PROPERTY
public static final String HTTP_CUSTOM_HEADERS_MAP_PROPERTY
public static final String HTTP_METHOD_PROPERTY
public static final String HTTP_REQUEST_PROPERTY
public static final String HTTP_PARAMS_PROPERTY
HttpMethodParams
object in the client
request to be set on the HttpMethod request objectpublic static final String HTTP_GET_BODY_PARAM_PROPERTY
public static final String DEFAULT_HTTP_GET_BODY_PARAM_PROPERTY
public static final String HTTP_POST_BODY_PARAM_PROPERTY
public static final String HTTP_COOKIE_SPEC_PROPERTY
public static final String HTTP_COOKIES_PROPERTY
public static final String HTTP_ENABLE_COOKIES_PROPERTY
public static final String COOKIE_SPEC_NETSCAPE
public static final String COOKIE_SPEC_RFC2109
protected org.apache.commons.httpclient.HttpConnectionManager clientConnectionManager
protected void doInitialise() throws InitialisationException
doInitialise
in class TcpConnector
InitialisationException
public MessageReceiver registerListener(Service service, InboundEndpoint endpoint) throws Exception
Connector
MessageReceiver
associated with this endpoint
and registers it with the connectorregisterListener
in interface Connector
registerListener
in class AbstractConnector
service
- the listening serviceendpoint
- the endpoint contains the listener endpointUri on which to
listen on.Exception
- if the MessageReceiver cannot be created or the Receiver
cannot be registeredConnector#registerListener(Service, Endpoint)
protected Object getReceiverKey(Service service, InboundEndpoint endpoint)
getReceiverKey
in class AbstractConnector
service
- the service for which the endpoint is being registeredendpoint
- the endpoint being registered for the servicepublic String getProtocol()
getProtocol
in interface Connector
getProtocol
in class TcpConnector
Connector.getProtocol()
public String getProxyHostname()
public String getProxyPassword()
public int getProxyPort()
public String getProxyUsername()
public void setProxyHostname(String host)
host
- public void setProxyPassword(String string)
string
- public void setProxyPort(int port)
port
- public void setProxyUsername(String string)
string
- public Map getReceivers()
AbstractConnector
getReceivers
in class AbstractConnector
public String getCookieSpec()
public void setCookieSpec(String cookieSpec)
public boolean isEnableCookies()
public void setEnableCookies(boolean enableCookies)
public org.apache.commons.httpclient.HttpConnectionManager getClientConnectionManager()
public void setClientConnectionManager(org.apache.commons.httpclient.HttpConnectionManager clientConnectionManager)
protected org.apache.commons.httpclient.HttpClient doClientConnect() throws Exception
Exception
protected void setupClientAuthorization(MuleEvent event, org.apache.commons.httpclient.HttpMethod httpMethod, org.apache.commons.httpclient.HttpClient client, ImmutableEndpoint endpoint) throws UnsupportedEncodingException
UnsupportedEncodingException
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.