| javax.sip.header.SubscriptionStateHeader
SubscriptionStateHeader | public interface SubscriptionStateHeader extends Parameters,Header(Code) | | This interface represents the Subscription State header, as
defined by RFC3265, this
header is not part of RFC3261.
NOTIFY requests MUST contain SubscriptionState headers which indicate the
status of the subscription. The subscription states are:
- active - If the SubscriptionState header value is "active", it means
that the subscription has been accepted and (in general) has been authorized.
If the header also contains an "expires" parameter, the subscriber SHOULD
take it as the authoritative subscription duration and adjust accordingly.
The "retry-after" and "reason" parameters have no semantics for "active".
- pending - If the SubscriptionState value is "pending", the
subscription has been received by the notifier, but there is insufficient
policy information to grant or deny the subscription yet. If the header also
contains an "expires" parameter, the subscriber SHOULD take it as the
authoritative subscription duration and adjust accordingly. No further
action is necessary on the part of the subscriber. The "retry-after" and
"reason" parameters have no semantics for "pending".
- terminated - If the SubscriptionState value is "terminated", the
subscriber should consider the subscription terminated. The "expires"
parameter has no semantics for "terminated". If a reason code is present, the
client should behave as described in the reason code defined in this Header.
If no reason code or an unknown reason code is present, the client MAY
attempt to re-subscribe at any time (unless a "retry-after" parameter is
present, in which case the client SHOULD NOT attempt re-subscription until
after the number of seconds specified by the "retry-after" parameter).
author: BEA Systems, NIST version: 1.2 |
Field Summary | |
final public static String | ACTIVE State: The subscription has been accepted and (in general) has been
authorized. | final public static String | DEACTIVATED Reason Code: The subscription has been terminated, but the subscriber SHOULD retry
immediately with a new subscription. | final public static String | GIVE_UP Reason Code: The subscription has been terminated because the notifier could not
obtain authorization in a timely fashion. | final public static String | NAME | final public static String | NO_RESOURCE Reason Code: The subscription has been terminated because the resource state which was
being monitored no longer exists. | final public 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. | final public static String | PROBATION Reason Code: The subscription has been terminated, but the client SHOULD retry at
some later time. | final public static String | REJECTED Reason Code: The subscription has been terminated due to change in authorization
policy. | final public 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. | final public static String | TIMEOUT Reason Code: The subscription has been terminated because it was not refreshed before
it expired. | final public static String | UNKNOWN Reason Code: The reason why the subscription was terminated is Unknown. |
Method Summary | |
public int | getExpires() Gets the expires value of the SubscriptionStateHeader. | public String | getReasonCode() Gets the reason code of SubscriptionStateHeader. | public int | getRetryAfter() Gets the retry after value of the SubscriptionStateHeader. | public String | getState() Gets the state of SubscriptionStateHeader. | public void | setExpires(int expires) Sets the relative expires value of the SubscriptionStateHeader. | public void | setReasonCode(String reasonCode) Sets the reason code value of the SubscriptionStateHeader. | public void | setRetryAfter(int retryAfter) Sets the retry after value of the SubscriptionStateHeader. | public void | setState(String state) Sets the state value of the SubscriptionStateHeader. |
ACTIVE | final public static String ACTIVE(Code) | | State: The subscription has been accepted and (in general) has been
authorized.
|
DEACTIVATED | final public static String DEACTIVATED(Code) | | Reason Code: The subscription has been terminated, but the subscriber SHOULD retry
immediately with a new subscription. One primary use of such a status
code is to allow migration of subscriptions between nodes. The
"retry-after" parameter has no semantics for "deactivated".
|
GIVE_UP | final public static String GIVE_UP(Code) | | Reason Code: The subscription has been terminated because the notifier could not
obtain authorization in a timely fashion. If a "retry-after" parameter
is also present, the client SHOULD wait at least the number of seconds
specified by that parameter before attempting to re-subscribe; otherwise,
the client MAY retry immediately, but will likely get put back into
pending state.
|
NAME | final public static String NAME(Code) | | Name of SubscriptionStateHeader
|
NO_RESOURCE | final public static String NO_RESOURCE(Code) | | Reason Code: The subscription has been terminated because the resource state which was
being monitored no longer exists. Clients SHOULD NOT attempt to
re-subscribe. The "retry-after" parameter has no semantics for "noresource".
|
PENDING | final public static String PENDING(Code) | | State: The subscription has been received by the notifier, but there is
insufficient policy information to grant or deny the subscription yet.
|
PROBATION | final public static String PROBATION(Code) | | Reason Code: The subscription has been terminated, but the client SHOULD retry at
some later time. If a "retry-after" parameter is also present, the client
SHOULD wait at least the number of seconds specified by that parameter
before attempting to re-subscribe.
|
REJECTED | final public static String REJECTED(Code) | | Reason Code: The subscription has been terminated due to change in authorization
policy. Clients SHOULD NOT attempt to re-subscribe. The "retry-after"
parameter has no semantics for "rejected".
|
TERMINATED | final public static String TERMINATED(Code) | | State: The subscription has been terminated, if a reason code is present,
the client should behave as described in the reason code.
|
TIMEOUT | final public static String TIMEOUT(Code) | | Reason Code: The subscription has been terminated because it was not refreshed before
it expired. Clients MAY re-subscribe immediately. The "retry-after"
parameter has no semantics for "timeout".
|
UNKNOWN | final public static String UNKNOWN(Code) | | Reason Code: The reason why the subscription was terminated is Unknown.
|
getExpires | public int getExpires()(Code) | | Gets the expires value of the SubscriptionStateHeader. This expires value is
relative time.
the expires value of the SubscriptionStateHeader. |
getReasonCode | public String getReasonCode()(Code) | | Gets the reason code of SubscriptionStateHeader.
the comment of this SubscriptionStateHeader, return null if no reason codeis available. |
getRetryAfter | public int getRetryAfter()(Code) | | Gets the retry after value of the SubscriptionStateHeader. This retry after
value is relative time.
the retry after value of the SubscriptionStateHeader. |
getState | public String getState()(Code) | | Gets the state of SubscriptionStateHeader.
the state of this SubscriptionStateHeader. |
setExpires | public void setExpires(int expires) throws InvalidArgumentException(Code) | | Sets the relative expires value of the SubscriptionStateHeader. The
expires value MUST be greater than zero and MUST be less than 2**31.
Parameters: expires - - the new expires value of this SubscriptionStateHeader. throws: InvalidArgumentException - if supplied value is less than zero. |
setReasonCode | public void setReasonCode(String reasonCode) throws ParseException(Code) | | Sets the reason code value of the SubscriptionStateHeader.
Parameters: reasonCode - - the new reason code string value of the SubscriptionStateHeader. throws: ParseException - which signals that an error has been reachedunexpectedly while parsing the reason code. |
setRetryAfter | public void setRetryAfter(int retryAfter) throws InvalidArgumentException(Code) | | Sets the retry after value of the SubscriptionStateHeader. The retry after value
MUST be greater than zero and MUST be less than 2**31.
Parameters: retryAfter - - the new retry after value of this SubscriptionStateHeader throws: InvalidArgumentException - if supplied value is less than zero. |
setState | public void setState(String state) throws ParseException(Code) | | Sets the state value of the SubscriptionStateHeader.
Parameters: state - - the new state string value of the SubscriptionStateHeader. throws: ParseException - which signals that an error has been reachedunexpectedly while parsing the state. |
|
|