org.mobicents.protocols.smpp.message
Class BroadcastSM

java.lang.Object
  extended by org.mobicents.protocols.smpp.message.SMPPPacket
      extended by org.mobicents.protocols.smpp.message.BroadcastSM
All Implemented Interfaces:
Serializable, Cloneable

public class BroadcastSM
extends SMPPPacket

Submit a broadcast message to the SMSC.

Since:
0.4.0
Version:
$Id: BroadcastSM.java 457 2009-01-15 17:37:42Z orank $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mobicents.protocols.smpp.message.SMPPPacket
commandId, commandStatus, sequenceNum, tlvTable
 
Constructor Summary
BroadcastSM()
           
 
Method Summary
 boolean equals(Object obj)
           
 int getDataCoding()
           
 int getDefaultMsg()
           
 SMPPDate getDeliveryTime()
           
 SMPPDate getExpiryTime()
           
protected  int getMandatorySize()
          Get the encoded size of the mandatory parameters of this packet.
 String getMessageId()
           
 int getPriority()
           
 int getReplaceIfPresent()
           
 String getServiceType()
           
 Address getSource()
           
 int hashCode()
           
protected  void readMandatory(PacketDecoder decoder)
          Read the mandatory parameters from a packet decoder.
 void setDataCoding(int dataCoding)
           
 void setDefaultMsg(int defaultMsg)
           
 void setDeliveryTime(SMPPDate deliveryTime)
           
 void setExpiryTime(SMPPDate expiryTime)
           
 void setMessageId(String messageId)
           
 void setPriority(int priority)
           
 void setReplaceIfPresent(int replaceIfPresent)
           
 void setServiceType(String serviceType)
           
 void setSource(Address source)
           
protected  void validateMandatory(SMPPVersion smppVersion)
          Validate the mandatory parameters for this packet.
protected  boolean validateTLVTable(SMPPVersion version)
          Validate that the TLV table contains all required parameters.
protected  void writeMandatory(PacketEncoder encoder)
          Write the mandatory parameters to a packet encoder.
 
Methods inherited from class org.mobicents.protocols.smpp.message.SMPPPacket
clone, getCommandId, getCommandStatus, getLength, getSequenceNum, getTLV, getTLVTable, isRequest, isResponse, isSet, readFrom, removeTLV, safeCompare, setCommandStatus, setSequenceNum, setTLV, sizeOf, sizeOf, sizeOf, sizeOf, toString, toString, validate, writeTo, writeTo
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BroadcastSM

public BroadcastSM()
Method Detail

getDataCoding

public int getDataCoding()

setDataCoding

public void setDataCoding(int dataCoding)

getDefaultMsg

public int getDefaultMsg()

setDefaultMsg

public void setDefaultMsg(int defaultMsg)

getDeliveryTime

public SMPPDate getDeliveryTime()

setDeliveryTime

public void setDeliveryTime(SMPPDate deliveryTime)

getExpiryTime

public SMPPDate getExpiryTime()

setExpiryTime

public void setExpiryTime(SMPPDate expiryTime)

getMessageId

public String getMessageId()

setMessageId

public void setMessageId(String messageId)

getPriority

public int getPriority()

setPriority

public void setPriority(int priority)

getReplaceIfPresent

public int getReplaceIfPresent()

setReplaceIfPresent

public void setReplaceIfPresent(int replaceIfPresent)

getServiceType

public String getServiceType()

setServiceType

public void setServiceType(String serviceType)

getSource

public Address getSource()

setSource

public void setSource(Address source)

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class SMPPPacket

readMandatory

protected void readMandatory(PacketDecoder decoder)
Description copied from class: SMPPPacket
Read the mandatory parameters from a packet decoder. This default implementation is empty, parsing no mandatory parameters. Sub-classes may override this as they wish.

Overrides:
readMandatory in class SMPPPacket
Parameters:
decoder - The decoder to read fields from.

writeMandatory

protected void writeMandatory(PacketEncoder encoder)
                       throws IOException
Description copied from class: SMPPPacket
Write the mandatory parameters to a packet encoder.

Overrides:
writeMandatory in class SMPPPacket
Parameters:
encoder - The encoder to write mandatory parameters to.
Throws:
IOException - If an problem occurs while writing.

getMandatorySize

protected int getMandatorySize()
Description copied from class: SMPPPacket
Get the encoded size of the mandatory parameters of this packet.

Overrides:
getMandatorySize in class SMPPPacket
Returns:
The number of bytes the mandatory parameters will encode to.

validateMandatory

protected void validateMandatory(SMPPVersion smppVersion)
Description copied from class: SMPPPacket
Validate the mandatory parameters for this packet. If any mandatory parameter fails validation, a org.mobicents.smpp.version.VersionException should be thrown.

Overrides:
validateMandatory in class SMPPPacket
Parameters:
smppVersion - The version to validate against.

validateTLVTable

protected boolean validateTLVTable(SMPPVersion version)
Description copied from class: SMPPPacket
Validate that the TLV table contains all required parameters.

Overrides:
validateTLVTable in class SMPPPacket
Parameters:
version - The version to validate against. Since required TLVs were only introduced in SMPP version 5.0, this method will only ever be called when using a version that is equivalent to or newer than that.
Returns:
true if all required TLVs are set, false otherwise.


Copyright © 2011 Mobicents. All Rights Reserved.