org.jsmpp.bean
Class OptionalParameters

java.lang.Object
  extended by org.jsmpp.bean.OptionalParameters

public class OptionalParameters
extends java.lang.Object

Author:
uudashr

Field Summary
private static org.slf4j.Logger logger
           
 
Constructor Summary
OptionalParameters()
           
 
Method Summary
static OptionalParameter deserialize(short tagCode, byte[] content)
          Deserialize all recognized tag code to OptionalParameter object.
static
<U extends OptionalParameter>
U
get(java.lang.Class<U> tagClass, OptionalParameter[] parameters)
           
static OptionalParameter get(short tag, OptionalParameter[] parameters)
           
static OptionalParameter.Short newSarMsgRefNum(int value)
          Create SAR_MESSAGE_REF_NUM TLV instance.
static OptionalParameter.Short newSarMsgRefNum(short value)
          Create SAR_MESSAGE_REF_NUM TLV instance.
static OptionalParameter.Byte newSarSegmentSeqnum(byte value)
          Create SAR_SEGMENT_SEQNUM TLV instance.
static OptionalParameter.Byte newSarSegmentSeqnum(int value)
          Create SAR_SEGMENT_SEQNUM TLV instance.
static OptionalParameter.Byte newSarTotalSegments(byte value)
          Create SAR_TOTAL_SEGMENTS TLV instance.
static OptionalParameter.Byte newSarTotalSegments(int value)
          Create SAR_TOTAL_SEGMENTS TLV instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final org.slf4j.Logger logger
Constructor Detail

OptionalParameters

public OptionalParameters()
Method Detail

newSarMsgRefNum

public static OptionalParameter.Short newSarMsgRefNum(short value)
Create SAR_MESSAGE_REF_NUM TLV instance.

Parameters:
value - is the value.
Returns:
the optional parameter.

newSarMsgRefNum

public static OptionalParameter.Short newSarMsgRefNum(int value)
Create SAR_MESSAGE_REF_NUM TLV instance. The value will cast automatically into short type.

Parameters:
value - is the value.
Returns:
the optional parameter.

newSarSegmentSeqnum

public static OptionalParameter.Byte newSarSegmentSeqnum(byte value)
Create SAR_SEGMENT_SEQNUM TLV instance.

Parameters:
value - is the value.
Returns:
the optional parameter.

newSarSegmentSeqnum

public static OptionalParameter.Byte newSarSegmentSeqnum(int value)
Create SAR_SEGMENT_SEQNUM TLV instance. The value will cast automatically into byte type.

Parameters:
value - is the value.
Returns:
the optional parameter.

newSarTotalSegments

public static OptionalParameter.Byte newSarTotalSegments(byte value)
Create SAR_TOTAL_SEGMENTS TLV instance.

Parameters:
value - is the value.
Returns:
the optional parameter.

newSarTotalSegments

public static OptionalParameter.Byte newSarTotalSegments(int value)
Create SAR_TOTAL_SEGMENTS TLV instance. The value will cast automatically into byte type.

Parameters:
value - is the value.
Returns:
the optional parameter.

deserialize

public static OptionalParameter deserialize(short tagCode,
                                            byte[] content)
Deserialize all recognized tag code to OptionalParameter object. Unrecognized will be classified as OptionalParameter.COctetString.

Parameters:
tagCode - is the tag code.
content - is the content.
Returns:
the OptionalParameter object.

get

public static <U extends OptionalParameter> U get(java.lang.Class<U> tagClass,
                                                  OptionalParameter[] parameters)

get

public static OptionalParameter get(short tag,
                                    OptionalParameter[] parameters)