HubSubscription

public class HubSubscription implements java.io.Serializable

Stores the subscription details of a topic.

Constructors

HubSubscription

public HubSubscription()

Creates a new instance of HubSubscription, with all fields set to null.

HubSubscription

public HubSubscription(Integer hubTopicId, Integer hubSubscriptionStatusId, String callbackUrl)

Creates a new instance of HubSubscription, with all fields set to the values specified in the parameters.

Parameters:
  • hubTopicId – the id of a topic
  • hubSubscriptionStatusId – the id of a subscription status
  • callbackUrl – the callback url

HubSubscription

public HubSubscription(Integer hubTopicId, Integer hubSubscriptionStatusId, String callbackUrl, Integer leaseSeconds, String secret)

Creates a new instance of HubSubscription, with all fields set to the values specified in the parameters.

Parameters:
  • hubTopicId – the id of a topic
  • hubSubscriptionStatusId – the id of a subscription status
  • callbackUrl – the callback url
  • leaseSeconds – the time in seconds for which the subscription will be active
  • secret – the secret value for HMAC digest computing

Methods

getCallbackUrl

public String getCallbackUrl()

Gets the callback url.

Returns:the callback url

getHubSubscriptionStatusId

public Integer getHubSubscriptionStatusId()

Gets the id of subscription status.

Returns:the id of subscription status

getHubTopicId

public Integer getHubTopicId()

Gets the id of topic.

Returns:the id of topic

getLeaseSeconds

public Integer getLeaseSeconds()

Gets lease seconds - number of seconds for which the subscriber will have his subscription active.

Returns:the amount of lease seconds

getSecret

public String getSecret()

Gets the secret value. Secret is a value used for computing an HMAC digest for authorized content distribution.

Returns:the secret value

setCallbackUrl

public void setCallbackUrl(String callbackUrl)

Sets the callback url.

Parameters:
  • callbackUrl – the callback url to be set

setHubSubscriptionStatusId

public void setHubSubscriptionStatusId(Integer hubSubscriptionStatusId)

Sets the id of subscription status.

Parameters:
  • hubSubscriptionStatusId – the subscription status id to be set

setHubTopicId

public void setHubTopicId(Integer hubTopicId)

Sets the id of topic.

Parameters:
  • hubTopicId – the topic id to be set

setLeaseSeconds

public void setLeaseSeconds(Integer leaseSeconds)

Sets lease seconds - number of seconds for which the subscriber will have his subscription active.

Parameters:
  • leaseSeconds – amount of lease seconds to be set

setSecret

public void setSecret(String secret)

Sets the secret value. Secret is a value used for computing an HMAN digest for authorized content distribution. It must be less than 200 bytes in length.

Parameters:
  • secret – the secret value to be set