com.davesag.smpp.command
Interface Command

All Known Implementing Classes:
AbstractCommand

public interface Command

a command to the server.


Nested Class Summary
static class Command.Factory
          constructs the right command given a command string.
 
Method Summary
 String getCommandName()
          get the name of this command.
 String getCommandString()
          get the string that formed this command.
 ie.omk.smpp.Address getIncomingId()
          accessor for the id of the command's incoming address.some commands are charged out differently depending on the number used to send them.
 ie.omk.smpp.Address getSenderId()
          accessor for the id of the command's sender.
 boolean isPerformed()
          Test if this command been performed yet.
 boolean isValid()
          is this command correctly contructed?
 Response perform()
          performs the action associated with this command and returns a response.
 void setCommandString(String command)
          set the original command string.
 void setIncomingId(ie.omk.smpp.Address incomingId)
          set the id of the command's incoming address.
 void setSenderId(ie.omk.smpp.Address senderId)
          set the id of the command's sender.
 

Method Detail

getCommandString

public String getCommandString()
get the string that formed this command.

Returns:
the original command string.

setCommandString

public void setCommandString(String command)
set the original command string.

Parameters:
command - The original command string.

getCommandName

public String getCommandName()
get the name of this command.

Returns:
the unique name for this command.

setSenderId

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

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.

Returns:
The id of the person sending the command.

setIncomingId

public void setIncomingId(ie.omk.smpp.Address incomingId)
set the id of the command's incoming address. some commands are charged out differently depending on the number used to send them. also some commands may only be sent to specific numbers and not others.

Parameters:
incomingId - The number the command was sent to.

getIncomingId

public ie.omk.smpp.Address getIncomingId()
accessor for the id of the command's incoming address.some commands are charged out differently depending on the number used to send them. also some commands may only be sent to specific numbers and not others.

Returns:
The number the command was sent to.

isValid

public boolean isValid()
is this command correctly contructed?

Returns:
true if the command is correctly contructed.

isPerformed

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

Returns:
true if the command has been performed.

perform

public Response perform()
performs the action associated with this command and returns a response. we require that you respond correctly to the isPerformed() method.

Returns:
the response.


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