|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cxf.transports.http.configuration.HTTPClientPolicy
public class HTTPClientPolicy
Properties used to configure a client-side HTTP port
Java class for HTTPClientPolicy complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="HTTPClientPolicy"> <complexContent> <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> </sequence> <attribute name="ConnectionTimeout" type="{http://cxf.apache.org/configuration/parameterized-types}ParameterizedUInt" default="30000" /> <attribute name="ReceiveTimeout" type="{http://cxf.apache.org/configuration/parameterized-types}ParameterizedUInt" default="60000" /> <attribute name="AsyncExecuteTimeout" type="{http://cxf.apache.org/configuration/parameterized-types}ParameterizedUInt" default="5000" /> <attribute name="AsyncExecuteTimeoutRejection" type="{http://cxf.apache.org/configuration/parameterized-types}ParameterizedBoolean" default="false" /> <attribute name="AutoRedirect" type="{http://cxf.apache.org/configuration/parameterized-types}ParameterizedBoolean" default="false" /> <attribute name="MaxRetransmits" type="{http://cxf.apache.org/configuration/parameterized-types}ParameterizedInt" default="-1" /> <attribute name="AllowChunking" type="{http://cxf.apache.org/configuration/parameterized-types}ParameterizedBoolean" default="true" /> <attribute name="ChunkingThreshold" type="{http://cxf.apache.org/configuration/parameterized-types}ParameterizedInt" default="4096" /> <attribute name="ChunkLength" type="{http://cxf.apache.org/configuration/parameterized-types}ParameterizedInt" default="-1" /> <attribute name="Accept" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="AcceptLanguage" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="AcceptEncoding" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="ContentType" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="Host" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="Connection" type="{http://cxf.apache.org/transports/http/configuration}connectionType" default="Keep-Alive" /> <attribute name="CacheControl" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="Cookie" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="BrowserType" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="Referer" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="DecoupledEndpoint" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="ProxyServer" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="ProxyServerPort" type="{http://cxf.apache.org/configuration/parameterized-types}ParameterizedInt" /> <attribute name="NonProxyHosts" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="ProxyServerType" type="{http://cxf.apache.org/transports/http/configuration}proxyServerType" default="HTTP" /> <anyAttribute namespace='http://schemas.xmlsoap.org/wsdl/'/> </restriction> </complexContent> </complexType>
Field Summary | |
---|---|
protected String |
accept
Specifies the MIME types the client is prepared to handle (e.g., HTML, JPEG, GIF, etc.) |
protected String |
acceptEncoding
Specifies the encoding the client is prepared to handle (e.g., gzip) |
protected String |
acceptLanguage
Specifies the language the client desires (e.g., English, French, etc.) |
protected Boolean |
allowChunking
If true, the client is free to use chunking streams if it wants, but it is not required to use chunking streams. |
protected Long |
asyncExecuteTimeout
Specifies the amount of time, in milliseconds, that a conduit will try and enqueue the response on the workqueue. |
protected Boolean |
asyncExecuteTimeoutRejection
Specifies whether the conduit should throw and exception if it fails to enqueue the async response handling onto the workqueue. |
protected Boolean |
autoRedirect
Specifies if the consumer will automatically follow a server issued redirection. |
protected String |
browserType
aka User-Agent Specifies the type of browser is sending the request. |
protected String |
cacheControl
Most commonly used to specify no-cache, however the standard supports a dozen or so caching related directives for requests |
protected Integer |
chunkingThreshold
If AllowChunking is true, this sets the threshold at which messages start getting chunked. |
protected Integer |
chunkLength
Specifies the chunk length for a HttpURLConnection. |
protected ConnectionType |
connection
The connection disposition. |
protected Long |
connectionTimeout
Specifies the amount of time, in milliseconds, that the consumer will attempt to establish a connection before it times out. |
protected String |
contentType
Specifies the content type of the stream being sent in a post request. |
protected String |
cookie
Specifies a cookie to send to the server. |
protected String |
decoupledEndpoint
Specifies the URL of a decoupled endpoint for the receipt of responses over a separate provider->consumer connection. |
protected String |
host
Specifies the Internet host and port number of the resource on which the request is being invoked. |
protected Integer |
maxRetransmits
Specifies the maximum amount of retransmits that are allowed for redirects. |
protected String |
nonProxyHosts
Specifies the list of hostnames that will not use the proxy configuration. |
protected PropertyChangeSupport |
propertyListener
|
protected String |
proxyServer
Specifies the address of proxy server if one is used. |
protected Integer |
proxyServerPort
Specifies the port number used by the proxy server. |
protected ProxyServerType |
proxyServerType
Specifies the type of the proxy server. |
protected Long |
receiveTimeout
Specifies the amount of time, in milliseconds, that the consumer will wait for a response before it times out. |
protected String |
referer
Specifies the URL that referred us to this URL. |
Constructor Summary | |
---|---|
HTTPClientPolicy()
|
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
|
String |
getAccept()
Gets the value of the accept property. |
String |
getAcceptEncoding()
Gets the value of the acceptEncoding property. |
String |
getAcceptLanguage()
Gets the value of the acceptLanguage property. |
long |
getAsyncExecuteTimeout()
Gets the value of the asyncExecuteTimeout property. |
String |
getBrowserType()
Gets the value of the browserType property. |
String |
getCacheControl()
Gets the value of the cacheControl property. |
int |
getChunkingThreshold()
Gets the value of the chunkingThreshold property. |
int |
getChunkLength()
Gets the value of the chunkLength property. |
ConnectionType |
getConnection()
Gets the value of the connection property. |
long |
getConnectionTimeout()
Gets the value of the connectionTimeout property. |
String |
getContentType()
Gets the value of the contentType property. |
String |
getCookie()
Gets the value of the cookie property. |
String |
getDecoupledEndpoint()
Gets the value of the decoupledEndpoint property. |
String |
getHost()
Gets the value of the host property. |
int |
getMaxRetransmits()
Gets the value of the maxRetransmits property. |
String |
getNonProxyHosts()
Gets the value of the nonProxyHosts property. |
Map<QName,String> |
getOtherAttributes()
Gets a map that contains attributes that aren't bound to any typed property on this class. |
String |
getProxyServer()
Gets the value of the proxyServer property. |
int |
getProxyServerPort()
Gets the value of the proxyServerPort property. |
ProxyServerType |
getProxyServerType()
Gets the value of the proxyServerType property. |
long |
getReceiveTimeout()
Gets the value of the receiveTimeout property. |
String |
getReferer()
Gets the value of the referer property. |
boolean |
isAllowChunking()
Gets the value of the allowChunking property. |
boolean |
isAsyncExecuteTimeoutRejection()
Gets the value of the asyncExecuteTimeoutRejection property. |
boolean |
isAutoRedirect()
Gets the value of the autoRedirect property. |
boolean |
isSetAccept()
|
boolean |
isSetAcceptEncoding()
|
boolean |
isSetAcceptLanguage()
|
boolean |
isSetAllowChunking()
|
boolean |
isSetAsyncExecuteTimeout()
|
boolean |
isSetAsyncExecuteTimeoutRejection()
|
boolean |
isSetAutoRedirect()
|
boolean |
isSetBrowserType()
|
boolean |
isSetCacheControl()
|
boolean |
isSetChunkingThreshold()
|
boolean |
isSetChunkLength()
|
boolean |
isSetConnection()
|
boolean |
isSetConnectionTimeout()
|
boolean |
isSetContentType()
|
boolean |
isSetCookie()
|
boolean |
isSetDecoupledEndpoint()
|
boolean |
isSetHost()
|
boolean |
isSetMaxRetransmits()
|
boolean |
isSetNonProxyHosts()
|
boolean |
isSetProxyServer()
|
boolean |
isSetProxyServerPort()
|
boolean |
isSetProxyServerType()
|
boolean |
isSetReceiveTimeout()
|
boolean |
isSetReferer()
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
|
void |
setAccept(String value)
Sets the value of the accept property. |
void |
setAcceptEncoding(String value)
Sets the value of the acceptEncoding property. |
void |
setAcceptLanguage(String value)
Sets the value of the acceptLanguage property. |
void |
setAllowChunking(boolean value)
Sets the value of the allowChunking property. |
void |
setAsyncExecuteTimeout(long value)
Sets the value of the asyncExecuteTimeout property. |
void |
setAsyncExecuteTimeoutRejection(boolean value)
Sets the value of the asyncExecuteTimeoutRejection property. |
void |
setAutoRedirect(boolean value)
Sets the value of the autoRedirect property. |
void |
setBrowserType(String value)
Sets the value of the browserType property. |
void |
setCacheControl(String value)
Sets the value of the cacheControl property. |
void |
setChunkingThreshold(int value)
Sets the value of the chunkingThreshold property. |
void |
setChunkLength(int value)
Sets the value of the chunkLength property. |
void |
setConnection(ConnectionType value)
Sets the value of the connection property. |
void |
setConnectionTimeout(long value)
Sets the value of the connectionTimeout property. |
void |
setContentType(String value)
Sets the value of the contentType property. |
void |
setCookie(String value)
Sets the value of the cookie property. |
void |
setDecoupledEndpoint(String value)
Sets the value of the decoupledEndpoint property. |
void |
setHost(String value)
Sets the value of the host property. |
void |
setMaxRetransmits(int value)
Sets the value of the maxRetransmits property. |
void |
setNonProxyHosts(String value)
Sets the value of the nonProxyHosts property. |
void |
setProxyServer(String value)
Sets the value of the proxyServer property. |
void |
setProxyServerPort(int value)
Sets the value of the proxyServerPort property. |
void |
setProxyServerType(ProxyServerType value)
Sets the value of the proxyServerType property. |
void |
setReceiveTimeout(long value)
Sets the value of the receiveTimeout property. |
void |
setReferer(String value)
Sets the value of the referer property. |
void |
unsetAllowChunking()
|
void |
unsetAsyncExecuteTimeout()
|
void |
unsetAsyncExecuteTimeoutRejection()
|
void |
unsetAutoRedirect()
|
void |
unsetChunkingThreshold()
|
void |
unsetChunkLength()
|
void |
unsetConnectionTimeout()
|
void |
unsetMaxRetransmits()
|
void |
unsetProxyServerPort()
|
void |
unsetReceiveTimeout()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Long connectionTimeout
protected Long receiveTimeout
protected Long asyncExecuteTimeout
protected Boolean asyncExecuteTimeoutRejection
protected Boolean autoRedirect
protected Integer maxRetransmits
protected Boolean allowChunking
protected Integer chunkingThreshold
protected Integer chunkLength
protected String accept
protected String acceptLanguage
protected String acceptEncoding
protected String contentType
protected String host
protected ConnectionType connection
protected String cacheControl
protected String cookie
protected String browserType
protected String referer
protected String decoupledEndpoint
protected String proxyServer
protected Integer proxyServerPort
protected String nonProxyHosts
protected ProxyServerType proxyServerType
protected PropertyChangeSupport propertyListener
Constructor Detail |
---|
public HTTPClientPolicy()
Method Detail |
---|
public String getAccept()
Specifies the MIME types the client is prepared to handle (e.g., HTML, JPEG, GIF, etc.)
String
public void setAccept(String value)
value
- allowed object is
String
getAccept()
public boolean isSetAccept()
public String getAcceptLanguage()
Specifies the language the client desires (e.g., English, French, etc.)
String
public void setAcceptLanguage(String value)
value
- allowed object is
String
getAcceptLanguage()
public boolean isSetAcceptLanguage()
public String getAcceptEncoding()
Specifies the encoding the client is prepared to handle (e.g., gzip)
String
public void setAcceptEncoding(String value)
value
- allowed object is
String
getAcceptEncoding()
public boolean isSetAcceptEncoding()
public String getContentType()
Specifies the content type of the stream being sent in a post request. (this should be text/xml for web services, or can be set to application/x-www-form-urlencoded if the client is sending form data).
String
public void setContentType(String value)
value
- allowed object is
String
getContentType()
public boolean isSetContentType()
public String getHost()
Specifies the Internet host and port number of the resource on which the request is being invoked. This is sent by default based upon the URL. Certain DNS scenarios or application designs may request you to set this, but typically it is not required.
String
public void setHost(String value)
value
- allowed object is
String
getHost()
public boolean isSetHost()
public void setConnection(ConnectionType value)
value
- allowed object is
ConnectionType
getConnection()
public boolean isSetConnection()
public String getCacheControl()
Most commonly used to specify no-cache, however the standard supports a dozen or so caching related directives for requests
String
public void setCacheControl(String value)
value
- allowed object is
String
getCacheControl()
public boolean isSetCacheControl()
public String getCookie()
Specifies a cookie to send to the server. Some stateful session designs will use cookies to identify a session. If the cookie is static, you can supply it here. If it is dynamic, it will need to be set by the server on first access, and can be handled automatically by the runtime.
String
public void setCookie(String value)
value
- allowed object is
String
getCookie()
public boolean isSetCookie()
public String getBrowserType()
aka User-Agent Specifies the type of browser is sending the request. This is usually only needed when sites have HTML customized to Netscape vs IE, etc, but can also be used to optimize for different SOAP stacks.
String
public void setBrowserType(String value)
value
- allowed object is
String
getBrowserType()
public boolean isSetBrowserType()
public String getReferer()
Specifies the URL that referred us to this URL. This is sent automatically with auto redirect. May allow the server to optimize processing based upon previous task flow. However, typically not used in web services applications.
String
public void setReferer(String value)
value
- allowed object is
String
getReferer()
public boolean isSetReferer()
public String getDecoupledEndpoint()
Specifies the URL of a decoupled endpoint for the receipt of responses over a separate provider->consumer connection.
String
public void setDecoupledEndpoint(String value)
value
- allowed object is
String
getDecoupledEndpoint()
public boolean isSetDecoupledEndpoint()
public String getProxyServer()
Specifies the address of proxy server if one is used.
String
public void setProxyServer(String value)
value
- allowed object is
String
getProxyServer()
public boolean isSetProxyServer()
public String getNonProxyHosts()
Specifies the list of hostnames that will not use the proxy configuration. Examples of value: * "localhost" -> A single hostname * "localhost|www.google.com" -> 2 hostnames that will not use the proxy configuration * "localhost|www.google.*|*.apache.org" -> It's also possible to use a pattern-like value
String
public void setNonProxyHosts(String value)
value
- allowed object is
String
getNonProxyHosts()
public boolean isSetNonProxyHosts()
public void setProxyServerType(ProxyServerType value)
value
- allowed object is
ProxyServerType
getProxyServerType()
public boolean isSetProxyServerType()
public Map<QName,String> getOtherAttributes()
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.
public void setConnectionTimeout(long value)
getConnectionTimeout()
public void unsetConnectionTimeout()
public boolean isSetConnectionTimeout()
public long getConnectionTimeout()
Specifies the amount of time, in milliseconds, that the consumer will attempt to establish a connection before it times out. 0 is infinite.
public void setReceiveTimeout(long value)
getReceiveTimeout()
public void unsetReceiveTimeout()
public boolean isSetReceiveTimeout()
public long getReceiveTimeout()
Specifies the amount of time, in milliseconds, that the consumer will wait for a response before it times out. 0 is infinite.
public void setAsyncExecuteTimeout(long value)
getAsyncExecuteTimeout()
public void unsetAsyncExecuteTimeout()
public boolean isSetAsyncExecuteTimeout()
public long getAsyncExecuteTimeout()
Specifies the amount of time, in milliseconds, that a conduit will try and enqueue the response on the workqueue.
public void setAsyncExecuteTimeoutRejection(boolean value)
isAsyncExecuteTimeoutRejection()
public void unsetAsyncExecuteTimeoutRejection()
public boolean isSetAsyncExecuteTimeoutRejection()
public boolean isAsyncExecuteTimeoutRejection()
Specifies whether the conduit should throw and exception if it fails to enqueue the async response handling onto the workqueue. By default, if the conduit fails to enqueue the response handling on the workqueue, it will process the response on the current thread. Set this to true to raise and exception instead.
public void setAutoRedirect(boolean value)
isAutoRedirect()
public void unsetAutoRedirect()
public boolean isSetAutoRedirect()
public boolean isAutoRedirect()
Specifies if the consumer will automatically follow a server issued redirection. (name is not part of standard)
public void setMaxRetransmits(int value)
getMaxRetransmits()
public void unsetMaxRetransmits()
public boolean isSetMaxRetransmits()
public int getMaxRetransmits()
Specifies the maximum amount of retransmits that are allowed for redirects. Retransmits for authorization is included in the retransmit count. Each redirect may cause another retransmit for a UNAUTHORIZED response code, ie. 401. Any negative number indicates unlimited retransmits, although, loop protection is provided. The default is unlimited. (name is not part of standard)
public void setAllowChunking(boolean value)
isAllowChunking()
public void unsetAllowChunking()
public boolean isSetAllowChunking()
public boolean isAllowChunking()
If true, the client is free to use chunking streams if it wants, but it is not required to use chunking streams. If false, the client must use regular, non-chunked requests in all cases.
public void setChunkingThreshold(int value)
getChunkingThreshold()
public void unsetChunkingThreshold()
public boolean isSetChunkingThreshold()
public int getChunkingThreshold()
If AllowChunking is true, this sets the threshold at which messages start getting chunked. Messages under this limit do not get chunked.
public void setChunkLength(int value)
getChunkLength()
public void unsetChunkLength()
public boolean isSetChunkLength()
public int getChunkLength()
Specifies the chunk length for a HttpURLConnection. This value is used in java.net.HttpURLConnection.setChunkedStreamingMode(int chunklen). chunklen indicates the number of bytes to write in each chunk. If chunklen is less than or equal to zero, a default value will be used.
public ConnectionType getConnection()
The connection disposition. If close the connection to the server is closed after each request/response dialog. If Keep-Alive the client requests the server to keep the connection open, and if the server honors the keep alive request, the connection is reused. Many servers and proxies do not honor keep-alive requests.
public void setProxyServerPort(int value)
getProxyServerPort()
public void unsetProxyServerPort()
public boolean isSetProxyServerPort()
public int getProxyServerPort()
Specifies the port number used by the proxy server.
public ProxyServerType getProxyServerType()
Specifies the type of the proxy server. Can be either HTTP or SOCKS.
public void addPropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener listener)
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |