org.mobicents.protocols.smpp
Class ErrorAddress

java.lang.Object
  extended by org.mobicents.protocols.smpp.Address
      extended by org.mobicents.protocols.smpp.ErrorAddress
All Implemented Interfaces:
Serializable

public class ErrorAddress
extends Address

An address that message submission was unsuccessfully submitted to. This class is used in the SubmitMultiResp packet type to return a list of SME addresses that message submission failed for along with an error code for each address indicating the reason for the failure.

See Also:
Serialized Form

Constructor Summary
ErrorAddress()
          Create a new ErrorAddress object.
ErrorAddress(int ton, int npi, String addr)
          Create a new ErrorAddress object.
ErrorAddress(int ton, int npi, String addr, long error)
          Create a new ErrorAddress object.
 
Method Summary
 long getError()
          Get the error code associated with this ErrorAddress.
 int getLength()
          Get the number of bytes this object would encode to.
 void readFrom(PacketDecoder decoder)
          TODO: doc
 void setError(long error)
          Set the error code associated with this ErrorAddress.
 String toString()
           
 void writeTo(PacketEncoder encoder)
           
 
Methods inherited from class org.mobicents.protocols.smpp.Address
equals, getAddress, getNPI, getTON, hashCode, setAddress, setNPI, setTON
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ErrorAddress

public ErrorAddress()
Create a new ErrorAddress object.


ErrorAddress

public ErrorAddress(int ton,
                    int npi,
                    String addr)
Create a new ErrorAddress object.

Parameters:
ton - The Type Of Number.
npi - The Numbering Plan Indicator.
addr - The address.

ErrorAddress

public ErrorAddress(int ton,
                    int npi,
                    String addr,
                    long error)
Create a new ErrorAddress object.

Parameters:
ton - The Type Of Number.
npi - The Numbering Plan Indicator.
addr - The address.
error - The error code indicating why message submission failed.
Method Detail

getError

public long getError()
Get the error code associated with this ErrorAddress.


setError

public void setError(long error)
Set the error code associated with this ErrorAddress.


getLength

public int getLength()
Description copied from class: Address
Get the number of bytes this object would encode to.

Overrides:
getLength in class Address

writeTo

public void writeTo(PacketEncoder encoder)
             throws IOException
Overrides:
writeTo in class Address
Throws:
IOException

readFrom

public void readFrom(PacketDecoder decoder)
Description copied from class: Address
TODO: doc

Overrides:
readFrom in class Address

toString

public String toString()
Overrides:
toString in class Address


Copyright © 2011 Mobicents. All Rights Reserved.