public class MWHttpClientDefaultConfig extends java.lang.Object implements MWHttpClientConfig
MWHttpClient
. The default configuration consists of the following fields:
Field Name | Description | Default Value |
DEFAULT_IS_COOKIE_ENABLED | Determines if the client sets the HTTP cookie. | true |
DEFAULT_IS_INTERRUPTABLE | Determines if the client can interrupt MATLABĀ® function execution. | false |
DEFAULT_RESPONSE_SIZE_LIMIT | Maximum size, in bytes, of the response that a client accepts. | 64*1024*1024 (64 MB) |
DEFAULT_NUM_CONNECTIONS_PER_ADDRESS | Maximum number of connections that the client opens to fulfill multiple requests. | -1, specifies that the client can uses as many connections as the system allows. |
DEFAULT_TIMEOUT_MS | Amount of time, in milliseconds, that the client waits for a server response before timing out. | 120000 |
For creating a custom configuration, override the methods of this class.
DEFAULT_IS_COOKIE_ENABLED, DEFAULT_IS_INTERRUPTABLE, DEFAULT_NUM_CONNECTIONS_PER_ADDRESS, DEFAULT_POLL_ON_UPDATE_ERROR_ASYNC, DEFAULT_RESPONSE_SIZE_LIMIT, DEFAULT_TIMEOUT_MS
Constructor and Description |
---|
MWHttpClientDefaultConfig() |
Modifier and Type | Method and Description |
---|---|
int |
getMaxConnectionsPerAddress()
Returns the default value for maximum connections per address
|
int |
getResponseSizeLimit()
Returns the deafault maximum response size limit in bytes
|
long |
getTimeOutMs()
Returns the default amount of time, in milliseconds, the client will wait for a response
|
boolean |
isCookieEnabled()
Use this API to enable handling of cookies in the client application.
|
boolean |
isInterruptible()
Returns the default interruptible value
|
boolean |
pollOnUpdateErrorAsync()
The return value of this method decides the behavior of the client when there is a loss of network connectivity
between the server and the client.
|
public int getMaxConnectionsPerAddress()
getMaxConnectionsPerAddress
in interface MWHttpClientConfig
public long getTimeOutMs()
getTimeOutMs
in interface MWHttpClientConfig
public boolean isInterruptible()
isInterruptible
in interface MWHttpClientConfig
public int getResponseSizeLimit()
getResponseSizeLimit
in interface MWHttpClientConfig
public boolean isCookieEnabled()
isCookieEnabled
in interface MWHttpClientConfig
public boolean pollOnUpdateErrorAsync()
pollOnUpdateErrorAsync
in interface MWHttpClientConfig
Copyright 2010-2016 The MathWorks, Inc.