Interface NotificationBackend
- All Superinterfaces:
Comparable<NotificationBackend>,JolokiaService<NotificationBackend>
A notification backend which is responsible for the final delivery. This final
delivery is done by a callback which a backend needs to create out of a given
config. Also, a backend has a type which helps the notification handler to find
the proper backend
- Since:
- 18.03.13
- Author:
- roland
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jolokia.server.core.service.api.JolokiaService
JolokiaService.Init -
Method Summary
Modifier and TypeMethodDescriptionvoidchannelInit(Client client, BackChannel channel) Callback method called when a channel has been created and opened.Return the global configuration specific for this backend.Type of this backendsubscribe(NotificationSubscription pSubscription) Create a specific callback for the given configuration.voidunregister(Client pClient) Unregister a clientvoidunsubscribe(String pClientId, String pHandle) Unsubscribe for the given notification.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.jolokia.server.core.service.api.JolokiaService
destroy, getOrder, getType, init
-
Method Details
-
getNotifType
String getNotifType()Type of this backend- Returns:
- type
-
subscribe
Create a specific callback for the given configuration. This callback will be called for every notification received- Parameters:
pSubscription- backend specific configuration which can be used for construction of the callback- Returns:
- callback which is called on reception of a notification.
-
channelInit
Callback method called when a channel has been created and opened. This can be used to start channel specific code like starting a heartbeat for SSE event.- Parameters:
client- the clientchannel- created channel
-
unsubscribe
Unsubscribe for the given notification. Time to clean up- Parameters:
pClientId- client idpHandle- handle id for notification to unsubscribe
-
unregister
Unregister a client- Parameters:
pClient- client id
-
getConfig
Return the global configuration specific for this backend. This can contain URL and other information and is returned to the client during registration The returned map must be serializable to JSON by Jolokia.- Returns:
- the backend specific global configuration
-