DistributionServiceDelegate

public interface DistributionServiceDelegate

This is an interface providing methods to get the Content of an updated topic and distribute it to all the subscribers for that topic.

Author:Anuranjan

Methods

distribute

void distribute(String callbackUrl, String content, MediaType contentType, String topicUrl)

Distributes the fetched content to all the subscribers subscribed to the particular topic.

Parameters:
  • callbackUrl
    • a String representing the subscriber’s callback URL where notifications should be delivered
  • content
    • a String representing the full content of the updated topic
  • contentType
    • a String representing the Content-Type of the topic updated
  • topicUrl
    • a String representing the URL of the topic which is updated

getContent

ResponseEntity<String> getContent(String topicUrl)

Fetches the content from a publisher corresponding to the topicUrl.

Parameters:
  • topicUrl
    • a String representing the topic URL which is updated
Returns:

ResponseEntity containing fetched content