|
||||||||||
| 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 java.lang.String |
USE_SEND_FILE
|
| Constructor Summary | |
|---|---|
ServerFilterConfiguration()
|
|
ServerFilterConfiguration(java.lang.String serverName,
java.lang.String serverVersion)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getHttpServerName()
|
java.lang.String |
getHttpServerVersion()
|
boolean |
isSendFileEnabled()
Returns true if File resources may be be sent using
FileChannel.transferTo(long, long, java.nio.channels.WritableByteChannel). |
void |
setHttpServerName(java.lang.String httpServerName)
Sets the server name used for HTTP response headers and default generated error pages. |
void |
setHttpServerVersion(java.lang.String httpServerVersion)
Sets the version of the server info sent in HTTP response headers and the default generated error pages. |
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). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String USE_SEND_FILE
| Constructor Detail |
|---|
public ServerFilterConfiguration()
public ServerFilterConfiguration(java.lang.String serverName,
java.lang.String serverVersion)
| Method Detail |
|---|
public java.lang.String getHttpServerName()
public void setHttpServerName(java.lang.String httpServerName)
Grizzly.
httpServerName - server namepublic java.lang.String getHttpServerVersion()
public void setHttpServerVersion(java.lang.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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||