public interface MWHttpClientConfig
MWHttpClient
. It provides the following
configuration parameters:
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 |
Users should extend MWHttpClientDefaultConfig
to customize the configuration of
the client-server connection.
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_IS_COOKIE_ENABLED |
static boolean |
DEFAULT_IS_INTERRUPTABLE |
static int |
DEFAULT_NUM_CONNECTIONS_PER_ADDRESS |
static boolean |
DEFAULT_POLL_ON_UPDATE_ERROR_ASYNC |
static int |
DEFAULT_RESPONSE_SIZE_LIMIT |
static long |
DEFAULT_TIMEOUT_MS |
Modifier and Type | Method and Description |
---|---|
int |
getMaxConnectionsPerAddress()
Get maximum number of connections per address used by
MWHttpClient to fulfill multiple
simultaneous requests created by client. |
int |
getResponseSizeLimit()
Get the maximum response size the client can accept.
|
long |
getTimeOutMs()
Get the time out in milliseconds for a client to receive response from the server.
|
boolean |
isCookieEnabled()
Use this API to enable handling of cookies in the client application.
|
boolean |
isInterruptible()
Tells whether this instance of
MWHttpClientConfig can be used for an interruptible
MWHttpClient |
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.
|
static final int DEFAULT_NUM_CONNECTIONS_PER_ADDRESS
static final long DEFAULT_TIMEOUT_MS
static final boolean DEFAULT_IS_INTERRUPTABLE
static final int DEFAULT_RESPONSE_SIZE_LIMIT
static final boolean DEFAULT_IS_COOKIE_ENABLED
static final boolean DEFAULT_POLL_ON_UPDATE_ERROR_ASYNC
int getMaxConnectionsPerAddress()
MWHttpClient
to fulfill multiple
simultaneous requests created by client. If this configuration is meant for non-interruptible instance
of MWHttpClient
, user defined implementations of this method must return -1.long getTimeOutMs()
boolean isInterruptible()
MWHttpClientConfig
can be used for an interruptible
MWHttpClient
MWHttpClientConfig
can be used for an interruptible
MWHttpClient
else returns falseint getResponseSizeLimit()
boolean isCookieEnabled()
boolean pollOnUpdateErrorAsync()
Copyright 2010-2016 The MathWorks, Inc.