ie.omk.smpp.util
Class PacketFactory

java.lang.Object
  extended by ie.omk.smpp.util.PacketFactory

public final class PacketFactory
extends Object

Helper class to create new SMPP packet objects.

Since:
1.0
Author:
Oran Kelly

Method Summary
static SMPPPacket newInstance(int id)
          Create a new instance of the appropriate sub class of SMPPPacket.
static SMPPPacket newPacket(int id)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newPacket

public static SMPPPacket newPacket(int id)
                            throws BadCommandIDException
Deprecated. 

Create a new instance of the appropriate sub class of SMPPPacket.

Throws:
BadCommandIDException

newInstance

public static SMPPPacket newInstance(int id)
                              throws BadCommandIDException
Create a new instance of the appropriate sub class of SMPPPacket. Packet fields are all left at their default initial state.

Parameters:
id - The SMPP command ID of the packet type to return.
Returns:
A sub-class instance of SMPPPacket representing SMPP command id.
Throws:
BadCommandIDException - if the command ID is not recognized.


Copyright © 2011 smppapi at Sourceforge. All Rights Reserved.