protected static class Receive.Listener extends Object implements DestinationListener<Void>
| Modifier | Constructor and Description |
|---|---|
protected |
Receive.Listener(String filename,
boolean verbose,
long delayMillis) |
| Modifier and Type | Method and Description |
|---|---|
void |
onMalformed(NonBlockingClient client,
Void context,
MalformedDelivery delivery)
Invoked to deliver a malformed message to the client.
|
void |
onMessage(NonBlockingClient client,
Void context,
Delivery delivery)
Invoked to deliver a message to the client.
|
void |
onUnsubscribed(NonBlockingClient client,
Void context,
String topicPattern,
String share,
Exception error)
Invoked to provide a notification that the client is no longer subscribed to a destination
that this
DestinationListneer has previously being associated with. |
protected Receive.Listener(String filename, boolean verbose, long delayMillis)
public void onMessage(NonBlockingClient client, Void context, Delivery delivery)
DestinationListeneronMessage in interface DestinationListener<Void>client - the client that this DestinationListener was registered with.context - the context object that was supplied when this instance of the DestinationListener
was registered with the NonBlockingClient.delivery - an object that contains both information about the message delivery and the
payload of the message itself.public void onMalformed(NonBlockingClient client, Void context, MalformedDelivery delivery)
DestinationListeneronMalformed in interface DestinationListener<Void>client - the client that this DestinationListener was registered with.context - the context object that was supplied when this instance of the DestinationListener
was registered with the NonBlockingClient.delivery - an object that contains both information about the message delivery and the
payload of the message itself.public void onUnsubscribed(NonBlockingClient client, Void context, String topicPattern, String share, Exception error)
DestinationListenerDestinationListneer has previously being associated with.onUnsubscribed in interface DestinationListener<Void>client - the client that this DestinationListener was registered with.context - the context object that was supplied when this instance of the DestinationListener
was registered with the NonBlockingClient.topicPattern - the topic pattern which identifies the destination that the client is no
longer subscribed to.share - the share which identifies the destination that the client is no longer subscribed
to. This will be null if the destination was private.error - if set, this Exception indicates that the unsubscribe occurred due to an error condition
which is detailed within.Copyright © 2015 International Business Machines Corporation. All rights reserved.