Package io.vantiq.client
Interface SubscriptionCallback
public interface SubscriptionCallback
Interface that listens for events subscribed to from a
Vantiq server.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCalled once the connection has been established and the subscription has been acknowledged by the Vantiq server.voidCalled whenever an error occurs that does not arise from an exception, such as if a non-success response is provided.voidCalled whenever an exception occurs during the subscription processing.voidonMessage(SubscriptionMessage message) Called for every matching event that occurs
-
Method Details
-
onConnect
void onConnect()Called once the connection has been established and the subscription has been acknowledged by the Vantiq server. -
onMessage
Called for every matching event that occurs- Parameters:
message- The information associated with the event
-
onError
Called whenever an error occurs that does not arise from an exception, such as if a non-success response is provided.- Parameters:
error- The error message
-
onFailure
Called whenever an exception occurs during the subscription processing.- Parameters:
t- The exception thrown
-