Apache CXF API

org.apache.cxf.transports.http.configuration
Class HTTPServerPolicy

java.lang.Object
  extended by org.apache.cxf.transports.http.configuration.HTTPServerPolicy

public class HTTPServerPolicy
extends Object

Properties used for configuring a server-side HTTP prort

Java 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
protected  String cacheControl
          Most commonly used to specify no-cache, however the standard supports a dozen or so caching related directives for responses.
protected  String contentEncoding
          Specifies any additional encoding applied to the response.
protected  String contentLocation
          Specifies the URL representing the resource used to satisfy the request(e.g., to inform that default.htm document was used.)
protected  String contentType
          Specifies the MIME type used for responses.
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.
protected  String keepAliveParameters
          If KeepAlive connections are turned on, this allows sending additional parameters back to the client via the Keep-Alive header.
protected  PropertyChangeSupport propertyListener
           
protected  Long receiveTimeout
          Receive timeout in milliseconds, 0 is infinite
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').
protected  String serverType
          Specifies an optional value for the HTTP ServerType property.
protected  Boolean suppressClientReceiveErrors
          When set to false, exceptions will be thrown when an error is encountered sending a reply from to client.
protected  Boolean suppressClientSendErrors
          When set to false, exceptions will be thrown when an error is encountered receiving a request from the client.
 
Constructor Summary
HTTPServerPolicy()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
           
 String getCacheControl()
          Gets the value of the cacheControl property.
 String getContentEncoding()
          Gets the value of the contentEncoding property.
 String getContentLocation()
          Gets the value of the contentLocation property.
 String getContentType()
          Gets the value of the contentType property.
 String getKeepAliveParameters()
          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.
 long getReceiveTimeout()
          Gets the value of the receiveTimeout property.
 String getRedirectURL()
          Gets the value of the redirectURL property.
 String getServerType()
          Gets the value of the serverType property.
 boolean isHonorKeepAlive()
          Gets the value of the honorKeepAlive property.
 boolean isSetCacheControl()
           
 boolean isSetContentEncoding()
           
 boolean isSetContentLocation()
           
 boolean isSetContentType()
           
 boolean isSetHonorKeepAlive()
           
 boolean isSetKeepAliveParameters()
           
 boolean isSetReceiveTimeout()
           
 boolean isSetRedirectURL()
           
 boolean isSetServerType()
           
 boolean isSetSuppressClientReceiveErrors()
           
 boolean isSetSuppressClientSendErrors()
           
 boolean isSuppressClientReceiveErrors()
          Gets the value of the suppressClientReceiveErrors property.
 boolean isSuppressClientSendErrors()
          Gets the value of the suppressClientSendErrors property.
 void removePropertyChangeListener(PropertyChangeListener listener)
           
 void setCacheControl(String value)
          Sets the value of the cacheControl property.
 void setContentEncoding(String value)
          Sets the value of the contentEncoding property.
 void setContentLocation(String value)
          Sets the value of the contentLocation property.
 void setContentType(String value)
          Sets the value of the contentType property.
 void setHonorKeepAlive(boolean value)
          Sets the value of the honorKeepAlive property.
 void setKeepAliveParameters(String value)
          Sets the value of the keepAliveParameters property.
 void setReceiveTimeout(long value)
          Sets the value of the receiveTimeout property.
 void setRedirectURL(String value)
          Sets the value of the redirectURL property.
 void setServerType(String value)
          Sets the value of the serverType property.
 void setSuppressClientReceiveErrors(boolean value)
          Sets the value of the suppressClientReceiveErrors property.
 void setSuppressClientSendErrors(boolean value)
          Sets the value of the suppressClientSendErrors property.
 void unsetHonorKeepAlive()
           
 void unsetReceiveTimeout()
           
 void unsetSuppressClientReceiveErrors()
           
 void unsetSuppressClientSendErrors()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

HTTPServerPolicy

public HTTPServerPolicy()
Method Detail

getReceiveTimeout

public long getReceiveTimeout()
Gets the value of the receiveTimeout property.

Receive timeout in milliseconds, 0 is infinite

Returns:
possible object is Long

setReceiveTimeout

public void setReceiveTimeout(long value)
Sets the value of the receiveTimeout property.

Parameters:
value - allowed object is Long
See Also:
getReceiveTimeout()

isSetReceiveTimeout

public boolean isSetReceiveTimeout()

unsetReceiveTimeout

public void unsetReceiveTimeout()

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.

Returns:
possible object is Boolean

setSuppressClientSendErrors

public void setSuppressClientSendErrors(boolean value)
Sets the value of the suppressClientSendErrors property.

Parameters:
value - allowed object is Boolean
See Also:
isSuppressClientSendErrors()

isSetSuppressClientSendErrors

public boolean isSetSuppressClientSendErrors()

unsetSuppressClientSendErrors

public void unsetSuppressClientSendErrors()

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.

Returns:
possible object is Boolean

setSuppressClientReceiveErrors

public void setSuppressClientReceiveErrors(boolean value)
Sets the value of the suppressClientReceiveErrors property.

Parameters:
value - allowed object is Boolean
See Also:
isSuppressClientReceiveErrors()

isSetSuppressClientReceiveErrors

public boolean isSetSuppressClientReceiveErrors()

unsetSuppressClientReceiveErrors

public void unsetSuppressClientReceiveErrors()

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.

Returns:
possible object is Boolean

setHonorKeepAlive

public void setHonorKeepAlive(boolean value)
Sets the value of the honorKeepAlive property.

Parameters:
value - allowed object is Boolean
See Also:
isHonorKeepAlive()

isSetHonorKeepAlive

public boolean isSetHonorKeepAlive()

unsetHonorKeepAlive

public void unsetHonorKeepAlive()

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 is String
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 is String
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 is String
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 is String
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 is String
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 is String
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 is String
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

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)

Apache CXF API

Apache CXF