|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.sentinel.client.http.java.JavaRequestorBase<T> com.novell.sentinel.client.http.java.HttpRequestorAsyncJava<T>
T
- The type of data interface (e.g., JSONParser
or Parser
) that will be reported
as the result of the HTTP request.public abstract class HttpRequestorAsyncJava<T>
A base implementation class for asynchronous HttpRequestor instances used in Java (as opposed to GWT).
This class implements a static thread pool (default maximum threads == 1) that is shared by all instances of
this class (see setMaxThreads(int)
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.novell.sentinel.client.http.java.JavaRequestorBase |
---|
JavaRequestorBase.DefaultHostnameVerifier, JavaRequestorBase.NcacFault, JavaRequestorBase.TestTrustManager |
Nested classes/interfaces inherited from interface com.novell.sentinel.client.http.HttpRequestMethod |
---|
HttpRequestMethod.HttpMethod |
Field Summary | |
---|---|
protected static com.novell.sentinel.client.http.java.HttpRequestorAsyncJava.HttpRequest<?> |
QUEUE_END
|
Fields inherited from class com.novell.sentinel.client.http.java.JavaRequestorBase |
---|
CHAR_ENCODING |
Constructor Summary | |
---|---|
protected |
HttpRequestorAsyncJava()
Constructor for derived classes. |
Method Summary | |
---|---|
void |
octetRequest(HttpRequestMethod.HttpMethod method,
String url,
byte[] data,
HttpResultHandler<byte[]> resultHandler)
Issue an HTTP request that requires and optionally returns octet-stream data (e.g., POST, PUT). |
void |
octetRequest(HttpRequestMethod.HttpMethod method,
String url,
HttpResultHandler<byte[]> resultHandler)
Issue an HTTP request the returns octet-stream data (e.g., GET). |
void |
request(HttpRequestMethod.HttpMethod method,
String url,
HttpResultHandler<T> resultHandler)
Issue an HTTP request that does not require request content (e.g., GET, DELETE). |
void |
request(HttpRequestMethod.HttpMethod method,
String url,
T parser,
HttpResultHandler<T> resultHandler)
Issue an HTTP request that requires request content (e.g., PUT, POST). |
static void |
setMaxThreads(int threadCount)
Set the maximum number of threads in the thread pool that is shared by all instances of this class. |
void |
shutdown()
Clean up any resources associated with this instance. |
void |
shutdown(boolean wait)
Clean up any resources associated with this instance. |
Methods inherited from class com.novell.sentinel.client.http.java.JavaRequestorBase |
---|
authenticate, deleteToken, getHostnameVerifier, getLocaleName, getMediaType, getNcacFault, getParser, getSAMLToken, getSecureRandom, getSocketFactory, getSSLSocketFactory, getToken, getTrustManager, issueOctetRequest, issueRequest, sendData, setHostnameVerifier, setLanguageHeaders, setLocaleName, setMediaTypeHeaders, setSAMLToken, setSSLSocketFactory, setTrustManager |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.novell.sentinel.client.http.HttpRequestor |
---|
getLocaleName, setLocaleName |
Field Detail |
---|
protected static final com.novell.sentinel.client.http.java.HttpRequestorAsyncJava.HttpRequest<?> QUEUE_END
Constructor Detail |
---|
protected HttpRequestorAsyncJava()
Method Detail |
---|
public static void setMaxThreads(int threadCount)
threadCount
- The maximum number of threads to allow in the thread pool (default is 1). This value
must be greater than or equal to 1.public void shutdown()
public void shutdown(boolean wait)
wait
- If true, wait for all of the thread pool threads to exit.public void request(HttpRequestMethod.HttpMethod method, String url, HttpResultHandler<T> resultHandler)
HttpRequestor
request
in interface HttpRequestor<T>
method
- The HTTP method.url
- The target of the request.resultHandler
- The handler to be notified of the request result.public void request(HttpRequestMethod.HttpMethod method, String url, T parser, HttpResultHandler<T> resultHandler)
HttpRequestor
request
in interface HttpRequestor<T>
method
- The HTTP method.url
- The target of the request.parser
- The source of the request content.resultHandler
- The handler to be notified of the request result.public void octetRequest(HttpRequestMethod.HttpMethod method, String url, HttpResultHandler<byte[]> resultHandler)
HttpRequestor
octetRequest
in interface HttpRequestor<T>
method
- The HTTP method.url
- The target of the request.resultHandler
- The handler to be notified of the request result.public void octetRequest(HttpRequestMethod.HttpMethod method, String url, byte[] data, HttpResultHandler<byte[]> resultHandler)
HttpRequestor
octetRequest
in interface HttpRequestor<T>
method
- The HTTP method.url
- The target of the request.data
- The request content (may be null).resultHandler
- The handler to be notified of the request result.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |