public class Subscription extends Object
Modifier and Type | Field and Description |
---|---|
static String |
REASON_DEACTIVATED
The subscription has been terminated, but the subscriber SHOULD retry
immediately with a new subscription.
|
static String |
REASON_GIVEUP
The subscription has been terminated because the notifier could not
obtain authorization in a timely fashion.
|
static String |
REASON_NORESOURCE
The subscription has been terminated because the resource state which was
being monitored no longer exists.
|
static String |
REASON_PROBATION
The subscription has been terminated, but the client SHOULD retry at some
later time.
|
static String |
REASON_REJECTED
The subscription has been terminated due to change in authorization
policy.
|
static String |
REASON_TIMEOUT
The subscription has been terminated because it was not refreshed before
it expired.
|
static String |
STATE_ACTIVE
The subscription has been accepted and (in general) has been authorized.
|
static String |
STATE_PENDING
The subscription has been received by the notifier, but there is
insufficient policy information to grant or deny the subscription yet.
|
static String |
STATE_TERMINATED
The subscription has been terminated.
|
Constructor and Description |
---|
Subscription(String value)
Constructor.
|
Subscription(String value,
String reason)
Constructor.
|
Subscription(String value,
String reason,
int expires)
Constructor.
|
Subscription(String value,
String reason,
int expires,
int retryAfter)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
getExpires()
Returns the expiration delay in seconds.
|
Series<Parameter> |
getParameters()
Returns the subscription parameters.
|
String |
getReason()
Returns the subscription reason.
|
long |
getRetryAfter()
Returns how long the service is expected to be unavailable.
|
String |
getValue()
Returns the subscription value.
|
void |
setExpires(long expires)
Sets the expiration delay in seconds.
|
void |
setParameters(Series<Parameter> parameters)
Sets the subscription parameters.
|
void |
setReason(String reason)
Sets the subscription reason.
|
void |
setRetryAfter(long retryAfter)
Sets how long the service is expected to be unavailable.
|
void |
setValue(String value)
Sets the subscription state value.
|
public static final String REASON_DEACTIVATED
public static final String REASON_GIVEUP
public static final String REASON_NORESOURCE
public static final String REASON_PROBATION
public static final String REASON_REJECTED
public static final String REASON_TIMEOUT
public static final String STATE_ACTIVE
public static final String STATE_PENDING
public static final String STATE_TERMINATED
public Subscription(String value)
value
- The subscription value.public Subscription(String value, String reason)
value
- The subscription value.reason
- The subscription reason.public Subscription(String value, String reason, int expires)
value
- The subscription value.reason
- The subscription reason.expires
- The expiration delay in seconds.public long getExpires()
public Series<Parameter> getParameters()
public String getReason()
public long getRetryAfter()
public String getValue()
public void setExpires(long expires)
expires
- The expiration delay in seconds.public void setParameters(Series<Parameter> parameters)
parameters
- The subscription parameters.public void setReason(String reason)
reason
- The subscription reason.public void setRetryAfter(long retryAfter)
retryAfter
- How long the service is expected to be unavailablepublic void setValue(String value)
value
- The subscription state value.Copyright © 2005–2014. All rights reserved.