public class HttpNIOListener extends AbstractTransportListener
The HTTP transport listener
Sets the following message properties in addition to setting the request URI as the destination
ConfigurationElement.State
logger, metrics, properties, serverName, transportName
Constructor and Description |
---|
HttpNIOListener(FileCache fileCache)
Default constructor, with a reference to the FileCache to use
|
Modifier and Type | Method and Description |
---|---|
java.util.List |
getAccessURLs(java.lang.String psId)
Get available access urls for the proxy service with the given identifier exposed by this transport listener
|
java.util.Map |
getErrorHandlers()
Gets the 404 error handler that customizes the NOT_FOUND errors going out
|
void |
setAllowedMethods(java.util.Set allowedMethods)
Sets the list of HTTP methods supported by this listener
|
void |
setBaseURLs(java.util.Map baseURLs)
The base URLs to use when exposing the transport
|
void |
setBindAddress(java.lang.String bindAddress)
The bind address to use, on a multiple network interface node
|
void |
setCompressionMinSize(long compressionMinSize)
Set the minimum size of the response entity to enable compression when supported by the client (default 2Kbytes)
|
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
|
void |
setContinueOnRuntimeExceptions(boolean continueOnRuntimeExceptions)
Control behavior of engine on runtime exceptions (WARNING: It maybe dangerous to ignore runtime exceptions)
|
void |
setDefaultContextPath(java.lang.String defaultContextPath)
Set the default context path for services exposed over HTTP
|
void |
setEnableConnectionDebug(boolean enableConnectionDebug)
Debug connection information on errors
|
void |
setErrorHandlers(java.util.Map errorHandlers)
Sets the 404 error handler that customizes the NOT_FOUND errors going out
|
void |
setMaxPayloadSize(long maxPayloadSize)
The maximum payload size to accept - defaults to 1M
|
void |
setNoCompression(boolean noCompression)
Turn off use of Gzip compression even if the request contains an Accept-Encoding header
|
void |
setPort(int port)
The HTTP transport listen port - default is 80
|
void |
setReplaceOriginServer(boolean replaceOriginServer)
Replace the origin server header for proxied requests, to UltraESB
|
void |
setRequestFilters(java.util.List requestFilters)
One or more request filters - to support ?wsdl, ?xsd etc on service endpoints
|
void |
setResumeNewConnectionsAt(int resumeNewConnectionsAt)
Bound at which to resume normal operations from maintenance mode when open connections increased
|
void |
setStopNewConnectionsAt(int stopNewConnectionsAt)
Set the upper bound on the open connections at a given time, after which the transport will reject new connections
|
void |
setZeroCopyEnabled(boolean zeroCopyEnabled)
Use Zero-Copy when reading requests
|
void |
toDetailedViewExt(org.adroitlogic.ultraesb.jmx.view.TransportView view)
Extension point for additional attributes for the detailed view to be extended by the specific transport listener
|
getDetails, init, resetStatistics, setProperties, toBasicView, toDetailedView
equals, getDeploymentUnit, getDerivedName, getId, getState, getStreamCount, getTimerStreamMax, getTimerStreamMean, getTimerStreamMin, getTimerStreamPer, hashCode, init, isDebugOn, isStarted, maintenanceShutdown, markAsOutdated, pause, resetCounter, resetTimer, resolveMetricsStreams, resume, setBeanName, setConfig, setDebugOn, setDerivedName, setId, setMetricsEngine, setState, start, stop, throwIllegalStateException, undeploy
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
retire
public HttpNIOListener(FileCache fileCache)
fileCache
- the file cache to usepublic void setPort(int port)
port
- HTTP listen portpublic void setBindAddress(java.lang.String bindAddress)
bindAddress
- bind address to listenpublic void setBaseURLs(java.util.Map baseURLs)
baseURLs
- the base urls where the messages are forwarded topublic void setRequestFilters(java.util.List requestFilters)
requestFilters
- a list of service filters to attach to this listenerRequestFilter
public void setConnectionDebugHeaders(java.util.Set connectionDebugHeaders)
connectionDebugHeaders
- a set of HTTP header names, or a single entry 'none' or 'all'public void setAllowedMethods(java.util.Set allowedMethods)
allowedMethods
- a set of HTTP methods such as {GET, POST, PUT, DELETE}public void setReplaceOriginServer(boolean replaceOriginServer)
replaceOriginServer
- false disables the replacing (Default is true)public void setEnableConnectionDebug(boolean enableConnectionDebug)
enableConnectionDebug
- enable when truepublic void setZeroCopyEnabled(boolean zeroCopyEnabled)
zeroCopyEnabled
- true uses Zero-Copy reads (default)public void setStopNewConnectionsAt(int stopNewConnectionsAt)
stopNewConnectionsAt
- maximum open connectionspublic void setResumeNewConnectionsAt(int resumeNewConnectionsAt)
resumeNewConnectionsAt
- bound at which to resume normal operations after hitting stopNewConnectionsAtpublic void setMaxPayloadSize(long maxPayloadSize)
maxPayloadSize
- maximum payload size to acceptpublic void setDefaultContextPath(java.lang.String defaultContextPath)
defaultContextPath
- the context path to use (default '/service/')public void setNoCompression(boolean noCompression)
noCompression
- true fully disables all use of response compressionpublic void setCompressionMinSize(long compressionMinSize)
compressionMinSize
- size in bytespublic void setContinueOnRuntimeExceptions(boolean continueOnRuntimeExceptions)
continueOnRuntimeExceptions
- if true, ignores runtime exceptionspublic void setContinueOnCheckedExceptions(boolean continueOnCheckedExceptions)
continueOnCheckedExceptions
- if true, ignores checked exceptionspublic java.util.Map getErrorHandlers()
public void setErrorHandlers(java.util.Map errorHandlers)
errorHandlers
- the error handler map for the status codes to be setpublic void toDetailedViewExt(org.adroitlogic.ultraesb.jmx.view.TransportView view)
toDetailedViewExt
in class AbstractTransportListener
view
- the existing view that is subjected to extensionpublic java.util.List getAccessURLs(java.lang.String psId)
getAccessURLs
in class AbstractTransportListener
psId
- the identifier of the proxy service of which the AccessURLs are retrieved