org.jsmpp.bean
Enum BindType

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

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

Enum represent bind type of SMPP. There is 3 bind type provide by SMPP:

Since:
1.0
Version:
1.0
Author:
uudashr

Enum Constant Summary
BIND_RX
          Bind receiver.
BIND_TRX
          Bind transceiver.
BIND_TX
          Bind transmitter.
 
Field Summary
private  int bindCommandId
           
 
Method Summary
 int commandId()
          Get the command_id of given bind type.
 boolean isReceiveable()
          Inform whether the bind type is receivable.
 boolean isTransmitable()
          Inform whether the bind type is transmitable.
 int responseCommandId()
          Return the response command_id that should given by this bind type.
static BindType valueOf(int bindCommandId)
          Get the BindType by specified command_id.
static BindType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static BindType[] 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

BIND_TX

public static final BindType BIND_TX
Bind transmitter.


BIND_RX

public static final BindType BIND_RX
Bind receiver.


BIND_TRX

public static final BindType BIND_TRX
Bind transceiver.

Field Detail

bindCommandId

private int bindCommandId
Method Detail

values

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

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

valueOf

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

commandId

public int commandId()
Get the command_id of given bind type.

Returns:
the bind command_id.

responseCommandId

public int responseCommandId()
Return the response command_id that should given by this bind type.

Returns:
the bind response command_id.

isTransmitable

public boolean isTransmitable()
Inform whether the bind type is transmitable.

Returns:
true f the bind type is transmitable, otherwise false.

isReceiveable

public boolean isReceiveable()
Inform whether the bind type is receivable.

Returns:
true if the bind type is receivable, otherwise false.

valueOf

public static final BindType valueOf(int bindCommandId)
                              throws java.lang.IllegalArgumentException
Get the BindType by specified command_id.

Parameters:
bindCommandId - is the command_id.
Returns:
the enum const associated with the specified bindCommandId.
Throws:
java.lang.IllegalArgumentException - if there is no BindType associated with specified bindCommandId found.