T - the data type of the subscriptionpublic class Subscription<T> extends PendingResultBase<T>
cancel()| Modifier and Type | Class and Description |
|---|---|
static interface |
Subscription.EventCallback<T> |
static interface |
Subscription.LifecycleCallback |
| Constructor and Description |
|---|
Subscription(Types.RequestId requestId,
RemoteClient remoteWampClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel this PendingResultBase to stop receiving callbacks.
|
Types.RequestId |
getRequestId() |
Subscription<T> |
setEventCallback(Subscription.EventCallback<T> eventCallback)
Set callback called every time a new event is received on the Subscription
|
Subscription<T> |
setLifecycleCallback(Subscription.LifecycleCallback lifecycleCallback)
Set callback called when subscription starts and ends
|
await, await, deliverError, deliverResult, isCanceled, setErrorCallbackpublic Subscription(Types.RequestId requestId, RemoteClient remoteWampClient)
public void cancel()
PendingResultBasecancel in interface PendingResult<T>cancel in class PendingResultBase<T>public Types.RequestId getRequestId()
public Subscription<T> setEventCallback(Subscription.EventCallback<T> eventCallback)
eventCallback - the callback to receive events onpublic Subscription<T> setLifecycleCallback(Subscription.LifecycleCallback lifecycleCallback)
lifecycleCallback - the callback to receive events on