Package io.joynr.pubsub.subscription
Class AttributeSubscriptionAdapter<T>
- java.lang.Object
-
- io.joynr.pubsub.subscription.AttributeSubscriptionAdapter<T>
-
- All Implemented Interfaces:
AttributeSubscriptionListener<T>,SubscriptionListener
public class AttributeSubscriptionAdapter<T> extends Object implements AttributeSubscriptionListener<T>
-
-
Constructor Summary
Constructors Constructor Description AttributeSubscriptionAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonError(JoynrRuntimeException error)Gets called on every error that is detected on the subscription.voidonReceive(T value)Gets called on every received publication Since the onReceive callback is called by a communication middleware thread, it should not be blocked, wait for user interaction, or do larger computation.voidonSubscribed(String subscriptionId)Gets called when the subscription is successfully registered at the provider.
-
-
-
Method Detail
-
onSubscribed
public void onSubscribed(String subscriptionId)
Description copied from interface:SubscriptionListenerGets called when the subscription is successfully registered at the provider. Since the onSubscribed callback is called by a communication middleware thread, it should not be blocked, wait for user interaction, or do larger computation.- Specified by:
onSubscribedin interfaceSubscriptionListener- Parameters:
subscriptionId- the subscription id of the subscription as string
-
onReceive
public void onReceive(T value)
Description copied from interface:AttributeSubscriptionListenerGets called on every received publication Since the onReceive callback is called by a communication middleware thread, it should not be blocked, wait for user interaction, or do larger computation.- Specified by:
onReceivein interfaceAttributeSubscriptionListener<T>- Parameters:
value- associated with the subscription this listener is listening to
-
onError
public void onError(JoynrRuntimeException error)
Description copied from interface:AttributeSubscriptionListenerGets called on every error that is detected on the subscription. Since the onError callback is called by a communication middleware thread, it should not be blocked, wait for user interaction, or do larger computation.- Specified by:
onErrorin interfaceAttributeSubscriptionListener<T>- Parameters:
error- JoynrRuntimeException describing the error
-
-