Class HTTPServerPolicy
- java.lang.Object
-
- org.apache.cxf.transports.http.configuration.HTTPServerPolicy
-
public class HTTPServerPolicy extends Object
Properties used for configuring a server-side HTTP prortJava class for HTTPServerPolicy complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="HTTPServerPolicy"> <complexContent> <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> </sequence> <attribute name="ReceiveTimeout" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" default="30000" /> <attribute name="SuppressClientSendErrors" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> <attribute name="SuppressClientReceiveErrors" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> <attribute name="HonorKeepAlive" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" /> <attribute name="KeepAliveParameters" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="RedirectURL" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="CacheControl" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="ContentLocation" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="ContentType" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="ContentEncoding" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="ServerType" type="{http://www.w3.org/2001/XMLSchema}string" /> <anyAttribute namespace='http://schemas.xmlsoap.org/wsdl/'/> </restriction> </complexContent> </complexType>
-
-
Field Summary
Fields Modifier and Type Field Description protected StringcacheControlMost commonly used to specify no-cache, however the standard supports a dozen or so caching related directives for responses.protected StringcontentEncodingSpecifies any additional encoding applied to the response.protected StringcontentLocationSpecifies the URL representing the resource used to satisfy the request(e.g., to inform that default.htm document was used.)protected StringcontentTypeSpecifies the MIME type used for responses.protected BooleanhonorKeepAliveWhen set to true, the request socket will remain open after the reply is sent to the client, if the client has requested keep-alive and is using at least version 1.1 of HTTP.protected StringkeepAliveParametersIf KeepAlive connections are turned on, this allows sending additional parameters back to the client via the Keep-Alive header.protected PropertyChangeSupportpropertyListenerprotected LongreceiveTimeoutReceive timeout in milliseconds, 0 is infiniteprotected StringredirectURLA URL to which clients are redirected (if the ReplyCode and ReplyDescription are not set, ReplyCode will be set to 302, and ReplyDescription will be set to 'Object Moved').protected StringserverTypeSpecifies an optional value for the HTTP ServerType property.protected BooleansuppressClientReceiveErrorsWhen set to false, exceptions will be thrown when an error is encountered sending a reply from to client.protected BooleansuppressClientSendErrorsWhen set to false, exceptions will be thrown when an error is encountered receiving a request from the client.
-
Constructor Summary
Constructors Constructor Description HTTPServerPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(PropertyChangeListener listener)StringgetCacheControl()Gets the value of the cacheControl property.StringgetContentEncoding()Gets the value of the contentEncoding property.StringgetContentLocation()Gets the value of the contentLocation property.StringgetContentType()Gets the value of the contentType property.StringgetKeepAliveParameters()Gets the value of the keepAliveParameters property.Map<QName,String>getOtherAttributes()Gets a map that contains attributes that aren't bound to any typed property on this class.longgetReceiveTimeout()Gets the value of the receiveTimeout property.StringgetRedirectURL()Gets the value of the redirectURL property.StringgetServerType()Gets the value of the serverType property.booleanisHonorKeepAlive()Gets the value of the honorKeepAlive property.booleanisSetCacheControl()booleanisSetContentEncoding()booleanisSetContentLocation()booleanisSetContentType()booleanisSetHonorKeepAlive()booleanisSetKeepAliveParameters()booleanisSetReceiveTimeout()booleanisSetRedirectURL()booleanisSetServerType()booleanisSetSuppressClientReceiveErrors()booleanisSetSuppressClientSendErrors()booleanisSuppressClientReceiveErrors()Gets the value of the suppressClientReceiveErrors property.booleanisSuppressClientSendErrors()Gets the value of the suppressClientSendErrors property.voidremovePropertyChangeListener(PropertyChangeListener listener)voidsetCacheControl(String value)Sets the value of the cacheControl property.voidsetContentEncoding(String value)Sets the value of the contentEncoding property.voidsetContentLocation(String value)Sets the value of the contentLocation property.voidsetContentType(String value)Sets the value of the contentType property.voidsetHonorKeepAlive(boolean value)Sets the value of the honorKeepAlive property.voidsetKeepAliveParameters(String value)Sets the value of the keepAliveParameters property.voidsetReceiveTimeout(long value)Sets the value of the receiveTimeout property.voidsetRedirectURL(String value)Sets the value of the redirectURL property.voidsetServerType(String value)Sets the value of the serverType property.voidsetSuppressClientReceiveErrors(boolean value)Sets the value of the suppressClientReceiveErrors property.voidsetSuppressClientSendErrors(boolean value)Sets the value of the suppressClientSendErrors property.voidunsetHonorKeepAlive()voidunsetReceiveTimeout()voidunsetSuppressClientReceiveErrors()voidunsetSuppressClientSendErrors()
-
-
-
Field Detail
-
receiveTimeout
protected Long receiveTimeout
Receive timeout in milliseconds, 0 is infinite
-
suppressClientSendErrors
protected Boolean suppressClientSendErrors
When set to false, exceptions will be thrown when an error is encountered receiving a request from the client. When set to true these errors will be suppressed. The default is false.
-
suppressClientReceiveErrors
protected Boolean suppressClientReceiveErrors
When set to false, exceptions will be thrown when an error is encountered sending a reply from to client. When set to true these errors will be suppressed. The default is false.
-
honorKeepAlive
protected Boolean honorKeepAlive
When set to true, the request socket will remain open after the reply is sent to the client, if the client has requested keep-alive and is using at least version 1.1 of HTTP. If set to false, the socket will be closed after each reply is sent, even if the client requests the server to keep the connection alive. Keep-Alive improves performance for the client requesting such behavior, but can limit overall scalability of the server for handling many clients. The Default is true.
-
keepAliveParameters
protected String keepAliveParameters
If KeepAlive connections are turned on, this allows sending additional parameters back to the client via the Keep-Alive header. Common parameters are timeout and max to specify how long the client should hold open the connection and how many connections to hold open. Different clients may have different defaults. For Java HTTPUrlConnection, the defaults would be timeout=5, max=5 Example: timeout=60, max=5;
-
redirectURL
protected String redirectURL
A URL to which clients are redirected (if the ReplyCode and ReplyDescription are not set, ReplyCode will be set to 302, and ReplyDescription will be set to 'Object Moved').
-
cacheControl
protected String cacheControl
Most commonly used to specify no-cache, however the standard supports a dozen or so caching related directives for responses.
-
contentLocation
protected String contentLocation
Specifies the URL representing the resource used to satisfy the request(e.g., to inform that default.htm document was used.)
-
contentType
protected String contentType
Specifies the MIME type used for responses. The default is set by the binding.
-
contentEncoding
protected String contentEncoding
Specifies any additional encoding applied to the response. Values are specified using IANA labels.
-
serverType
protected String serverType
Specifies an optional value for the HTTP ServerType property.
-
propertyListener
protected PropertyChangeSupport propertyListener
-
-
Method Detail
-
getKeepAliveParameters
public String getKeepAliveParameters()
Gets the value of the keepAliveParameters property.If KeepAlive connections are turned on, this allows sending additional parameters back to the client via the Keep-Alive header. Common parameters are timeout and max to specify how long the client should hold open the connection and how many connections to hold open. Different clients may have different defaults. For Java HTTPUrlConnection, the defaults would be timeout=5, max=5 Example: timeout=60, max=5;
- Returns:
- possible object is
String
-
setKeepAliveParameters
public void setKeepAliveParameters(String value)
Sets the value of the keepAliveParameters property.- Parameters:
value- allowed object isString- See Also:
getKeepAliveParameters()
-
isSetKeepAliveParameters
public boolean isSetKeepAliveParameters()
-
getRedirectURL
public String getRedirectURL()
Gets the value of the redirectURL property.A URL to which clients are redirected (if the ReplyCode and ReplyDescription are not set, ReplyCode will be set to 302, and ReplyDescription will be set to 'Object Moved').
- Returns:
- possible object is
String
-
setRedirectURL
public void setRedirectURL(String value)
Sets the value of the redirectURL property.- Parameters:
value- allowed object isString- See Also:
getRedirectURL()
-
isSetRedirectURL
public boolean isSetRedirectURL()
-
getCacheControl
public String getCacheControl()
Gets the value of the cacheControl property.Most commonly used to specify no-cache, however the standard supports a dozen or so caching related directives for responses.
- Returns:
- possible object is
String
-
setCacheControl
public void setCacheControl(String value)
Sets the value of the cacheControl property.- Parameters:
value- allowed object isString- See Also:
getCacheControl()
-
isSetCacheControl
public boolean isSetCacheControl()
-
getContentLocation
public String getContentLocation()
Gets the value of the contentLocation property.Specifies the URL representing the resource used to satisfy the request(e.g., to inform that default.htm document was used.)
- Returns:
- possible object is
String
-
setContentLocation
public void setContentLocation(String value)
Sets the value of the contentLocation property.- Parameters:
value- allowed object isString- See Also:
getContentLocation()
-
isSetContentLocation
public boolean isSetContentLocation()
-
getContentType
public String getContentType()
Gets the value of the contentType property.Specifies the MIME type used for responses. The default is set by the binding.
- Returns:
- possible object is
String
-
setContentType
public void setContentType(String value)
Sets the value of the contentType property.- Parameters:
value- allowed object isString- See Also:
getContentType()
-
isSetContentType
public boolean isSetContentType()
-
getContentEncoding
public String getContentEncoding()
Gets the value of the contentEncoding property.Specifies any additional encoding applied to the response. Values are specified using IANA labels.
- Returns:
- possible object is
String
-
setContentEncoding
public void setContentEncoding(String value)
Sets the value of the contentEncoding property.- Parameters:
value- allowed object isString- See Also:
getContentEncoding()
-
isSetContentEncoding
public boolean isSetContentEncoding()
-
getServerType
public String getServerType()
Gets the value of the serverType property.Specifies an optional value for the HTTP ServerType property.
- Returns:
- possible object is
String
-
setServerType
public void setServerType(String value)
Sets the value of the serverType property.- Parameters:
value- allowed object isString- See Also:
getServerType()
-
isSetServerType
public boolean isSetServerType()
-
getOtherAttributes
public Map<QName,String> getOtherAttributes()
Gets a map that contains attributes that aren't bound to any typed property on this class.the map is keyed by the name of the attribute and the value is the string value of the attribute. the map returned by this method is live, and you can add new attribute by updating the map directly. Because of this design, there's no setter.
- Returns:
- always non-null
-
setReceiveTimeout
public void setReceiveTimeout(long value)
Sets the value of the receiveTimeout property.- See Also:
getReceiveTimeout()
-
unsetReceiveTimeout
public void unsetReceiveTimeout()
-
isSetReceiveTimeout
public boolean isSetReceiveTimeout()
-
getReceiveTimeout
public long getReceiveTimeout()
Gets the value of the receiveTimeout property.Receive timeout in milliseconds, 0 is infinite
-
setSuppressClientSendErrors
public void setSuppressClientSendErrors(boolean value)
Sets the value of the suppressClientSendErrors property.- See Also:
isSuppressClientSendErrors()
-
unsetSuppressClientSendErrors
public void unsetSuppressClientSendErrors()
-
isSetSuppressClientSendErrors
public boolean isSetSuppressClientSendErrors()
-
isSuppressClientSendErrors
public boolean isSuppressClientSendErrors()
Gets the value of the suppressClientSendErrors property.When set to false, exceptions will be thrown when an error is encountered receiving a request from the client. When set to true these errors will be suppressed. The default is false.
-
setSuppressClientReceiveErrors
public void setSuppressClientReceiveErrors(boolean value)
Sets the value of the suppressClientReceiveErrors property.- See Also:
isSuppressClientReceiveErrors()
-
unsetSuppressClientReceiveErrors
public void unsetSuppressClientReceiveErrors()
-
isSetSuppressClientReceiveErrors
public boolean isSetSuppressClientReceiveErrors()
-
isSuppressClientReceiveErrors
public boolean isSuppressClientReceiveErrors()
Gets the value of the suppressClientReceiveErrors property.When set to false, exceptions will be thrown when an error is encountered sending a reply from to client. When set to true these errors will be suppressed. The default is false.
-
setHonorKeepAlive
public void setHonorKeepAlive(boolean value)
Sets the value of the honorKeepAlive property.- See Also:
isHonorKeepAlive()
-
unsetHonorKeepAlive
public void unsetHonorKeepAlive()
-
isSetHonorKeepAlive
public boolean isSetHonorKeepAlive()
-
isHonorKeepAlive
public boolean isHonorKeepAlive()
Gets the value of the honorKeepAlive property.When set to true, the request socket will remain open after the reply is sent to the client, if the client has requested keep-alive and is using at least version 1.1 of HTTP. If set to false, the socket will be closed after each reply is sent, even if the client requests the server to keep the connection alive. Keep-Alive improves performance for the client requesting such behavior, but can limit overall scalability of the server for handling many clients. The Default is true.
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
-
-