Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

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

public enum JingleAction
extends Enum<JingleAction>

XEP-0166 Jingle, stipulates that the value of the 'action' attribute MUST be one of the values enumerated here. If an entity receives a value not defined here, it MUST ignore the attribute and MUST return a error to the sender. There is no default value for the 'action' attribute.

Author:
Emil Ivov

Enum Constant Summary
CONTENT_ACCEPT
          The content-accept action is used to accept a content-add action received from another party.
CONTENT_ADD
          The content-add action is used to add one or more new content definitions to the session.
CONTENT_MODIFY
          The content-modify action is used to change the direction of an existing content definition through modification of the 'senders' attribute.
CONTENT_REJECT
          The content-reject action is used to reject a content-add action received from another party.
CONTENT_REMOVE
          The content-remove action is used to remove one or more content definitions from the session.
DESCRIPTION_INFO
          The description-info action is used to send informational hints about parameters related to the application type, such as the suggested height and width of a video display area or suggested configuration for an audio stream.
SECURITY_INFO
          The security-info action is used to send information related to establishment or maintenance of security preconditions.
SESSION_ACCEPT
          The session-accept action is used to definitively accept a session negotiation (implicitly this action also serves as a content-accept).
SESSION_INFO
          The session-info action is used to send information related to establishment or maintenance of security preconditions.
SESSION_INITIATE
          The session-initiate action is used to request negotiation of a new Jingle session.
SESSION_TERMINATE
          The session-terminate action is used to end an existing session.
TRANSPORT_ACCEPT
          The transport-accept action is used to accept a transport-replace action received from another party.
TRANSPORT_INFO
          The transport-info action is used to exchange transport candidates; it is mainly used in Jingle ICE-UDP but might be used in other transport specifications.
TRANSPORT_REJECT
          The transport-reject action is used to reject a transport-replace action received from another party.
TRANSPORT_REPLACE
          The transport-replace action is used to redefine a transport method, typically for fallback to a different method (e.g., changing from ICE-UDP to Raw UDP for a datagram transport, or changing from SOCKS5 Bytestreams to In-Band Bytestreams [27] for a streaming transport).
 
