public interface SubscriptionStateHeader extends Parameters, Header
NOTIFY requests MUST contain SubscriptionState headers which indicate the status of the subscription. The subscription states are:
Modifier and Type | Field and Description |
---|---|
static String |
ACTIVE
State: The subscription has been accepted and (in general) has been
authorized.
|
static String |
DEACTIVATED
Reason Code: The subscription has been terminated, but the subscriber SHOULD retry
immediately with a new subscription.
|
static String |
GIVE_UP
Reason Code: The subscription has been terminated because the notifier could not
obtain authorization in a timely fashion.
|
static String |
NAME
Name of SubscriptionStateHeader
|
static String |
NO_RESOURCE
Reason Code: The subscription has been terminated because the resource state which was
being monitored no longer exists.
|
static String |
PENDING
State: The subscription has been received by the notifier, but there is
insufficient policy information to grant or deny the subscription yet.
|
static String |
PROBATION
Reason Code: The subscription has been terminated, but the client SHOULD retry at
some later time.
|
static String |
REJECTED
Reason Code: The subscription has been terminated due to change in authorization
policy.
|
static String |
TERMINATED
State: The subscription has been terminated, if a reason code is present,
the client should behave as described in the reason code.
|
static String |
TIMEOUT
Reason Code: The subscription has been terminated because it was not refreshed before
it expired.
|
static String |
UNKNOWN
Reason Code: The reason why the subscription was terminated is Unknown.
|
Modifier and Type | Method and Description |
---|---|
int |
getExpires()
Gets the expires value of the SubscriptionStateHeader.
|
String |
getReasonCode()
Gets the reason code of SubscriptionStateHeader.
|
int |
getRetryAfter()
Gets the retry after value of the SubscriptionStateHeader.
|
String |
getState()
Gets the state of SubscriptionStateHeader.
|
void |
setExpires(int expires)
Sets the relative expires value of the SubscriptionStateHeader.
|
void |
setReasonCode(String reasonCode)
Sets the reason code value of the SubscriptionStateHeader.
|
void |
setRetryAfter(int retryAfter)
Sets the retry after value of the SubscriptionStateHeader.
|
void |
setState(String state)
Sets the state value of the SubscriptionStateHeader.
|
getParameter, getParameterNames, removeParameter, setParameter
static final String NAME
static final String UNKNOWN
static final String DEACTIVATED
static final String PROBATION
static final String REJECTED
static final String TIMEOUT
static final String GIVE_UP
static final String NO_RESOURCE
static final String ACTIVE
static final String TERMINATED
static final String PENDING
void setExpires(int expires) throws InvalidArgumentException
expires
- - the new expires value of this SubscriptionStateHeader.InvalidArgumentException
- if supplied value is less than zero.int getExpires()
void setRetryAfter(int retryAfter) throws InvalidArgumentException
retryAfter
- - the new retry after value of this SubscriptionStateHeaderInvalidArgumentException
- if supplied value is less than zero.int getRetryAfter()
String getReasonCode()
void setReasonCode(String reasonCode) throws ParseException
reasonCode
- - the new reason code string value of the SubscriptionStateHeader.ParseException
- which signals that an error has been reached
unexpectedly while parsing the reason code.String getState()
void setState(String state) throws ParseException
state
- - the new state string value of the SubscriptionStateHeader.ParseException
- which signals that an error has been reached
unexpectedly while parsing the state.Copyright © 2017. All Rights Reserved.