public interface HChannelManager
| Modifier and Type | Method and Description |
|---|---|
void |
asyncCloseSubscription(TopicSubscriber topicSubscriber,
Callback<PubSubProtocol.ResponseBody> callback,
Object context)
Close the subscription of the given
topicSubscriber. |
void |
close()
Close the channel manager.
|
SubscribeResponseHandler |
getSubscribeResponseHandler(TopicSubscriber topicSubscriber)
Get the subscribe response handler managed the given
topicSubscriber. |
SubscriptionEventEmitter |
getSubscriptionEventEmitter()
Return the subscription event emitter to emit subscription events.
|
boolean |
isClosed()
Is the channel manager closed.
|
long |
nextTxnId()
Generate next transaction id for pub/sub request sending thru this manager.
|
void |
redirectToHost(PubSubData pubSubData,
InetSocketAddress host)
Submit a pub/sub request to a given host.
|
void |
schedule(TimerTask task,
long delay)
Schedule a timer task after a given
delay. |
void |
startDelivery(TopicSubscriber topicSubscriber,
MessageHandler messageHandler)
Start delivering messages for a given topic subscriber.
|
void |
stopDelivery(TopicSubscriber topicSubscriber)
Stop delivering messages for a given topic subscriber.
|
void |
submitOp(PubSubData pubSubData)
Submit a pub/sub request.
|
void |
submitOpAfterDelay(PubSubData op,
long delay)
Submit a pub/sub request after a given
delay. |
void |
submitOpToDefaultServer(PubSubData pubSubData)
Submit a pub/sub request to default server.
|
void submitOpAfterDelay(PubSubData op, long delay)
delay.op - Pub/Sub Request.delay - Delay time in ms.void submitOp(PubSubData pubSubData)
pubSubData - Pub/Sub Request.void submitOpToDefaultServer(PubSubData pubSubData)
pubSubData - Pub/Sub request.void redirectToHost(PubSubData pubSubData, InetSocketAddress host)
pubSubData - Pub/Sub request.host - Given host address.long nextTxnId()
void schedule(TimerTask task, long delay)
delay.task - A timer taskdelay - Delay time in ms.SubscribeResponseHandler getSubscribeResponseHandler(TopicSubscriber topicSubscriber)
topicSubscriber.topicSubscriber - Topic Subscribervoid startDelivery(TopicSubscriber topicSubscriber, MessageHandler messageHandler) throws PubSubException.ClientNotSubscribedException, AlreadyStartDeliveryException
topicSubscriber - Topic SubscribermessageHandler - MessageHandler to register for this ResponseHandler instance.PubSubException.ClientNotSubscribedException - If the client is not currently subscribed to the topicAlreadyStartDeliveryException - If someone started delivery a message handler before stopping existed one.void stopDelivery(TopicSubscriber topicSubscriber) throws PubSubException.ClientNotSubscribedException
topicSubscriber - Topic SubscriberPubSubException.ClientNotSubscribedException - If the client is not currently subscribed to the topicvoid asyncCloseSubscription(TopicSubscriber topicSubscriber, Callback<PubSubProtocol.ResponseBody> callback, Object context)
topicSubscriber.topicSubscriber - Topic Subscribercallback - Callbackcontext - Callback contextSubscriptionEventEmitter getSubscriptionEventEmitter()
boolean isClosed()
void close()
Copyright © 2011–2021 The Apache Software Foundation. All rights reserved.