public abstract class DestinationAdapter<T> extends Object implements DestinationListener<T>
Constructor and Description |
---|
DestinationAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
onMalformed(NonBlockingClient client,
T context,
MalformedDelivery delivery)
Invoked to deliver a malformed message to the client.
|
void |
onMessage(NonBlockingClient client,
T context,
Delivery delivery)
Invoked to deliver a message to the client.
|
void |
onUnsubscribed(NonBlockingClient client,
T 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. |
public void onMessage(NonBlockingClient client, T context, Delivery delivery)
DestinationListener
onMessage
in interface DestinationListener<T>
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, T context, MalformedDelivery delivery)
DestinationListener
onMalformed
in interface DestinationListener<T>
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, T context, String topicPattern, String share, Exception error)
DestinationListener
DestinationListneer
has previously being associated with.onUnsubscribed
in interface DestinationListener<T>
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.