|
||||||||||
| 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 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(String name)
Constructs a new NetworkListener using the specified
name. |
|
NetworkListener(String name,
String host)
Constructs a new NetworkListener using the specified
name and host. |
|
NetworkListener(String name,
String host,
int port)
Constructs a new NetworkListener using the specified
name, host, and port. |
|
| Method Summary | |
|---|---|
JmxObject |
createManagementObject()
|
String |
getCompressableMimeTypes()
|
String |
getCompression()
|
int |
getCompressionMinSize()
|
Set<ContentEncoding> |
getContentEncodings()
|
FileCache |
getFileCache()
|
FilterChain |
getFilterChain()
|
String |
getHost()
|
HttpCodecFilter |
getHttpCodecFilter()
|
HttpServerFilter |
getHttpServerFilter()
|
KeepAlive |
getKeepAlive()
|
int |
getMaxHttpHeaderSize()
|
int |
getMaxPendingBytes()
|
int |
getMaxPostSize()
|
String |
getName()
|
String |
getNoCompressionUserAgents()
|
int |
getPort()
|
String |
getRestrictedUserAgents()
|
SSLEngineConfigurator |
getSslEngineConfig()
|
int |
getTransactionTimeout()
|
TCPNIOTransport |
getTransport()
|
int |
getUploadTimeout()
|
String |
getUriEncoding()
|
boolean |
isAuthPassthroughEnabled()
|
boolean |
isChunkingEnabled()
|
boolean |
isDisableUploadTimeout()
|
boolean |
isPaused()
|
boolean |
isRcmSupportEnabled()
|
boolean |
isSecure()
|
boolean |
isStarted()
|
boolean |
isTraceEnabled()
|
boolean |
isWebSocketsEnabled()
|
void |
pause()
Pauses the listener. |
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(String compressableMimeTypes)
|
void |
setCompression(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(String noCompressionUserAgents)
|
void |
setRcmSupportEnabled(boolean enabled)
|
void |
setRestrictedUserAgents(String restrictedUserAgents)
|
void |
setSecure(boolean secure)
Enable or disable security for this listener. |
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(String uriEncoding)
|
void |
setWebSocketsEnabled(boolean webSocketsEnabled)
Enables/disables Web Sockets support for this listener. |
void |
start()
Starts the listener. |
void |
stop()
Stops the listener. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final 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(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(String name,
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(String name,
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..| Method Detail |
|---|
public String getName()
public String getHost()
public int getPort()
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 boolean isWebSocketsEnabled()
true if Web Sockets is enabled, otherwise,
returns false.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 void setWebSocketsEnabled(boolean webSocketsEnabled)
webSocketsEnabled - true if Web Sockets support
should be enabled.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 int getMaxHttpHeaderSize()
public String getCompression()
public void setCompression(String compression)
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 Set<ContentEncoding> getContentEncodings()
ContentEncodings.public int getMaxPendingBytes()
Connection.public void setMaxPendingBytes(int maxPendingBytes)
Connection.
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 IOException
Starts the listener.
IOException - if an error occurs when attempting to start the
listener.
public void stop()
throws IOException
Stops the listener.
IOException - if an error occurs when attempting to stop
the listener.
public void pause()
throws IOException
Pauses the listener.
IOException - if an error occurs when attempting to pause the
listener.
public void resume()
throws IOException
Resumes a paused listener.
IOException - if an error occurs when attempting to resume the
listener.public String toString()
toString in class 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 void setMaxPostSize(int maxPostSize)
public void setCompressableMimeTypes(String compressableMimeTypes)
public void setNoCompressionUserAgents(String noCompressionUserAgents)
public void setCompressionMinSize(int compressionMinSize)
public void setRestrictedUserAgents(String restrictedUserAgents)
public void setUploadTimeout(int uploadTimeout)
public void setDisableUploadTimeout(boolean disableUploadTimeout)
public void setTraceEnabled(boolean traceEnabled)
public void setUriEncoding(String uriEncoding)
public String getCompressableMimeTypes()
public int getCompressionMinSize()
public boolean isDisableUploadTimeout()
public int getMaxPostSize()
public String getNoCompressionUserAgents()
public String getRestrictedUserAgents()
public boolean isTraceEnabled()
public int getUploadTimeout()
public String getUriEncoding()
public int getTransactionTimeout()
public void setTransactionTimeout(int transactionTimeout)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||