Package io.mosip.kernel.core.websub.spi
Interface PublisherClient<T,P,H>
-
- Type Parameters:
T- type of topicP- type of payloadH- type of header
public interface PublisherClient<T,P,H>Implementer of this interface should be responsible basic tasks of a publisher according to websub specifications.- Author:
- Urvil Joshi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidnotifyUpdate(T topic, H headers, String hubURL)This method Notifies a remote WebSub Hub from which an update is available to fetch for hubs that require publishing to happen as such.voidpublishUpdate(T topic, P payload, String contentType, H headers, String hubURL)This method is responsible for publishing a update for a particular topic at hub according to websub specifications.voidregisterTopic(T topic, String hubURL)This method is responsible for registering a topic at hub according to websub specifications.voidunregisterTopic(T topic, String hubURL)This method is responsible for unregistering a topic at hub according to websub specifications.
-
-
-
Method Detail
-
registerTopic
void registerTopic(T topic, String hubURL)
This method is responsible for registering a topic at hub according to websub specifications.- Parameters:
topic- the topic to register by publisher.hubURL- url for register endpoint of hub.
-
unregisterTopic
void unregisterTopic(T topic, String hubURL)
This method is responsible for unregistering a topic at hub according to websub specifications.- Parameters:
topic- the topic to unregister by publisher.hubURL- url for unregister endpoint of hub.
-
publishUpdate
void publishUpdate(T topic, P payload, String contentType, H headers, String hubURL)
This method is responsible for publishing a update for a particular topic at hub according to websub specifications.- Parameters:
topic- the topic to be updated by publisher.payload- payload to be send as update.contentType- content type of payload.headers- additional headers to be sent with update.hubURL- url for publish endpoint of hub.
-
notifyUpdate
void notifyUpdate(T topic, H headers, String hubURL)
This method Notifies a remote WebSub Hub from which an update is available to fetch for hubs that require publishing to happen as such.- Parameters:
topic- the topic to be notified by publisherheaders- additional headers to be sent with notify.hubURL- url for notify endpoint of hub.
-
-