Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.jabber.extensions.jingle
Enum Reason

java.lang.Object
  extended by java.lang.Enum<Reason>
      extended by net.java.sip.communicator.impl.protocol.jabber.extensions.jingle.Reason
All Implemented Interfaces:
Serializable, Comparable<Reason>

public enum Reason
extends Enum<Reason>

This enumeration contains the reason values that provide machine readable information about the condition that prompted the corresponding jingle action.

Author:
Emil Ivov

Enum Constant Summary
ALTERNATIVE_SESSION
          A reason indicating that the party prefers to use an existing session with the peer rather than initiate a new session; the Jingle session ID of the alternative session SHOULD be provided as the XML character data of the child.
BUSY
          A reason indicating that the party is busy and cannot accept a session.
CANCEL
          A reason indicating that the initiator wishes to formally cancel the session initiation request.
CONNECTIVITY_ERROR
          A reason indicating that the action is related to connectivity problems.
DECLINE
          A reason indicating that the party wishes to formally decline the session.
EXPIRED
          A reason indicating that the session length has exceeded a pre-defined time limit (e.g., a meeting hosted at a conference service).
FAILED_APPLICATION
          A reason indicating that the party has been unable to initialize processing related to the application type.
FAILED_TRANSPORT
          A reason indicating that the party has been unable to establish connectivity for the transport method.
GENERAL_ERROR
          A reason indicating that the action is related to a non-specific application error.
GONE
          A reason indicating that the entity is going offline or is no longer available.
INCOMPATIBLE_PARAMETERS
          A reason indicating that the party supports the offered application type but does not support the offered or negotiated parameters.
MEDIA_ERROR
          A reason indicating that the action is related to media processing problems.
SECURITY_ERROR
          A reason indicating that the action is related to a violation of local security policies.
SUCCESS
          A reason indicating that the action is generated during the normal course of state management and does not reflect any error.
TIMEOUT
          A reason indicating that a request has not been answered so the sender is timing out the request.
UNSUPPORTED_APPLICATIONS
          A reason indicating that the party supports none of the offered application types.
UNSUPPORTED_TRANSPORTS
          A reason indicating that the party supports none of the offered transport methods.
 
Method Summary
static Reason parseString(String reasonValueStr)
          Returns a Reason value corresponding to the specified reasonValueStr or in other words SUCCESS for "success" or TIMEOUT for "timeout").
 String toString()
          Returns the name of this reason (e.g.
static Reason valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Reason[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ALTERNATIVE_SESSION

public static final Reason ALTERNATIVE_SESSION
A reason indicating that the party prefers to use an existing session with the peer rather than initiate a new session; the Jingle session ID of the alternative session SHOULD be provided as the XML character data of the child.


BUSY

public static final Reason BUSY
A reason indicating that the party is busy and cannot accept a session.


CANCEL

public static final Reason CANCEL
A reason indicating that the initiator wishes to formally cancel the session initiation request.


CONNECTIVITY_ERROR

public static final Reason CONNECTIVITY_ERROR
A reason indicating that the action is related to connectivity problems.


DECLINE

public static final Reason DECLINE
A reason indicating that the party wishes to formally decline the session.


EXPIRED

public static final Reason EXPIRED
A reason indicating that the session length has exceeded a pre-defined time limit (e.g., a meeting hosted at a conference service).


FAILED_APPLICATION

public static final Reason FAILED_APPLICATION
A reason indicating that the party has been unable to initialize processing related to the application type.


FAILED_TRANSPORT

public static final Reason FAILED_TRANSPORT
A reason indicating that the party has been unable to establish connectivity for the transport method.


GENERAL_ERROR

public static final Reason GENERAL_ERROR
A reason indicating that the action is related to a non-specific application error.


GONE

public static final Reason GONE
A reason indicating that the entity is going offline or is no longer available.


INCOMPATIBLE_PARAMETERS

public static final Reason INCOMPATIBLE_PARAMETERS
A reason indicating that the party supports the offered application type but does not support the offered or negotiated parameters.


MEDIA_ERROR

public static final Reason MEDIA_ERROR
A reason indicating that the action is related to media processing problems.


SECURITY_ERROR

public static final Reason SECURITY_ERROR
A reason indicating that the action is related to a violation of local security policies.


SUCCESS

public static final Reason SUCCESS
A reason indicating that the action is generated during the normal course of state management and does not reflect any error.


TIMEOUT

public static final Reason TIMEOUT
A reason indicating that a request has not been answered so the sender is timing out the request.


UNSUPPORTED_APPLICATIONS

public static final Reason UNSUPPORTED_APPLICATIONS
A reason indicating that the party supports none of the offered application types.


UNSUPPORTED_TRANSPORTS

public static final Reason UNSUPPORTED_TRANSPORTS
A reason indicating that the party supports none of the offered transport methods.

Method Detail

values

public static Reason[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Reason c : Reason.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Reason valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

toString

public String toString()
Returns the name of this reason (e.g. "success" or "timeout"). The name returned by this method is meant for use directly in the XMPP XML string.

Overrides:
toString in class Enum<Reason>
Returns:
the name of this reason (e.g. "success" or "timeout").

parseString

public static Reason parseString(String reasonValueStr)
                          throws IllegalArgumentException
Returns a Reason value corresponding to the specified reasonValueStr or in other words SUCCESS for "success" or TIMEOUT for "timeout").

Parameters:
reasonValueStr - the action String that we'd like to parse.
Returns:
a JingleAction value corresponding to the specified jingleValueStr.
Throws:
IllegalArgumentException - in case reasonValueStr is not a valid media direction.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.