org.jsmpp.extra
Enum SessionState

java.lang.Object
  extended by java.lang.Enum<SessionState>
      extended by org.jsmpp.extra.SessionState
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SessionState>

public enum SessionState
extends java.lang.Enum<SessionState>

Enum constant represent session state.

Since:
1.0
Version:
1.0
Author:
uudashr

Enum Constant Summary
BOUND_RX
          Bound receiver, means bound receive has been initiated.
BOUND_TRX
          Bound transceiver, means bound transceive has been initiated.
BOUND_TX
          Bound transmitter, means bound transmit has been initiated.
CLOSED
          There is no connection at all.
OPEN
          Open, means connection has established but not bounded.
OUTBOUND
          Outbound, means the session is in outbound state, ready to initiate bound.
UNBOUND
          Unbound, means unbound has been initiated but the connection hasn't been closed.
 
Method Summary
 boolean isBound()
          Check whether the session state is bound.
 boolean isReceivable()
          Check whether the session state is receivable.
 boolean isTransmittable()
          Check whether the session state is transmittable.
static SessionState valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SessionState[] 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

OPEN

public static final SessionState OPEN
Open, means connection has established but not bounded.


BOUND_TX

public static final SessionState BOUND_TX
Bound transmitter, means bound transmit has been initiated.


BOUND_RX

public static final SessionState BOUND_RX
Bound receiver, means bound receive has been initiated.


BOUND_TRX

public static final SessionState BOUND_TRX
Bound transceiver, means bound transceive has been initiated.


UNBOUND

public static final SessionState UNBOUND
Unbound, means unbound has been initiated but the connection hasn't been closed.


CLOSED

public static final SessionState CLOSED
There is no connection at all.


OUTBOUND

public static final SessionState OUTBOUND
Outbound, means the session is in outbound state, ready to initiate bound.

Method Detail

values

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

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

valueOf

public static SessionState valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

isBound

public boolean isBound()
Check whether the session state is bound.

Returns:
true if session state is bound state

isTransmittable

public boolean isTransmittable()
Check whether the session state is transmittable.

Returns:
true if session is transmittable.

isReceivable

public boolean isReceivable()
Check whether the session state is receivable.

Returns:
true if session is receivable.