public interface MWHttpClientConfig
MWHttpClient
. It provides the following
configuration parameters:
Interruptible
: Determines if the MATLAB function call can be interupted while waiting for a response.
The default is false
.TimeOutMs
: Specifies the time in mS that the client waits for the response from the server. The
default is 120000 mS.MaxConnectionsPerAddress
: Specifies the maximum number of connections per address used by
MWHttpClient
to fulfill multiple simultaneous requests created by client. The
default is -1 which implies unlimited.ResponseSizeLimit
: Specifies the maximum size, in bytes, of the response the client will accept.
The default is 64*1024*1024.Users should extend MWHttpClientDefaultConfig
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_IS_INTERRUPTABLE |
static int |
DEFAULT_NUM_CONNECTIONS_PER_ADDRESS |
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 |
isInterruptible()
Tells whether this instance of
MWHttpClientConfig can be used for an interruptible
MWHttpClient |
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
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()
Copyright 2010-2013 The MathWorks, Inc.