org.mobicents.protocols.smpp.version
Class AbstractSMPPVersion

java.lang.Object
  extended by org.mobicents.protocols.smpp.version.AbstractSMPPVersion
All Implemented Interfaces:
Serializable, SMPPVersion
Direct Known Subclasses:
SMPPVersion33, SMPPVersion34, SMPPVersion50

public abstract class AbstractSMPPVersion
extends Object
implements SMPPVersion

Class representing an SMPP protocol version. Instances of this object are used by the rest of the API to determine is an SMPP message is supported by a certain version of the protocol.

Version:
$Id: AbstractSMPPVersion.java 452 2009-01-15 16:56:36Z orank $
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.mobicents.protocols.smpp.version.SMPPVersion
VERSION_3_3, VERSION_3_4, VERSION_5_0
 
Constructor Summary
protected AbstractSMPPVersion(int versionID, String versionString)
          Create a new SMPPVersion object.
 
Method Summary
 boolean equals(int versionID)
          Determine if the specified versionID matches this version's ID.
 boolean equals(Object obj)
           
 int getVersionID()
          Get an integer value representing this SMPP version.
 int hashCode()
           
 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.
 String toString()
           
 void validateAddress(Address address)
           
 void validateAddressRange(String addressRange)
           
 void validateDataCoding(int dataCoding)
           
 void validateDefaultMsg(int defaultMsgId)
           
 void validateDistListName(String name)
           
 void validateErrorCode(int code)
           
 void validateEsmClass(int esmClass)
           
 void validateMessageState(int messageState)
           
 void validateNpi(int npi)
           
 void validateNumUnsuccessful(int num)
           
 void validateParamName(String paramName)
           
 void validateParamValue(String paramValue)
           
 void validatePassword(String password)
           
 void validateProtocolID(int protocolId)
           
 void validateReplaceIfPresent(int flag)
           
 void validateServiceType(String serviceType)
           
 void validateSystemId(String sysId)
           
 void validateSystemType(String sysType)
           
 void validateTon(int ton)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mobicents.protocols.smpp.version.SMPPVersion
getMaxLength, isSupported, isSupportTLV, validateMessage, validateMessageId, validateNumberOfDests, validatePriorityFlag, validateRegisteredDelivery
 

Constructor Detail

AbstractSMPPVersion

protected AbstractSMPPVersion(int versionID,
                              String versionString)
Create a new SMPPVersion object.

Method Detail

getVersionID

public int getVersionID()
Description copied from interface: SMPPVersion
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.

Specified by:
getVersionID in interface SMPPVersion
Returns:
An integer value that represents this integer version.

isOlderThan

public boolean isOlderThan(SMPPVersion otherVersion)
Description copied from interface: SMPPVersion
Determine if this SMPP version is older than another version.

Specified by:
isOlderThan in interface SMPPVersion
Parameters:
otherVersion - The version to test against.
Returns:
true if this version is older than otherVersion, false if it newer than it.

isNewerThan

public boolean isNewerThan(SMPPVersion otherVersion)
Description copied from interface: SMPPVersion
Determine if this SMPP version is equal to or newer than another version.

Specified by:
isNewerThan in interface SMPPVersion
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

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(int versionID)
Description copied from interface: SMPPVersion
Determine if the specified versionID matches this version's ID.

Specified by:
equals in interface SMPPVersion
Parameters:
versionID - The version ID to test against.
Returns:
true if this version's ID matches versionID.

toString

public String toString()
Overrides:
toString in class Object

validateTon

public void validateTon(int ton)
Specified by:
validateTon in interface SMPPVersion

validateNpi

public void validateNpi(int npi)
Specified by:
validateNpi in interface SMPPVersion

validateAddress

public void validateAddress(Address address)
Specified by:
validateAddress in interface SMPPVersion

validateEsmClass

public void validateEsmClass(int esmClass)
Specified by:
validateEsmClass in interface SMPPVersion

validateProtocolID

public void validateProtocolID(int protocolId)
Specified by:
validateProtocolID in interface SMPPVersion

validateDataCoding

public void validateDataCoding(int dataCoding)
Specified by:
validateDataCoding in interface SMPPVersion

validateDefaultMsg

public void validateDefaultMsg(int defaultMsgId)
Specified by:
validateDefaultMsg in interface SMPPVersion

validateServiceType

public void validateServiceType(String serviceType)
Specified by:
validateServiceType in interface SMPPVersion

validateMessageState

public void validateMessageState(int messageState)
Specified by:
validateMessageState in interface SMPPVersion

validateErrorCode

public void validateErrorCode(int code)
Specified by:
validateErrorCode in interface SMPPVersion

validateReplaceIfPresent

public void validateReplaceIfPresent(int flag)
Specified by:
validateReplaceIfPresent in interface SMPPVersion

validateNumUnsuccessful

public void validateNumUnsuccessful(int num)
Specified by:
validateNumUnsuccessful in interface SMPPVersion

validateDistListName

public void validateDistListName(String name)
Specified by:
validateDistListName in interface SMPPVersion

validateSystemId

public void validateSystemId(String sysId)
Specified by:
validateSystemId in interface SMPPVersion

validatePassword

public void validatePassword(String password)
Specified by:
validatePassword in interface SMPPVersion

validateSystemType

public void validateSystemType(String sysType)
Specified by:
validateSystemType in interface SMPPVersion

validateAddressRange

public void validateAddressRange(String addressRange)
Specified by:
validateAddressRange in interface SMPPVersion

validateParamName

public void validateParamName(String paramName)
Specified by:
validateParamName in interface SMPPVersion

validateParamValue

public void validateParamValue(String paramValue)
Specified by:
validateParamValue in interface SMPPVersion


Copyright © 2011 Mobicents. All Rights Reserved.