public class QueryManager
extends java.lang.Object
Constructor and Description |
---|
QueryManager(java.lang.String id) |
QueryManager(java.lang.String id,
long seed) |
Modifier and Type | Method and Description |
---|---|
void |
addQueryCallback(long id,
QueryCallback callback,
long timeout)
Adds a query callback to handle a later message.
|
QueryFuture |
addQueryFuture(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
long timeout)
Registers a callback future.
|
void |
close() |
long |
getTimeout() |
boolean |
isEmpty() |
long |
nextQueryId()
Generates a new unique query identifier.
|
boolean |
onQueryError(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
BamError error)
Callback from the ActorStream to handle a queryResult.
|
boolean |
onQueryResult(long id,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload)
Callback from the ActorStream to handle a queryResult.
|
java.io.Serializable |
query(MessageStream stream,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
long timeout)
Queries through to a stream.
|
void |
query(MessageStream stream,
java.lang.String to,
java.lang.String from,
java.io.Serializable payload,
QueryCallback cb,
long timeout)
Queries through to a stream.
|
void |
setTimeout(long timeout) |
java.lang.String |
toString() |
public QueryManager(java.lang.String id)
public QueryManager(java.lang.String id, long seed)
public boolean isEmpty()
public long getTimeout()
public void setTimeout(long timeout)
public final long nextQueryId()
public void addQueryCallback(long id, QueryCallback callback, long timeout)
id
- the unique query identifiercallback
- the application's callback for the resultpublic QueryFuture addQueryFuture(long id, java.lang.String to, java.lang.String from, java.io.Serializable payload, long timeout)
public void query(MessageStream stream, java.lang.String to, java.lang.String from, java.io.Serializable payload, QueryCallback cb, long timeout)
public java.io.Serializable query(MessageStream stream, java.lang.String to, java.lang.String from, java.io.Serializable payload, long timeout)
public final boolean onQueryResult(long id, java.lang.String to, java.lang.String from, java.io.Serializable payload)
public final boolean onQueryError(long id, java.lang.String to, java.lang.String from, java.io.Serializable payload, BamError error)
public void close()
public java.lang.String toString()
toString
in class java.lang.Object