Method Summary
static JingleAction parseString(String jingleActionStr)
          Returns a JingleAction value corresponding to the specified jingleActionStr or in other words SESSION_INITIATE for "session-initiate" or TRANSPORT_ACCEPT for "transport-accept").
 String toString()
          Returns the name of this JingleAction (e.g.
static JingleAction valueOf(String name)
          Returns the enum constant of this type with the specified name.
static JingleAction[] 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

CONTENT_ACCEPT

public static final JingleAction CONTENT_ACCEPT
The content-accept action is used to accept a content-add action received from another party.


CONTENT_ADD

public static final JingleAction CONTENT_ADD
The content-add action is used to add one or more new content definitions to the session. The sender MUST specify only the added content definition(s), not the added content definition(s) plus the existing content definition(s). Therefore it is the responsibility of the recipient to maintain a local copy of the current content definition(s). If the recipient wishes to include the new content definition in the session, it MUST send a content-accept action to the other party; if not, it MUST send a content-reject action to the other party.


CONTENT_MODIFY

public static final JingleAction CONTENT_MODIFY
The content-modify action is used to change the direction of an existing content definition through modification of the 'senders' attribute. If the recipient deems the directionality of a content-modify action to be unacceptable, it MAY reply with a contrary content-modify action, terminate the session, or simply refuse to send or accept application data in the new direction. In any case, the recipient MUST NOT send a content-accept action in response to the content-modify.


CONTENT_REJECT

public static final JingleAction CONTENT_REJECT
The content-reject action is used to reject a content-add action received from another party.


CONTENT_REMOVE

public static final JingleAction CONTENT_REMOVE
The content-remove action is used to remove one or more content definitions from the session. The sender MUST specify only the removed content definition(s), not the removed content definition(s) plus the remaining content definition(s). Therefore it is the responsibility of the recipient to maintain a local copy of the current content definition(s). Upon receiving a content-remove from the other party, the recipient MUST NOT send a content-accept and MUST NOT continue to negotiate the transport method or send application data related to that content definition.

If the content-remove results in zero content definitions for the session, the entity that receives the content-remove SHOULD send a session-terminate action to the other party (since a session with no content definitions is void).


DESCRIPTION_INFO

public static final JingleAction DESCRIPTION_INFO
The description-info action is used to send informational hints about parameters related to the application type, such as the suggested height and width of a video display area or suggested configuration for an audio stream.


SECURITY_INFO

public static final JingleAction SECURITY_INFO
The security-info action is used to send information related to establishment or maintenance of security preconditions.


SESSION_ACCEPT

public static final JingleAction SESSION_ACCEPT
The session-accept action is used to definitively accept a session negotiation (implicitly this action also serves as a content-accept). A session-accept action indicates a willingness to proceed with the session (which might necessitate further negotiation before media can be exchanged). The session-accept action indicates acceptance only of the content definition(s) whose disposition type is "session" (the default value of the element's 'disposition' attribute), not any content definition(s) whose disposition type is something other than "session" (e.g., "early-session" for early media). In the session-accept stanza, the element MUST contain one or more elements, each of which MUST contain one element and one element.


SESSION_INFO

public static final JingleAction SESSION_INFO
The session-info action is used to send information related to establishment or maintenance of security preconditions.


SESSION_INITIATE

public static final JingleAction SESSION_INITIATE
The session-initiate action is used to request negotiation of a new Jingle session. When sending a session-initiate with one element, the value of the element's 'disposition' attribute MUST be "session" (if there are multiple elements then at least one MUST have a disposition of "session"); if this rule is violated, the responder MUST return a error to the initiator.


SESSION_TERMINATE

public static final JingleAction SESSION_TERMINATE
The session-terminate action is used to end an existing session.


TRANSPORT_ACCEPT

public static final JingleAction TRANSPORT_ACCEPT
The transport-accept action is used to accept a transport-replace action received from another party.


TRANSPORT_INFO

public static final JingleAction TRANSPORT_INFO
The transport-info action is used to exchange transport candidates; it is mainly used in Jingle ICE-UDP but might be used in other transport specifications.


TRANSPORT_REJECT

public static final JingleAction TRANSPORT_REJECT
The transport-reject action is used to reject a transport-replace action received from another party.


TRANSPORT_REPLACE

public static final JingleAction TRANSPORT_REPLACE
The transport-replace action is used to redefine a transport method, typically for fallback to a different method (e.g., changing from ICE-UDP to Raw UDP for a datagram transport, or changing from SOCKS5 Bytestreams to In-Band Bytestreams [27] for a streaming transport). If the recipient wishes to use the new transport definition, it MUST send a transport-accept action to the other party; if not, it MUST send a transport-reject action to the other party.

Method Detail

values

public static JingleAction[] 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 (JingleAction c : JingleAction.values())
    System.out.println(c);

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

valueOf

public static JingleAction 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 JingleAction (e.g. "session-initiate" or "transport-accept"). The name returned by this method is meant for use directly in the XMPP XML string.

Overrides:
toString in class Enum<JingleAction>
Returns:
Returns the name of this JingleAction (e.g. "session-initiate" or "transport-accept").

parseString

public static JingleAction parseString(String jingleActionStr)
                                throws IllegalArgumentException
Returns a JingleAction value corresponding to the specified jingleActionStr or in other words SESSION_INITIATE for "session-initiate" or TRANSPORT_ACCEPT for "transport-accept").

Parameters:
jingleActionStr - the action String that we'd like to parse.
Returns:
a JingleAction value corresponding to the specified jingleActionStr.
Throws:
IllegalArgumentException - in case jingleActionStr 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.