net.kano.joscar.snaccmd.invite
Class ClientInviteCmdFactory

java.lang.Object
  extended byClientInviteCmdFactory
All Implemented Interfaces:
SnacCmdFactory

public class ClientInviteCmdFactory
extends java.lang.Object
implements SnacCmdFactory

A SNAC command factory for the client-bound SNAC commands provided in this package, appropriate for use in an AIM client.


Constructor Summary
ClientInviteCmdFactory()
           
 
Method Summary
 SnacCommand genSnacCommand(SnacPacket packet)
          Attempts to convert the given SNAC packet to a SnacCommand.
 CmdType[] getSupportedTypes()
          Returns a list of the SNAC command types this factory can possibly convert to SnacCommands.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientInviteCmdFactory

public ClientInviteCmdFactory()
Method Detail

getSupportedTypes

public CmdType[] getSupportedTypes()
Description copied from interface: SnacCmdFactory
Returns a list of the SNAC command types this factory can possibly convert to SnacCommands. Note that it is not required to be able to convert every SNAC packet that matches the types returned by this method; rather, this just provides a means of filtering out types that can definitely not be handled (by not including them in the returned list).

Also note that the command types contained in the list returned must be consistent between calls to this method; that is, an implementation cannot change the supported command type list after this factory has been created.

Specified by:
getSupportedTypes in interface SnacCmdFactory
Returns:
a list of command types that can be passed to genSnacCommand

genSnacCommand

public SnacCommand genSnacCommand(SnacPacket packet)
Description copied from interface: SnacCmdFactory
Attempts to convert the given SNAC packet to a SnacCommand. This can return null if no appropriate SnacCommand can be created (for example, if the packet is in an invalid format).

Specified by:
genSnacCommand in interface SnacCmdFactory
Parameters:
packet - the packet to use for generation of a SnacCommand
Returns:
an appropriate SnacCommand for representing the given SnacPacket, or null if no such object can be created