|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.transport.AbstractConnector
org.mule.transport.tcp.TcpConnector
org.mule.transport.http.HttpConnector
public class HttpConnector
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 -
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
|
static String |
HTTP_CONTEXT_PATH_PROPERTY
The context path of the endpoint being accessed. |
static String |
HTTP_CONTEXT_URI_PROPERTY
The context URI of the endpoint being accessed. |
static String |
HTTP_COOKIE_SPEC_PROPERTY
|
static String |
HTTP_COOKIES_PROPERTY
|
static String |
HTTP_CUSTOM_HEADERS_MAP_PROPERTY
Deprecated. Instead users can now add properties to the outgoing request using the OUTBOUND property scope on the message. |
static String |
HTTP_DISABLE_STATUS_CODE_EXCEPTION_CHECK
|
static String |
HTTP_ENABLE_COOKIES_PROPERTY
|
static String |
HTTP_ENCODE_PARAMVALUE
|
static String |
HTTP_GET_BODY_PARAM_PROPERTY
|
static String |
HTTP_HEADERS
Encapsulates all the HTTP headers |
static Set<String> |
HTTP_INBOUND_PROPERTIES
|
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_QUERY_PARAMS
Stores the HTTP query parameters received, supports multiple values per key and both query parameter key and value are unescaped |
static String |
HTTP_QUERY_STRING
|
static String |
HTTP_RELATIVE_PATH_PROPERTY
The relative path of the URI being accessed in relation to the context path |
static String |
HTTP_REQUEST_PATH_PROPERTY
The path portion of the URL being accessed. |
static String |
HTTP_REQUEST_PROPERTY
The path and query portions of the URL being accessed. |
static String |
HTTP_SERVLET_REQUEST_PROPERTY
|
static String |
HTTP_SERVLET_RESPONSE_PROPERTY
|
static String |
HTTP_STATUS_PROPERTY
MuleEvent property to pass back the status for the response |
static String |
HTTP_VERSION_PROPERTY
|
Fields inherited from class org.mule.transport.tcp.TcpConnector |
---|
CLIENT, DEFAULT_BACKLOG, DEFAULT_BUFFER_SIZE, DEFAULT_SO_LINGER, DEFAULT_SOCKET_TIMEOUT, DEFAULT_WAIT_TIMEOUT, KEEP_SEND_SOCKET_OPEN_PROPERTY, SERVER, TCP |
Fields inherited from interface org.mule.api.transport.Connector |
---|
INT_VALUE_NOT_SET |
Fields inherited from interface org.mule.api.lifecycle.Disposable |
---|
PHASE_NAME |
Constructor Summary | |
---|---|
HttpConnector(MuleContext context)
|
Method Summary | |
---|---|
protected HttpClient |
doClientConnect()
|
protected void |
doInitialise()
|
HttpConnectionManager |
getClientConnectionManager()
|
String |
getCookieSpec()
|
String |
getProtocol()
|
String |
getProxyHostname()
|
String |
getProxyPassword()
|
int |
getProxyPort()
|
String |
getProxyUsername()
|
protected Object |
getReceiverKey(FlowConstruct flowConstruct,
InboundEndpoint endpoint)
The method determines the key used to store the receiver against. |
Map |
getReceivers()
Getter for property 'receivers'. |
boolean |
isEnableCookies()
|
boolean |
isProxyNtlmAuthentication()
|
static String |
normalizeUrl(String url)
Ensures that the supplied URL starts with a '/'. |
void |
registerListener(InboundEndpoint endpoint,
MessageProcessor listener,
FlowConstruct flowConstruct)
Registers a MessageProcessor listener which will listen to new message received from a specific transport channel and then processed by the endpoint. |
void |
setClientConnectionManager(HttpConnectionManager clientConnectionManager)
|
void |
setCookieSpec(String cookieSpec)
|
void |
setEnableCookies(boolean enableCookies)
|
void |
setProxyHostname(String host)
|
void |
setProxyNtlmAuthentication(boolean proxyNtlmAuthentication)
|
void |
setProxyPassword(String string)
|
void |
setProxyPort(int port)
|
void |
setProxyUsername(String string)
|
protected void |
setupClientAuthorization(MuleEvent event,
HttpMethod httpMethod,
HttpClient client,
ImmutableEndpoint endpoint)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
@Deprecated public static final String HTTP_CUSTOM_HEADERS_MAP_PROPERTY
public static final String HTTP_HEADERS
public static final String HTTP_QUERY_PARAMS
public static final String HTTP_QUERY_STRING
public static final String HTTP_METHOD_PROPERTY
public static final String HTTP_REQUEST_PROPERTY
public static final String HTTP_REQUEST_PATH_PROPERTY
public static final String HTTP_CONTEXT_PATH_PROPERTY
public static final String HTTP_CONTEXT_URI_PROPERTY
public static final String HTTP_RELATIVE_PATH_PROPERTY
public static final String HTTP_SERVLET_REQUEST_PROPERTY
public static final String HTTP_SERVLET_RESPONSE_PROPERTY
public static final String HTTP_PARAMS_PROPERTY
HttpMethodParams
object in the client
request to be set on the HttpMethod request object
public 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_DISABLE_STATUS_CODE_EXCEPTION_CHECK
public static final String HTTP_ENCODE_PARAMVALUE
public static final Set<String> HTTP_INBOUND_PROPERTIES
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 HttpConnectionManager clientConnectionManager
Constructor Detail |
---|
public HttpConnector(MuleContext context)
Method Detail |
---|
protected void doInitialise() throws InitialisationException
doInitialise
in class TcpConnector
InitialisationException
public void registerListener(InboundEndpoint endpoint, MessageProcessor listener, FlowConstruct flowConstruct) throws Exception
Connector
registerListener
in interface Connector
registerListener
in class AbstractConnector
endpoint
- defines both the transport and channel/resource uri as well
the processing (transformation/filtering) that should occur when
the endpoint processes a new message from the transport receiver.listener
- the listener that will be invoked when messages are received
on the endpoint.flowConstruct
- reference to the flow construct that the listener is part
of for use as context for logging, notifications and error
handling.
Exception
protected Object getReceiverKey(FlowConstruct flowConstruct, InboundEndpoint endpoint)
getReceiverKey
in class AbstractConnector
endpoint
- the endpoint being registered for the serviceflowConstruct
- the service for which the endpoint is being registered
public 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)
public void setProxyPassword(String string)
public void setProxyPort(int port)
public void setProxyUsername(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 HttpConnectionManager getClientConnectionManager()
public void setClientConnectionManager(HttpConnectionManager clientConnectionManager)
protected HttpClient doClientConnect() throws Exception
Exception
protected void setupClientAuthorization(MuleEvent event, HttpMethod httpMethod, HttpClient client, ImmutableEndpoint endpoint) throws UnsupportedEncodingException
UnsupportedEncodingException
public static String normalizeUrl(String url)
public boolean isProxyNtlmAuthentication()
public void setProxyNtlmAuthentication(boolean proxyNtlmAuthentication)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |