com.davesag.smpp.command
Class AbstractCommand

java.lang.Object
  extended bycom.davesag.smpp.command.AbstractCommand
All Implemented Interfaces:
Command

public abstract class AbstractCommand
extends Object
implements Command

An abstract root for a command to the server.


Nested Class Summary
 
Nested classes inherited from class com.davesag.smpp.command.Command
Command.Factory
 
Field Summary
protected  String theCommandString
           
protected  ie.omk.smpp.Address theIncomingId
           
protected  boolean thePerformedFlag
           
protected  ie.omk.smpp.Address theSenderId
           
 
Constructor Summary
AbstractCommand()
           
 
Method Summary
abstract  ErrorResponse checkSender()
          Check the details of the sender.
 String getCommandString()
          accessor for the id of the command's sender.
 ie.omk.smpp.Address getIncomingId()
          accessor for the number the command was sent to.
 ie.omk.smpp.Address getSenderId()
          accessor for the id of the command's sender.
abstract  boolean isPerformed()
          Test if this command been performed yet.
 void setCommandString(String command)
          set command string.
 void setIncomingId(ie.omk.smpp.Address incomingId)
          set the number the command was sent to.
 void setSenderId(ie.omk.smpp.Address senderId)
          set the id of the command's sender.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.davesag.smpp.command.Command
getCommandName, isValid, perform
 

Field Detail

theSenderId

protected ie.omk.smpp.Address theSenderId

theIncomingId

protected ie.omk.smpp.Address theIncomingId

theCommandString

protected String theCommandString

thePerformedFlag

protected boolean thePerformedFlag
Constructor Detail

AbstractCommand

public AbstractCommand()
Method Detail

setSenderId

public void setSenderId(ie.omk.smpp.Address senderId)
set the id of the command's sender.

Specified by:
setSenderId in interface Command
Parameters:
senderId - The id of the person sending the command.

getSenderId

public ie.omk.smpp.Address getSenderId()
accessor for the id of the command's sender.

Specified by:
getSenderId in interface Command
Returns:
The id of the person sending the command.

setIncomingId

public void setIncomingId(ie.omk.smpp.Address incomingId)
set the number the command was sent to.

Specified by:
setIncomingId in interface Command
Parameters:
incomingId - The id of the person sending the command.

getIncomingId

public ie.omk.smpp.Address getIncomingId()
accessor for the number the command was sent to.

Specified by:
getIncomingId in interface Command
Returns:
The number the command was sent to.

setCommandString

public void setCommandString(String command)
set command string.

Specified by:
setCommandString in interface Command
Parameters:
command - The original command string.

getCommandString

public String getCommandString()
accessor for the id of the command's sender.

Specified by:
getCommandString in interface Command
Returns:
The id of the person sending the command. Usually a phone number.

isPerformed

public abstract boolean isPerformed()
Test if this command been performed yet. Commands are single shot items and can only be performed once.

Specified by:
isPerformed in interface Command
Returns:
true if the command has been performed, ie if the sender has been assigned.

checkSender

public abstract ErrorResponse checkSender()
Check the details of the sender.

Returns:
null of the sender is okay, or an ErrorResponse if not.


SMPP Commander API version 20 Jan 2005. (C) 2004 Dave Sag.