|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.http.server.NetworkListener
public class NetworkListener
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_NETWORK_HOST
The default network host to which the HttpServer will bind to in order to service HTTP
requests. |
static int |
DEFAULT_NETWORK_PORT
The default network port to which the HttpServer will bind to in order to service HTTP
requests. |
| Constructor Summary | |
|---|---|
NetworkListener(java.lang.String name)
Constructs a new NetworkListener using the specified name. |
|
NetworkListener(java.lang.String name,
java.lang.String host)
Constructs a new NetworkListener using the specified name and host. |
|
NetworkListener(java.lang.String name,
java.lang.String host,
int port)
Constructs a new NetworkListener using the specified name, host, and
port. |
|
NetworkListener(java.lang.String name,
java.lang.String host,
PortRange portRange)
Constructs a new NetworkListener using the specified name, host, and
port. |
|
| Method Summary | |
|---|---|
JmxObject |
createManagementObject()
|
boolean |
deregisterAddOn(AddOn addon)
Deregisters AddOn from this NetworkListener. |
AddOn[] |
getAddOns()
Return the array of the registered AddOns. |
protected ArraySet<AddOn> |
getAddOnSet()
Returns the direct addons collection, registered on the NetworkListener. |
java.lang.String |
getCompressableMimeTypes()
|
java.lang.String |
getCompression()
|
int |
getCompressionMinSize()
|
FileCache |
getFileCache()
|
FilterChain |
getFilterChain()
|
java.lang.String |
getHost()
|
HttpCodecFilter |
getHttpCodecFilter()
|
HttpServerFilter |
getHttpServerFilter()
|
KeepAlive |
getKeepAlive()
|
int |
getMaxHttpHeaderSize()
|
int |
getMaxPendingBytes()
|
int |
getMaxPostSize()
|
java.lang.String |
getName()
|
java.lang.String |
getNoCompressionUserAgents()
|
int |
getPort()
|
PortRange |
getPortRange()
|
java.lang.String |
getRestrictedUserAgents()
|
SSLEngineConfigurator |
getSslEngineConfig()
|
int |
getTransactionTimeout()
|
TCPNIOTransport |
getTransport()
|
int |
getUploadTimeout()
|
java.lang.String |
getUriEncoding()
|
boolean |
isAuthPassthroughEnabled()
|
boolean |
isChunkingEnabled()
|
boolean |
isDisableUploadTimeout()
|
boolean |
isPaused()
|
boolean |
isRcmSupportEnabled()
|
boolean |
isSecure()
|
boolean |
isSendFileEnabled()
|
boolean |
isStarted()
|
boolean |
isTraceEnabled()
|
void |
pause()
Pauses the listener. |
boolean |
registerAddOn(AddOn addon)
Registers AddOn on this NetworkListener. |
void |
resume()
Resumes a paused listener. |
void |
setAuthPassthroughEnabled(boolean authPassthroughEnabled)
|
void |
setChunkingEnabled(boolean chunkingEnabled)
Enable/disable chunking of an HTTP response body if no content length has been explictly specified. |
void |
setCompressableMimeTypes(java.lang.String compressableMimeTypes)
|
void |
setCompression(java.lang.String compression)
|
void |
setCompressionMinSize(int compressionMinSize)
|
void |
setDisableUploadTimeout(boolean disableUploadTimeout)
|
void |
setFilterChain(FilterChain filterChain)
Specifies the FilterChain to be used by the TCPNIOTransport associated with this listener. |
void |
setMaxHttpHeaderSize(int maxHttpHeaderSize)
Configures the maximum header size for an HTTP request. |
void |
setMaxPendingBytes(int maxPendingBytes)
The maximum size, in bytes, of all data waiting to be written to the associated Connection. |
void |
setMaxPostSize(int maxPostSize)
|
void |
setNoCompressionUserAgents(java.lang.String noCompressionUserAgents)
|
void |
setRcmSupportEnabled(boolean enabled)
|
void |
setRestrictedUserAgents(java.lang.String restrictedUserAgents)
|
void |
setSecure(boolean secure)
Enable or disable security for this listener. |
void |
setSendFileEnabled(boolean sendFileEnabled)
|
void |
setSSLEngineConfig(SSLEngineConfigurator sslEngineConfig)
Provides customization of the SSLEngine used by this listener. |
void |
setTraceEnabled(boolean traceEnabled)
|
void |
setTransactionTimeout(int transactionTimeout)
|
void |
setTransport(TCPNIOTransport transport)
This allows the developer to specify a custom TCPNIOTransport implementation to be used by this
listener. |
void |
setUploadTimeout(int uploadTimeout)
|
void |
setUriEncoding(java.lang.String uriEncoding)
|
void |
start()
Starts the listener. |
void |
stop()
Stops the listener. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_NETWORK_HOST
HttpServer will bind to in order to service HTTP
requests.
public static final int DEFAULT_NETWORK_PORT
HttpServer will bind to in order to service HTTP
requests.
| Constructor Detail |
|---|
public NetworkListener(java.lang.String name)
Constructs a new NetworkListener using the specified name. The listener's host and
port will default to DEFAULT_NETWORK_HOST and DEFAULT_NETWORK_PORT.
name - the logical name of the listener.
public NetworkListener(java.lang.String name,
java.lang.String host)
Constructs a new NetworkListener using the specified name and host.
The listener's port will default to DEFAULT_NETWORK_PORT.
name - the logical name of the listener.host - the network host to which this listener will bind.
public NetworkListener(java.lang.String name,
java.lang.String host,
int port)
Constructs a new NetworkListener using the specified name, host, and
port.
name - the logical name of the listener.host - the network host to which this listener will bind.port - the network port to which this listener will bind..
public NetworkListener(java.lang.String name,
java.lang.String host,
PortRange portRange)
Constructs a new NetworkListener using the specified name, host, and
port.
name - the logical name of the listener.host - the network host to which this listener will bind.portRange - the network port range to which this listener will bind..| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String getHost()
public int getPort()
HttpServer has not been started yet - the returned value
may be:
-1, if PortRange will be used to bind the listener;
0, if the port will be assigned by OS;
0 < N < 65536, the port this listener will be bound to.
If HttpServer has been started - the value returned is the port the
this listener is bound to.public PortRange getPortRange()
public KeepAlive getKeepAlive()
public TCPNIOTransport getTransport()
TCPNIOTransport used by this listener.public void setTransport(TCPNIOTransport transport)
This allows the developer to specify a custom TCPNIOTransport implementation to be used by this
listener.
Attempts to change the transport implementation while the listener is running will be ignored.
transport - a custom TCPNIOTransport implementation.public AddOn[] getAddOns()
AddOns.
Please note, possible array modifications wont affect the
NetworkListener's addons list.
AddOns.protected ArraySet<AddOn> getAddOnSet()
public boolean registerAddOn(AddOn addon)
AddOn on this NetworkListener.
addon - the AddOn to be registered.
AddOn wasn't registered before,
otherwise the existing AddOn will be replaced and this method
returns false.public boolean deregisterAddOn(AddOn addon)
AddOn from this NetworkListener.
addon - the AddOn to deregister.
AddOn was successfully removed, or
false the the AddOn wasn't registered on the
NetworkListener.public boolean isChunkingEnabled()
true if the HTTP response bodies should be chunked if not content length has been explicitly
specified.public void setChunkingEnabled(boolean chunkingEnabled)
chunkingEnabled - true to enable chunking; false to disable.public boolean isSecure()
true if this is a secure listener, otherwise false. Listeners are not secure
by default.public void setSecure(boolean secure)
Enable or disable security for this listener.
Attempts to change this value while the listener is running will be ignored.
secure - if true this listener will be secure.public SSLEngineConfigurator getSslEngineConfig()
SSLEngine configuration for this listener.public void setSSLEngineConfig(SSLEngineConfigurator sslEngineConfig)
Provides customization of the SSLEngine used by this listener.
Attempts to change this value while the listener is running will be ignored.
sslEngineConfig - custom SSL configuration.public java.lang.String getCompression()
public void setCompression(java.lang.String compression)
public int getMaxHttpHeaderSize()
public void setMaxHttpHeaderSize(int maxHttpHeaderSize)
Configures the maximum header size for an HTTP request.
Attempts to change this value while the listener is running will be ignored.
maxHttpHeaderSize - the maximum header size for an HTTP request.public FilterChain getFilterChain()
FilterChain used to by the TCPNIOTransport associated with this listener.public void setFilterChain(FilterChain filterChain)
Specifies the FilterChain to be used by the TCPNIOTransport associated with this listener.
Attempts to change this value while the listener is running will be ignored.
filterChain - the FilterChain.public FileCache getFileCache()
FileCache associated with this listener.public int getMaxPendingBytes()
Connection.
If not explicitly set, the value will be -1 which effectively disables
resource enforcement.public void setMaxPendingBytes(int maxPendingBytes)
Connection.
If the value is zero or less, then no resource enforcement will take place.
maxPendingBytes - the maximum size, in bytes, of all data waiting to be written to the associated Connection.public boolean isPaused()
true if this listener has been paused, otherwise falsepublic boolean isStarted()
true if the listener has been started, otherwise false.
public void start()
throws java.io.IOException
Starts the listener.
java.io.IOException - if an error occurs when attempting to start the listener.
public void stop()
throws java.io.IOException
Stops the listener.
java.io.IOException - if an error occurs when attempting to stop the listener.
public void pause()
throws java.io.IOException
Pauses the listener.
java.io.IOException - if an error occurs when attempting to pause the listener.
public void resume()
throws java.io.IOException
Resumes a paused listener.
java.io.IOException - if an error occurs when attempting to resume the listener.public java.lang.String toString()
toString in class java.lang.Objectpublic JmxObject createManagementObject()
public HttpServerFilter getHttpServerFilter()
public HttpCodecFilter getHttpCodecFilter()
public boolean isRcmSupportEnabled()
public void setRcmSupportEnabled(boolean enabled)
public boolean isAuthPassthroughEnabled()
public void setAuthPassthroughEnabled(boolean authPassthroughEnabled)
public java.lang.String getCompressableMimeTypes()
public void setCompressableMimeTypes(java.lang.String compressableMimeTypes)
public int getCompressionMinSize()
public void setCompressionMinSize(int compressionMinSize)
public boolean isDisableUploadTimeout()
public void setDisableUploadTimeout(boolean disableUploadTimeout)
public int getMaxPostSize()
public void setMaxPostSize(int maxPostSize)
public java.lang.String getNoCompressionUserAgents()
public void setNoCompressionUserAgents(java.lang.String noCompressionUserAgents)
public java.lang.String getRestrictedUserAgents()
public void setRestrictedUserAgents(java.lang.String restrictedUserAgents)
public boolean isTraceEnabled()
public void setTraceEnabled(boolean traceEnabled)
public int getUploadTimeout()
public void setUploadTimeout(int uploadTimeout)
public java.lang.String getUriEncoding()
public void setUriEncoding(java.lang.String uriEncoding)
public int getTransactionTimeout()
public void setTransactionTimeout(int transactionTimeout)
public boolean isSendFileEnabled()
ServerFilterConfiguration.isSendFileEnabled()public void setSendFileEnabled(boolean sendFileEnabled)
ServerFilterConfiguration.setSendFileEnabled(boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||