|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.trendrr.oss.networking.strest.StrestClient
public class StrestClient
Strest Client. This class is threadsafe, and handles low level details of the STREST protocol. The client is implemented using non-blocking sockets, there is a single io thread which is shared across any StrestClient instances. Callbacks are executed in the io thread, so it is recommended that any heavy processing be done in a separate thread.
| Constructor Summary | |
|---|---|
StrestClient(java.lang.String host,
int port)
|
|
| Method Summary | |
|---|---|
void |
close()
closes the connection and cleans up any resources. |
void |
connect()
|
StrestResponse |
sendRequest(StrestRequest request)
sends a synchronious request, will wait for the result. |
void |
sendRequest(StrestRequest request,
StrestRequestCallback callback)
sends the request asynchrounously. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StrestClient(java.lang.String host,
int port)
| Method Detail |
|---|
public void connect()
throws java.io.IOException
java.io.IOExceptionpublic void close()
public void sendRequest(StrestRequest request,
StrestRequestCallback callback)
request - callback -
java.lang.Exception
public StrestResponse sendRequest(StrestRequest request)
throws TrendrrException
request -
TrendrrException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||