Class HTTPClientPolicy
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="ConnectionRequestTimeout" 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="Version" type="{http://www.w3.org/2001/XMLSchema}string" default="auto" />
<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
FieldsModifier and TypeFieldDescriptionprotected StringSpecifies the MIME types the client is prepared to handle (e.g., HTML, JPEG, GIF, etc.)protected StringSpecifies the encoding the client is prepared to handle (e.g., gzip)protected StringSpecifies the language the client desires (e.g., English, French, etc.)protected BooleanIf true, the client is free to use chunking streams if it wants, but it is not required to use chunking streams.protected LongSpecifies the amount of time, in milliseconds, that a conduit will try and enqueue the response on the workqueue.protected BooleanSpecifies whether the conduit should throw and exception if it fails to enqueue the async response handling onto the workqueue.protected BooleanSpecifies if the consumer will automatically follow a server issued redirection.protected Stringaka User-Agent Specifies the type of browser is sending the request.protected StringMost commonly used to specify no-cache, however the standard supports a dozen or so caching related directives for requestsprotected IntegerIf AllowChunking is true, this sets the threshold at which messages start getting chunked.protected IntegerSpecifies the chunk length for a HttpURLConnection.protected ConnectionTypeThe connection disposition.protected LongSpecifies the amount of time, in milliseconds, used when requesting a connection from the connection manager(if appliable). 0 is infinite.protected LongSpecifies the amount of time, in milliseconds, that the consumer will attempt to establish a connection before it times out. 0 is infinite.protected StringSpecifies the content type of the stream being sent in a post request.protected StringSpecifies a cookie to send to the server.protected StringSpecifies the URL of a decoupled endpoint for the receipt of responses over a separate provider->consumer connection.protected StringSpecifies the Internet host and port number of the resource on which the request is being invoked.protected IntegerSpecifies the maximum amount of retransmits that are allowed for redirects.protected StringSpecifies the list of hostnames that will not use the proxy configuration.protected PropertyChangeSupportprotected StringSpecifies the address of proxy server if one is used.protected IntegerSpecifies the port number used by the proxy server.protected ProxyServerTypeSpecifies the type of the proxy server.protected LongSpecifies the amount of time, in milliseconds, that the consumer will wait for a response before it times out. 0 is infinite.protected StringSpecifies the URL that referred us to this URL.protected StringHTTP Version used for the connection. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidGets the value of the accept property.Gets the value of the acceptEncoding property.Gets the value of the acceptLanguage property.longGets the value of the asyncExecuteTimeout property.Gets the value of the browserType property.Gets the value of the cacheControl property.intGets the value of the chunkingThreshold property.intGets the value of the chunkLength property.Gets the value of the connection property.longGets the value of the connectionRequestTimeout property.longGets the value of the connectionTimeout property.Gets the value of the contentType property.Gets the value of the cookie property.Gets the value of the decoupledEndpoint property.getHost()Gets the value of the host property.intGets the value of the maxRetransmits property.Gets the value of the nonProxyHosts property.Gets a map that contains attributes that aren't bound to any typed property on this class.Gets the value of the proxyServer property.Gets the value of the proxyServerPort property.Gets the value of the proxyServerType property.longGets the value of the receiveTimeout property.Gets the value of the referer property.Gets the value of the version property.booleanGets the value of the allowChunking property.booleanGets the value of the asyncExecuteTimeoutRejection property.booleanGets the value of the autoRedirect property.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidvoidSets the value of the accept property.voidsetAcceptEncoding(String value) Sets the value of the acceptEncoding property.voidsetAcceptLanguage(String value) Sets the value of the acceptLanguage property.voidsetAllowChunking(boolean value) Sets the value of the allowChunking property.voidsetAsyncExecuteTimeout(long value) Sets the value of the asyncExecuteTimeout property.voidsetAsyncExecuteTimeoutRejection(boolean value) Sets the value of the asyncExecuteTimeoutRejection property.voidsetAutoRedirect(boolean value) Sets the value of the autoRedirect property.voidsetBrowserType(String value) Sets the value of the browserType property.voidsetCacheControl(String value) Sets the value of the cacheControl property.voidsetChunkingThreshold(int value) Sets the value of the chunkingThreshold property.voidsetChunkLength(int value) Sets the value of the chunkLength property.voidsetConnection(ConnectionType value) Sets the value of the connection property.voidsetConnectionRequestTimeout(long value) Sets the value of the connectionRequestTimeout property.voidsetConnectionTimeout(long value) Sets the value of the connectionTimeout property.voidsetContentType(String value) Sets the value of the contentType property.voidSets the value of the cookie property.voidsetDecoupledEndpoint(String value) Sets the value of the decoupledEndpoint property.voidSets the value of the host property.voidsetMaxRetransmits(int value) Sets the value of the maxRetransmits property.voidsetNonProxyHosts(String value) Sets the value of the nonProxyHosts property.voidsetProxyServer(String value) Sets the value of the proxyServer property.voidsetProxyServerPort(Integer value) Sets the value of the proxyServerPort property.voidSets the value of the proxyServerType property.voidsetReceiveTimeout(long value) Sets the value of the receiveTimeout property.voidsetReferer(String value) Sets the value of the referer property.voidsetVersion(String value) Sets the value of the version property.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoid
-
Field Details
-
connectionTimeout
Specifies the amount of time, in milliseconds, that the consumer will attempt to establish a connection before it times out. 0 is infinite. -
receiveTimeout
Specifies the amount of time, in milliseconds, that the consumer will wait for a response before it times out. 0 is infinite. -
connectionRequestTimeout
Specifies the amount of time, in milliseconds, used when requesting a connection from the connection manager(if appliable). 0 is infinite. -
asyncExecuteTimeout
Specifies the amount of time, in milliseconds, that a conduit will try and enqueue the response on the workqueue. -
asyncExecuteTimeoutRejection
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. -
autoRedirect
Specifies if the consumer will automatically follow a server issued redirection. (name is not part of standard) -
maxRetransmits
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) -
allowChunking
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. -
chunkingThreshold
If AllowChunking is true, this sets the threshold at which messages start getting chunked. Messages under this limit do not get chunked. -
chunkLength
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. -
accept
Specifies the MIME types the client is prepared to handle (e.g., HTML, JPEG, GIF, etc.) -
acceptLanguage
Specifies the language the client desires (e.g., English, French, etc.) -
acceptEncoding
Specifies the encoding the client is prepared to handle (e.g., gzip) -
contentType
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). -
host
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. -
connection
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. -
cacheControl
Most commonly used to specify no-cache, however the standard supports a dozen or so caching related directives for requests -
version
HTTP Version used for the connection. The "auto" default will use whatever the default is for the HTTPConduit implementation. -
cookie
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. -
browserType
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. -
referer
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. -
decoupledEndpoint
Specifies the URL of a decoupled endpoint for the receipt of responses over a separate provider->consumer connection. -
proxyServer
Specifies the address of proxy server if one is used. -
proxyServerPort
Specifies the port number used by the proxy server. -
nonProxyHosts
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 -
proxyServerType
Specifies the type of the proxy server. Can be either HTTP or SOCKS. -
propertyListener
-
-
Constructor Details
-
HTTPClientPolicy
public HTTPClientPolicy()
-
-
Method Details
-
getAccept
Gets the value of the accept property.Specifies the MIME types the client is prepared to handle (e.g., HTML, JPEG, GIF, etc.)
- Returns:
- possible object is
String
-
setAccept
Sets the value of the accept property.- Parameters:
value- allowed object isString- See Also:
-
isSetAccept
public boolean isSetAccept() -
getAcceptLanguage
Gets the value of the acceptLanguage property.Specifies the language the client desires (e.g., English, French, etc.)
- Returns:
- possible object is
String
-
setAcceptLanguage
Sets the value of the acceptLanguage property.- Parameters:
value- allowed object isString- See Also:
-
isSetAcceptLanguage
public boolean isSetAcceptLanguage() -
getAcceptEncoding
Gets the value of the acceptEncoding property.Specifies the encoding the client is prepared to handle (e.g., gzip)
- Returns:
- possible object is
String
-
setAcceptEncoding
Sets the value of the acceptEncoding property.- Parameters:
value- allowed object isString- See Also:
-
isSetAcceptEncoding
public boolean isSetAcceptEncoding() -
getContentType
Gets the value of the contentType property.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).
- Returns:
- possible object is
String
-
setContentType
Sets the value of the contentType property.- Parameters:
value- allowed object isString- See Also:
-
isSetContentType
public boolean isSetContentType() -
getHost
Gets the value of the host property.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.
- Returns:
- possible object is
String
-
setHost
Sets the value of the host property. -
isSetHost
public boolean isSetHost() -
setConnection
Sets the value of the connection property.- Parameters:
value- allowed object isConnectionType- See Also:
-
isSetConnection
public boolean isSetConnection() -
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 requests
- Returns:
- possible object is
String
-
setCacheControl
Sets the value of the cacheControl property.- Parameters:
value- allowed object isString- See Also:
-
isSetCacheControl
public boolean isSetCacheControl() -
getCookie
Gets the value of the cookie property.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.
- Returns:
- possible object is
String
-
setCookie
Sets the value of the cookie property.- Parameters:
value- allowed object isString- See Also:
-
isSetCookie
public boolean isSetCookie() -
getBrowserType
Gets the value of the browserType property.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.
- Returns:
- possible object is
String
-
setBrowserType
Sets the value of the browserType property.- Parameters:
value- allowed object isString- See Also:
-
isSetBrowserType
public boolean isSetBrowserType() -
getReferer
Gets the value of the referer property.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.
- Returns:
- possible object is
String
-
setReferer
Sets the value of the referer property.- Parameters:
value- allowed object isString- See Also:
-
isSetReferer
public boolean isSetReferer() -
getDecoupledEndpoint
Gets the value of the decoupledEndpoint property.Specifies the URL of a decoupled endpoint for the receipt of responses over a separate provider->consumer connection.
- Returns:
- possible object is
String
-
setDecoupledEndpoint
Sets the value of the decoupledEndpoint property.- Parameters:
value- allowed object isString- See Also:
-
isSetDecoupledEndpoint
public boolean isSetDecoupledEndpoint() -
getProxyServer
Gets the value of the proxyServer property.Specifies the address of proxy server if one is used.
- Returns:
- possible object is
String
-
setProxyServer
Sets the value of the proxyServer property.- Parameters:
value- allowed object isString- See Also:
-
isSetProxyServer
public boolean isSetProxyServer() -
getProxyServerPort
Gets the value of the proxyServerPort property.Specifies the port number used by the proxy server.
- Returns:
- possible object is
Integer
-
setProxyServerPort
Sets the value of the proxyServerPort property.- Parameters:
value- allowed object isInteger- See Also:
-
isSetProxyServerPort
public boolean isSetProxyServerPort() -
getNonProxyHosts
Gets the value of the nonProxyHosts property.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
- Returns:
- possible object is
String
-
setNonProxyHosts
Sets the value of the nonProxyHosts property.- Parameters:
value- allowed object isString- See Also:
-
isSetNonProxyHosts
public boolean isSetNonProxyHosts() -
setProxyServerType
Sets the value of the proxyServerType property.- Parameters:
value- allowed object isProxyServerType- See Also:
-
isSetProxyServerType
public boolean isSetProxyServerType() -
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
-
setConnectionTimeout
public void setConnectionTimeout(long value) Sets the value of the connectionTimeout property.- See Also:
-
unsetConnectionTimeout
public void unsetConnectionTimeout() -
isSetConnectionTimeout
public boolean isSetConnectionTimeout() -
getConnectionTimeout
public long getConnectionTimeout()Gets the value of the connectionTimeout property.Specifies the amount of time, in milliseconds, that the consumer will attempt to establish a connection before it times out. 0 is infinite.
-
setReceiveTimeout
public void setReceiveTimeout(long value) Sets the value of the receiveTimeout property.- See Also:
-
unsetReceiveTimeout
public void unsetReceiveTimeout() -
isSetReceiveTimeout
public boolean isSetReceiveTimeout() -
getReceiveTimeout
public long getReceiveTimeout()Gets the value of the receiveTimeout property.Specifies the amount of time, in milliseconds, that the consumer will wait for a response before it times out. 0 is infinite.
-
setConnectionRequestTimeout
public void setConnectionRequestTimeout(long value) Sets the value of the connectionRequestTimeout property.- See Also:
-
unsetConnectionRequestTimeout
public void unsetConnectionRequestTimeout() -
isSetConnectionRequestTimeout
public boolean isSetConnectionRequestTimeout() -
getConnectionRequestTimeout
public long getConnectionRequestTimeout()Gets the value of the connectionRequestTimeout property.Specifies the amount of time, in milliseconds, used when requesting a connection from the connection manager(if appliable). 0 is infinite.
-
setAsyncExecuteTimeout
public void setAsyncExecuteTimeout(long value) Sets the value of the asyncExecuteTimeout property.- See Also:
-
unsetAsyncExecuteTimeout
public void unsetAsyncExecuteTimeout() -
isSetAsyncExecuteTimeout
public boolean isSetAsyncExecuteTimeout() -
getAsyncExecuteTimeout
public long getAsyncExecuteTimeout()Gets the value of the asyncExecuteTimeout property.Specifies the amount of time, in milliseconds, that a conduit will try and enqueue the response on the workqueue.
-
setAsyncExecuteTimeoutRejection
public void setAsyncExecuteTimeoutRejection(boolean value) Sets the value of the asyncExecuteTimeoutRejection property.- See Also:
-
unsetAsyncExecuteTimeoutRejection
public void unsetAsyncExecuteTimeoutRejection() -
isSetAsyncExecuteTimeoutRejection
public boolean isSetAsyncExecuteTimeoutRejection() -
isAsyncExecuteTimeoutRejection
public boolean isAsyncExecuteTimeoutRejection()Gets the value of the asyncExecuteTimeoutRejection property.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.
-
setAutoRedirect
public void setAutoRedirect(boolean value) Sets the value of the autoRedirect property.- See Also:
-
unsetAutoRedirect
public void unsetAutoRedirect() -
isSetAutoRedirect
public boolean isSetAutoRedirect() -
isAutoRedirect
public boolean isAutoRedirect()Gets the value of the autoRedirect property.Specifies if the consumer will automatically follow a server issued redirection. (name is not part of standard)
-
setMaxRetransmits
public void setMaxRetransmits(int value) Sets the value of the maxRetransmits property.- See Also:
-
unsetMaxRetransmits
public void unsetMaxRetransmits() -
isSetMaxRetransmits
public boolean isSetMaxRetransmits() -
getMaxRetransmits
public int getMaxRetransmits()Gets the value of the maxRetransmits property.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)
-
setAllowChunking
public void setAllowChunking(boolean value) Sets the value of the allowChunking property.- See Also:
-
unsetAllowChunking
public void unsetAllowChunking() -
isSetAllowChunking
public boolean isSetAllowChunking() -
isAllowChunking
public boolean isAllowChunking()Gets the value of the allowChunking property.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.
-
setChunkingThreshold
public void setChunkingThreshold(int value) Sets the value of the chunkingThreshold property.- See Also:
-
unsetChunkingThreshold
public void unsetChunkingThreshold() -
isSetChunkingThreshold
public boolean isSetChunkingThreshold() -
getChunkingThreshold
public int getChunkingThreshold()Gets the value of the chunkingThreshold property.If AllowChunking is true, this sets the threshold at which messages start getting chunked. Messages under this limit do not get chunked.
-
setChunkLength
public void setChunkLength(int value) Sets the value of the chunkLength property.- See Also:
-
unsetChunkLength
public void unsetChunkLength() -
isSetChunkLength
public boolean isSetChunkLength() -
getChunkLength
public int getChunkLength()Gets the value of the chunkLength property.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.
-
getConnection
Gets the value of the connection property.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.
-
setVersion
Sets the value of the version property.- See Also:
-
unsetVersion
public void unsetVersion() -
isSetVersion
public boolean isSetVersion() -
getVersion
Gets the value of the version property.HTTP Version used for the connection. The "auto" default will use whatever the default is for the HTTPConduit implementation.
-
getProxyServerType
Gets the value of the proxyServerType property.Specifies the type of the proxy server. Can be either HTTP or SOCKS.
-
addPropertyChangeListener
-
removePropertyChangeListener
-