org.mobicents.protocols.smpp.version
Interface SMPPVersion

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractSMPPVersion, SMPPVersion33, SMPPVersion34, SMPPVersion50

public interface SMPPVersion
extends Serializable

Representation of an SMPP version.

Version:
$Id: SMPPVersion.java 457 2009-01-15 17:37:42Z orank $

Field Summary
static SMPPVersion VERSION_3_3
          SMPP version 3.3.
static SMPPVersion VERSION_3_4
          SMPP version 3.4.
static SMPPVersion VERSION_5_0
          SMPP version 5.0.
 
Method Summary
 boolean equals(int versionID)
          Determine if the specified versionID matches this version's ID.
 int getMaxLength(MandatoryParameter mandatoryParameter)
          Get the maximum allowed length for a specified field.
 int getVersionID()
          Get an integer value representing this SMPP version.
 boolean isNewerThan(SMPPVersion otherVersion)
          Determine if this SMPP version is equal to or newer than another version.
 boolean isOlderThan(SMPPVersion otherVersion)
          Determine if this SMPP version is older than another version.
 boolean isSupported(int commandId)
          Determine if this SMPP version supports the specified command.
 boolean isSupportTLV()
          Determine if this SMPP version supports TLVs.
 void validateAddress(Address address)
           
 void validateAddressRange(String addressRange)
           
 void validateDataCoding(int dc)
           
 void validateDefaultMsg(int id)
           
 void validateDistListName(String name)
           
 void validateErrorCode(int code)
           
 void validateEsmClass(int c)
           
 void validateMessage(byte[] message, int start, int length)
           
 void validateMessageId(String id)
           
 void validateMessageState(int state)
           
 void validateNpi(int npi)
           
 void validateNumberOfDests(int num)
           
 void validateNumUnsuccessful(int num)
           
 void validateParamName(String paramName)
           
 void validateParamValue(String paramValue)
           
 void validatePassword(String password)
           
 void validatePriorityFlag(int flag)
           
 void validateProtocolID(int id)
           
 void validateRegisteredDelivery(int flag)
           
 void validateReplaceIfPresent(int flag)
           
 void validateServiceType(String type)
           
 void validateSystemId(String sysId)
           
 void validateSystemType(String sysType)
           
 void validateTon(int ton)
           
 

Field Detail

VERSION_3_3

static final SMPPVersion VERSION_3_3
SMPP version 3.3.


VERSION_3_4

static final SMPPVersion VERSION_3_4
SMPP version 3.4.


VERSION_5_0

static final SMPPVersion VERSION_5_0
SMPP version 5.0.

Method Detail

getVersionID

int getVersionID()
Get an integer value representing this SMPP version. At present, the SMPP specification uses a hex representation to identify versions; version 3.3 is represented by 0x33, version 3.4 is 0x34.

Returns:
An integer value that represents this integer version.

isOlderThan

boolean isOlderThan(SMPPVersion otherVersion)
Determine if this SMPP version is older than another version.

Parameters:
otherVersion - The version to test against.
Returns:
true if this version is older than otherVersion, false if it newer than it.

isNewerThan

boolean isNewerThan(SMPPVersion otherVersion)
Determine if this SMPP version is equal to or newer than another version.

Parameters:
otherVersion - The version to test against.
Returns:
true if this version is newer than otherVersion, false if it is equal to or older than it.

equals

boolean equals(int versionID)
Determine if the specified versionID matches this version's ID.

Parameters:
versionID - The version ID to test against.
Returns:
true if this version's ID matches versionID.

getMaxLength

int getMaxLength(MandatoryParameter mandatoryParameter)
Get the maximum allowed length for a specified field.

Parameters:
mandatoryParameter - The enumerated field identifier to get the maximum length for.
Returns:
The maximum length of the specified field.

isSupported

boolean isSupported(int commandId)
Determine if this SMPP version supports the specified command.

Parameters:
commandId - The command ID of the packet.
Returns:
true if the command is supported, false otherwise.

isSupportTLV

boolean isSupportTLV()
Determine if this SMPP version supports TLVs. This will be false for SMPP version 3.3 and true for versions 3.4 and later.

Returns:
true if this version supports TLV parameters, false otherwise.

validateAddress

void validateAddress(Address address)

validateTon

void validateTon(int ton)

validateNpi

void validateNpi(int npi)

validateAddressRange

void validateAddressRange(String addressRange)

validateEsmClass

void validateEsmClass(int c)

validateProtocolID

void validateProtocolID(int id)

validateDataCoding

void validateDataCoding(int dc)

validateDefaultMsg

void validateDefaultMsg(int id)

validateMessage

void validateMessage(byte[] message,
                     int start,
                     int length)

validateServiceType

void validateServiceType(String type)

validateMessageId

void validateMessageId(String id)

validateMessageState

void validateMessageState(int state)

validateErrorCode

void validateErrorCode(int code)

validatePriorityFlag

void validatePriorityFlag(int flag)

validateRegisteredDelivery

void validateRegisteredDelivery(int flag)

validateReplaceIfPresent

void validateReplaceIfPresent(int flag)

validateNumberOfDests

void validateNumberOfDests(int num)

validateNumUnsuccessful

void validateNumUnsuccessful(int num)

validateDistListName

void validateDistListName(String name)

validateSystemId

void validateSystemId(String sysId)

validatePassword

void validatePassword(String password)

validateSystemType

void validateSystemType(String sysType)

validateParamName

void validateParamName(String paramName)

validateParamValue

void validateParamValue(String paramValue)


Copyright © 2011 Mobicents. All Rights Reserved.