|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.http.server.ServerFilterConfiguration
public class ServerFilterConfiguration
HttpServerFilter configuration.
| Field Summary | |
|---|---|
static int |
MAX_REQUEST_PARAMETERS
|
static String |
USE_SEND_FILE
|
| Constructor Summary | |
|---|---|
ServerFilterConfiguration()
|
|
ServerFilterConfiguration(ServerFilterConfiguration configuration)
|
|
ServerFilterConfiguration(String serverName,
String serverVersion)
|
|
| Method Summary | |
|---|---|
String |
getHttpServerName()
|
String |
getHttpServerVersion()
|
int |
getMaxRequestParameters()
Returns the maximum number of parameters allowed per request. |
String |
getScheme()
Get the HTTP request scheme, which if non-null overrides default one picked up by framework during runtime. |
boolean |
isPassTraceRequest()
|
boolean |
isSendFileEnabled()
Returns true if File resources may be be sent using
FileChannel.transferTo(long, long, java.nio.channels.WritableByteChannel). |
boolean |
isTraceEnabled()
|
void |
setHttpServerName(String httpServerName)
Sets the server name used for HTTP response headers and default generated error pages. |
void |
setHttpServerVersion(String httpServerVersion)
Sets the version of the server info sent in HTTP response headers and the default generated error pages. |
void |
setMaxRequestParameters(int maxRequestParameters)
Sets the maximum number of parameters allowed for a request. |
void |
setPassTraceRequest(boolean passTraceRequest)
If passTraceRequest is true, the TRACE request will be passed to the registered HttpHandlers. |
void |
setScheme(String scheme)
Set the HTTP request scheme, which if non-null overrides default one picked up by framework during runtime. |
void |
setSendFileEnabled(boolean sendFileEnabled)
Configure whether or sendfile support will enabled which allows sending File resources via FileChannel.transferTo(long, long, java.nio.channels.WritableByteChannel). |
void |
setTraceEnabled(boolean enabled)
If enabled is true the TRACE method will be respected and a proper response will be generated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_REQUEST_PARAMETERS
public static final String USE_SEND_FILE
| Constructor Detail |
|---|
public ServerFilterConfiguration()
public ServerFilterConfiguration(String serverName,
String serverVersion)
public ServerFilterConfiguration(ServerFilterConfiguration configuration)
| Method Detail |
|---|
public String getHttpServerName()
public void setHttpServerName(String httpServerName)
Grizzly.
httpServerName - server namepublic String getHttpServerVersion()
public void setHttpServerVersion(String httpServerVersion)
httpServerVersion - server versionpublic boolean isSendFileEnabled()
Returns true if File resources may be be sent using
FileChannel.transferTo(long, long, java.nio.channels.WritableByteChannel).
By default, this property will be true, except in the following cases:
This logic can be overridden by explicitly setting the property via
setSendFileEnabled(boolean) or by specifying the system property
"org.glassfish.grizzly.http.USE_SEND_FILE" with a value of true
Finally, if the connection between endpoints is secure, send file functionality will be disabled regardless of configuration.
true if resources will be sent using
FileChannel.transferTo(long, long, java.nio.channels.WritableByteChannel).public void setSendFileEnabled(boolean sendFileEnabled)
File resources via FileChannel.transferTo(long, long, java.nio.channels.WritableByteChannel).
If disabled, the more traditional byte[] copy will be used to send content.
sendFileEnabled - true to enable FileChannel.transferTo(long, long, java.nio.channels.WritableByteChannel)
support.public String getScheme()
public void setScheme(String scheme)
scheme - the HTTP request schemepublic boolean isPassTraceRequest()
HttpHandlers, otherwise false if the
TRACE request will be handled by Grizzly.public void setPassTraceRequest(boolean passTraceRequest)
HttpHandlers. Otherwise,
TRACE will be handled by Grizzly.
By default, TRACE requests will be handled by Grizzly.
passTraceRequest - boolean to configure if trace requests will
be handled by Grizzly or by a configured
HttpHandler.public boolean isTraceEnabled()
public void setTraceEnabled(boolean enabled)
setPassTraceRequest(false)
has been called.
enabled - boolean to configure how grizzly handles TRACE requestspublic int getMaxRequestParameters()
public void setMaxRequestParameters(int maxRequestParameters)
maxRequestParameters - the maximum number of parameters.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||