public interface DipSubscriptionListener
Modifier and Type | Method and Description |
---|---|
void |
connected(DipSubscription subscription)
Will be called when the subscription has been (re)connected to the publication's publisher.
|
void |
disconnected(DipSubscription subscription,
String reason)
Will be called when the subscription has been disconnected from the message
provider (Due to the publisher becoming unavailable or some failure in the
DIP protocol).
|
void |
handleException(DipSubscription subscription,
Exception ex)
Will be called when an exception, other than the disconnection has occured.
|
void |
handleMessage(DipSubscription subscription,
DipData message)
Will be called on reception of updated publication information.
|
void handleMessage(DipSubscription subscription, DipData message)
subscription
- - the subscription object whose publication has been updated (Thus allowing one handler to be used for
multiple subscribtions).message
- - contains updated publication data. The value, timestamp, data quality etc. can be extracted from the message with
DipData methods.void disconnected(DipSubscription subscription, String reason)
subscription
- - indicates which subscription is broken (DIP will automatically attempt to resubscribe).reason
- - why the subscription broke.void connected(DipSubscription subscription)
subscription
- - indicates which subscription is restored/active.void handleException(DipSubscription subscription, Exception ex)
subscription
- the subscription this is causing the problemex
- problem descriptionCopyright © 2008–2017 CERN. All rights reserved.