public class HttpNIOSender extends AbstractTransportSender
ConfigurationElement.State
Modifier and Type | Field and Description |
---|---|
protected int |
maxConnections
The total maximum connections to be opened at any time - default 8K
|
protected int |
maxPerRoute
The maximum connections per route (i.e.
|
logger, metrics, originatingTransport, properties
Constructor and Description |
---|
HttpNIOSender(FileCache fileCache)
The default constructor, accepting the FileCache to use
|
Modifier and Type | Method and Description |
---|---|
protected org.apache.http.nio.NHttpConnectionFactory |
getConnectionFactory(org.apache.http.params.HttpParams params) |
void |
setConnectionDebugHeaders(java.util.Set connectionDebugHeaders)
Sets the list of HTTP headers to be dumped on a connection failure, when connection debugging is enabled
|
void |
setContinueOnCheckedExceptions(boolean continueOnCheckedExceptions)
Control behavior of engine on checked exceptions (default false)
|
void |
setContinueOnRuntimeExceptions(boolean continueOnRuntimeExceptions)
Control behavior of engine on runtime exceptions (default true)
|
void |
setEnableConnectionDebug(boolean enableConnectionDebug)
Debug connection information on errors
|
void |
setKeepalive(int keepalive)
Set the default keepalive time for connections kept for reuse.
|
void |
setKeepAliveSafetyThreshold(int keepAliveSafetyThreshold)
Set the keep-alive safety threshold to not use a connection, when the keep-alive window is about to end
|
void |
setMaxConnections(int maxConnections)
Total maximum outgoing connections to create at any given time (default 4K)
|
void |
setMaxPerRoute(int maxPerRoute)
Maximum connections to be opened per route (i.e.
|
void |
setProxyBypassList(java.lang.String[] proxyBypassList)
A list of addresses for which to bypass the proxy and go direct, applicable when a proxy server is defined
|
void |
setProxyHost(java.lang.String proxyHost)
HTTP proxy hostname (if outgoing connections must go through a proxy)
|
void |
setProxyPort(int proxyPort)
HTTP proxy port
|
void |
setReplaceUserAgent(boolean replaceUserAgent)
Replace the user agent header on requests sent to indicate UltraESB
|
void |
setUnzipResponseEntities(boolean unzipResponseEntities)
Unzip compressed responses.
|
void |
setZeroCopyEnabled(boolean zeroCopyEnabled)
Turn on/off use of Zero-Copy (default on)
|
void |
toDetailedViewExt(org.adroitlogic.ultraesb.jmx.view.TransportView view)
Extension point for additional attributes
|
getDetails, getOriginatingTransport, pause, resetStatistics, resume, setProperties, start, stop, toBasicView, toDetailedView
equals, getDeploymentUnit, getDerivedName, getId, getState, getStreamCount, getTimerStreamMax, getTimerStreamMean, getTimerStreamMin, getTimerStreamPer, hashCode, init, isDebugOn, isStarted, maintenanceShutdown, markAsOutdated, resetCounter, resetTimer, resolveMetricsStreams, setBeanName, setConfig, setDebugOn, setDerivedName, setId, setMetricsEngine, setState, throwIllegalStateException, undeploy
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
retire
protected int maxPerRoute
protected int maxConnections
public HttpNIOSender(FileCache fileCache)
fileCache
- file cache to usepublic void setZeroCopyEnabled(boolean zeroCopyEnabled)
zeroCopyEnabled
- false turns off (default true)public void setProxyHost(java.lang.String proxyHost)
proxyHost
- HTTP proxy hostpublic void setProxyPort(int proxyPort)
proxyPort
- HTTP proxy portpublic void setConnectionDebugHeaders(java.util.Set connectionDebugHeaders)
connectionDebugHeaders
- a set of HTTP header names, or a single entry 'none' or 'all'public void setEnableConnectionDebug(boolean enableConnectionDebug)
enableConnectionDebug
- enable when truepublic void setKeepalive(int keepalive)
keepalive
- the time used for keepalive in mspublic void setKeepAliveSafetyThreshold(int keepAliveSafetyThreshold)
keepAliveSafetyThreshold
- threshold to not use a connection in mspublic void setProxyBypassList(java.lang.String[] proxyBypassList)
proxyBypassList
- list of addresses to bypass proxypublic void setReplaceUserAgent(boolean replaceUserAgent)
replaceUserAgent
- false disables (default true)public void setUnzipResponseEntities(boolean unzipResponseEntities)
unzipResponseEntities
- false leaves compressed responses intact (Default true)public void setContinueOnRuntimeExceptions(boolean continueOnRuntimeExceptions)
continueOnRuntimeExceptions
- if true, ignores runtime exceptionspublic void setContinueOnCheckedExceptions(boolean continueOnCheckedExceptions)
continueOnCheckedExceptions
- if true, ignores checked exceptionspublic void setMaxPerRoute(int maxPerRoute)
maxPerRoute
- maximum connections to use in pool (default 2K)public void setMaxConnections(int maxConnections)
maxConnections
- maxium outgoing connections to be allowed (default 2K)protected org.apache.http.nio.NHttpConnectionFactory getConnectionFactory(org.apache.http.params.HttpParams params)
public void toDetailedViewExt(org.adroitlogic.ultraesb.jmx.view.TransportView view)
AbstractTransportSender
toDetailedViewExt
in class AbstractTransportSender