com.davesag.smpp.command
Interface CommandFactory


public interface CommandFactory


Method Summary
 Command getCommand(ie.omk.smpp.Address incomingAddress, ie.omk.smpp.Address senderAddress, String commandString)
          Gets the appropriate command given a supplied command string.
 

Method Detail

getCommand

public Command getCommand(ie.omk.smpp.Address incomingAddress,
                          ie.omk.smpp.Address senderAddress,
                          String commandString)
                   throws CommandFormatException
Gets the appropriate command given a supplied command string. If the command string supplied can not be parsed into a meaningful command then you must throw a CommandFormatException. If the command can be parsed but the command parameters are somehow malfomed then do not throw this exception but instead ensure that Command.isValid() returns false instead. This will allow the command string to be correctly logged by the SMPPCommander.

Parameters:
incomingAddress - the address the command was sent to.
senderAddress - the sender's address.
commandString - The string sent by the user.
Returns:
A Command
Throws:
CommandFormatException - if the commandString supplied could not be parsed into a meaningful command.


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