public class AsyncHttpActor extends org.nustaq.kontraktor.Actor<AsyncHttpActor>
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.impl.nio.client.CloseableHttpAsyncClient |
asyncHttpClient |
static int |
MAX_CONN_PER_ROUTE |
static int |
MAX_CONN_TOTAL |
__cbQueue, __clientConnection, __connections, __currentDispatcher, __mailbox, __mailboxCapacity, __mbCapacity, __publishTarget, __remoteId, __scheduler, __self, __stopped, __ticketMachine, connection, sender, userData, zzRoutingGCEnabled, zzServerMsgCallback| Constructor and Description |
|---|
AsyncHttpActor() |
| Modifier and Type | Method and Description |
|---|---|
org.nustaq.kontraktor.IPromise<org.apache.http.HttpResponse> |
get(String url,
String... headers) |
protected org.apache.http.impl.nio.client.CloseableHttpAsyncClient |
getClient() |
org.nustaq.kontraktor.IPromise<String> |
getContent(String url,
String... headers) |
org.nustaq.kontraktor.IPromise<byte[]> |
getContentBytes(String url,
String... headers) |
static AsyncHttpActor |
getSingleton() |
static void |
main(String[] args) |
org.nustaq.kontraktor.IPromise<org.apache.http.HttpResponse> |
post(String url,
String postData,
String... headers) |
org.nustaq.kontraktor.IPromise<org.apache.http.HttpResponse> |
postWithContext(String url,
String postData,
org.apache.http.protocol.HttpContext ctx,
String... headers) |
static byte[] |
readContentBytes(org.apache.http.HttpResponse resp,
String enc) |
static String |
readContentString(org.apache.http.HttpResponse resp) |
org.nustaq.kontraktor.IPromise |
sync() |
static byte[] |
unGZip(byte[] barr,
int read) |
__addDeadLetter, __addRemoteConnection, __addStopHandler, __dispatchRemoteCall, __enqueueCall, __getCachedMethod, __removeRemoteConnection, __stop, __stopImpl, __submit, ask, askMsg, asyncstop, checkThread, close, closeCurrentClient, current, cyclic, delayed, execInThreadPool, execute, getActor, getActorRef, getCallbackSize, getConnections, getCurrentDispatcher, getFactory, getMailboxSize, getQSizes, getReport, getScheduler, getSubMonitorables, getUntypedRef, hasStopped, inside, inThread, isCallbackQPressured, isEmpty, isMailboxPressured, isProxy, isPublished, isRemote, isStopped, ping, router$clientPing, self, serialOn, setServerMsgCallback, stop, stopSafeClose, tell, tellMsg, unpublish, zzkrouterLostClient, zzRoutingRefGCAddDeadLetter, all, all, all, allMapped, AsActor, AsActor, AsActor, AsActor, AsUntypedActor, awaitAll, awaitAll, awaitAll, awaitAll, complete, complete, DeadLetters, flow, InThread, isComplete, isCont, isError, isErrorOrComplete, isResult, isTimeout, promise, race, race, reject, resolve, resolve, stream, SubmitDelayed, yield, yield, yieldCallbackspublic static int MAX_CONN_PER_ROUTE
public static int MAX_CONN_TOTAL
protected org.apache.http.impl.nio.client.CloseableHttpAsyncClient asyncHttpClient
public static String readContentString(org.apache.http.HttpResponse resp) throws IOException
IOExceptionpublic static byte[] readContentBytes(org.apache.http.HttpResponse resp,
String enc)
throws IOException
IOExceptionpublic static byte[] unGZip(byte[] barr,
int read)
throws IOException
IOExceptionprotected org.apache.http.impl.nio.client.CloseableHttpAsyncClient getClient()
public static AsyncHttpActor getSingleton()
public org.nustaq.kontraktor.IPromise sync()
public org.nustaq.kontraktor.IPromise<byte[]> getContentBytes(String url, String... headers)
public org.nustaq.kontraktor.IPromise<org.apache.http.HttpResponse> get(String url, String... headers)
public org.nustaq.kontraktor.IPromise<org.apache.http.HttpResponse> post(String url, String postData, String... headers)
public org.nustaq.kontraktor.IPromise<org.apache.http.HttpResponse> postWithContext(String url, String postData, org.apache.http.protocol.HttpContext ctx, String... headers)
public static void main(String[] args) throws InterruptedException
InterruptedExceptionCopyright © 2018. All rights reserved.