net.kano.joscar.rv
Interface RvCommandFactory

All Known Implementing Classes:
DefaultRvCommandFactory

public interface RvCommandFactory

An interface for producing RvCommands from incoming rendezvous ICBM commands.


Method Summary
 RvCommand genRvCommand(RecvRvIcbm rvIcbm)
          Attempts to generate a RvCommand from the data in the given RecvRvIcbm.
 CapabilityBlock[] getSupportedCapabilities()
          Returns the types of RV commands that this factory may be able to generate in genRvCommand.
 

Method Detail

getSupportedCapabilities

public CapabilityBlock[] getSupportedCapabilities()
Returns the types of RV commands that this factory may be able to generate in genRvCommand. Note that a capability block's presence in the returned array does not mean that a call to genRvCommand(net.kano.joscar.snaccmd.icbm.RecvRvIcbm) must return a non-null value; it simply means that this factory can be used to handle commands of that type.

Note that if this method returns null, it will be used to by the RvProcessor to which it is added to handle all types of commands do not otherwise have an associated factory. See RvProcessor.registerRvCmdFactory(CapabilityBlock, RvCommandFactory) for details.

Returns:
the capabilities (RV types) that this factory may be able to convert, or null if it can handle all types of rendezvous commands

genRvCommand

public RvCommand genRvCommand(RecvRvIcbm rvIcbm)
Attempts to generate a RvCommand from the data in the given RecvRvIcbm. Note that this method can return null if an RV command cannot be generated for any reason (such as if the given command is in an invalid format

Parameters:
rvIcbm - the incoming rendezvous ICBM command from which a RvCommand should be generated
Returns:
a RvCommand generated from the given incoming RV ICBM, or null if none could be generated