Class SubscriptionRequest
- java.lang.Object
-
- org.forgerock.openig.tools.notifications.ws.SubscriptionRequest
-
public final class SubscriptionRequest extends Object
ASubscriptionRequest
is a message send to the notification server when subscribing to a topic.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SubscriptionRequest.Action
The different kind of subscription requests.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SubscriptionRequest.Action
getAction()
Returns this message's action.String
getId()
Returns this message's correlation id.String
getTopic()
Returns the topic name.static SubscriptionRequest
subscribeTo(String id, String topic)
Builds a subscription request.static SubscriptionRequest
unsubscribeFrom(String id, String topic)
Builds an un-subscription request.
-
-
-
Method Detail
-
subscribeTo
public static SubscriptionRequest subscribeTo(String id, String topic)
Builds a subscription request.- Parameters:
id
- correlation id (notnull
)topic
- topic to subscribe for (notnull
)- Returns:
- a subscription message
-
unsubscribeFrom
public static SubscriptionRequest unsubscribeFrom(String id, String topic)
Builds an un-subscription request.- Parameters:
id
- correlation id (notnull
)topic
- topic to un-subscribe from (notnull
)- Returns:
- an un-subscription message
-
getId
public String getId()
Returns this message's correlation id.- Returns:
- this message's correlation id.
-
getTopic
public String getTopic()
Returns the topic name.- Returns:
- the topic name.
-
getAction
public SubscriptionRequest.Action getAction()
Returns this message's action.- Returns:
- this message's action.
-
-