org.lastbamboo.common.sip.stack.codec
Enum SipMessageType

java.lang.Object
  extended by java.lang.Enum<SipMessageType>
      extended by org.lastbamboo.common.sip.stack.codec.SipMessageType
All Implemented Interfaces:
Serializable, Comparable<SipMessageType>

public enum SipMessageType
extends Enum<SipMessageType>

Enumeration of first words in SIP messages. Most are request types, while the SIP version indicates a response.


Enum Constant Summary
DOUBLE_CRLF
          The double CRLF keep-alive message from SIP outbound.
INVITE
          INVITE method.
REGISTER
          REGISTER method.
SIP_2_0
          SIP/2.0 version string.
UNKNOWN
          Unknown message type.
 
Method Summary
static boolean contains(String type)
          Returns whether or not the specified string matches one of the message types.
 String convert()
          Converts the enum to a String.
static SipMessageType convert(String type)
          Converts from the int type representation to the enum equivalent.
static SipMessageType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SipMessageType[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

REGISTER

public static final SipMessageType REGISTER
REGISTER method.


INVITE

public static final SipMessageType INVITE
INVITE method.


SIP_2_0

public static final SipMessageType SIP_2_0
SIP/2.0 version string.


DOUBLE_CRLF

public static final SipMessageType DOUBLE_CRLF
The double CRLF keep-alive message from SIP outbound.


UNKNOWN

public static final SipMessageType UNKNOWN
Unknown message type.

Method Detail

values

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

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

valueOf

public static SipMessageType 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

convert

public String convert()
Converts the enum to a String.

Returns:
The String for the enum.

convert

public static SipMessageType convert(String type)
Converts from the int type representation to the enum equivalent.

Parameters:
type - The int type.
Returns:
The corresponding enum value.

contains

public static boolean contains(String type)
Returns whether or not the specified string matches one of the message types.

Parameters:
type - The type to match.
Returns:
true if there's a matching type, otherwise false.


Copyright © 2013 LittleShoot. All Rights Reserved.