public final class HTTPPluginControl
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static HTTPPluginConnection |
getConnectionDefaults()
Returns a
HTTPPluginConnection that can be used to set
the default behaviour of new connections. |
static HTTPUtilities |
getHTTPUtilities()
Provides access to an
HTTPUtilities instance. |
static HTTPPluginConnection |
getThreadConnection(java.lang.String url)
Returns a
HTTPPluginConnection for a particular URL. |
static java.lang.Object |
getThreadHTTPClientContext()
Returns the HTTPClient context object for the calling worker
thread.
|
public static HTTPPluginConnection getConnectionDefaults()
HTTPPluginConnection
that can be used to set
the default behaviour of new connections.HTTPPluginConnection
.public static HTTPPluginConnection getThreadConnection(java.lang.String url) throws GrinderException, ParseException, ProtocolNotSuppException
HTTPPluginConnection
for a particular URL.
The resulting HTTPPluginConnection
is valid for
the current thread and the current run. It can be used to set
specific authentication details, default headers, cookies, proxy
servers, and so on for the current thread/run on a per-URL
basis.
This method will throw a GrinderException
if not
called from a worker thread.
url
- An absolute URL that specifies the connection.HTTPPluginConnection
valueGrinderException
- If an error occurs.ParseException
- If url
can not be parsed.ProtocolNotSuppException
- If url
specifies an unsupported protocol.public static java.lang.Object getThreadHTTPClientContext() throws GrinderException
CookieModule.listAllCookies(Object)
.
This method will throw a GrinderException
if not
called from a worker thread.
HTTPClient.HTTPConnections
created by this thread.GrinderException
- If an error occurs.public static HTTPUtilities getHTTPUtilities()
HTTPUtilities
instance.