net.kano.joscar.flapcmd
Class DefaultFlapCmdFactory

java.lang.Object
  extended byDefaultFlapCmdFactory
All Implemented Interfaces:
FlapCommandFactory

public class DefaultFlapCmdFactory
extends java.lang.Object
implements FlapCommandFactory

Provides a default implementation of a FLAP command factory. This factory converts FLAP packets to the FlapCommands located in this package, such as SnacFlapCmd.


Constructor Summary
DefaultFlapCmdFactory()
           
 
Method Summary
 FlapCommand genFlapCommand(FlapPacket packet)
          Returns a FlapCommand representing the given packet, or null if there is no FlapCommand which can represent the given packet (that is, if the packet type or format is unrecognized by this factory).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFlapCmdFactory

public DefaultFlapCmdFactory()
Method Detail

genFlapCommand

public FlapCommand genFlapCommand(FlapPacket packet)
Description copied from interface: FlapCommandFactory
Returns a FlapCommand representing the given packet, or null if there is no FlapCommand which can represent the given packet (that is, if the packet type or format is unrecognized by this factory).

Specified by:
genFlapCommand in interface FlapCommandFactory
Parameters:
packet - the packet from which a FlapCommand should be created
Returns:
a FlapCommand to represent the given packet, or null if this factory has no FlapCommand counterpart for this packet type or format