org.infinispan.query
Class CommandFactory

java.lang.Object
  extended by org.infinispan.query.CommandFactory
All Implemented Interfaces:
ExtendedModuleCommandFactory, ModuleCommandFactory

public class CommandFactory
extends Object
implements ExtendedModuleCommandFactory

Remote commands factory implementation

Since:
5.1
Author:
Israel Lacerra

Constructor Summary
CommandFactory()
           
 
Method Summary
 ReplicableCommand fromStream(byte commandId, Object[] args)
          Construct and initialize a ReplicableCommand based on the command id and argument array passed in.
 CacheRpcCommand fromStream(byte commandId, Object[] args, String cacheName)
          Construct and initialize a CacheRpcCommand based on the command id and argument array passed in.
 Map<Byte,Class<? extends ReplicableCommand>> getModuleCommands()
          Provides a map of command IDs to command types of all the commands handled by the command factory instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandFactory

public CommandFactory()
Method Detail

getModuleCommands

public Map<Byte,Class<? extends ReplicableCommand>> getModuleCommands()
Description copied from interface: ModuleCommandFactory
Provides a map of command IDs to command types of all the commands handled by the command factory instance. Unmarshalling requests for these command IDs will be dispatched to this implementation.

Specified by:
getModuleCommands in interface ModuleCommandFactory
Returns:
map of command IDs to command types handled by this implementation.

fromStream

public ReplicableCommand fromStream(byte commandId,
                                    Object[] args)
Description copied from interface: ModuleCommandFactory
Construct and initialize a ReplicableCommand based on the command id and argument array passed in.

Specified by:
fromStream in interface ModuleCommandFactory
Parameters:
commandId - command id to construct
args - array of arguments with which to initialize the ReplicableCommand
Returns:
a ReplicableCommand

fromStream

public CacheRpcCommand fromStream(byte commandId,
                                  Object[] args,
                                  String cacheName)
Description copied from interface: ExtendedModuleCommandFactory
Construct and initialize a CacheRpcCommand based on the command id and argument array passed in.

Specified by:
fromStream in interface ExtendedModuleCommandFactory
Parameters:
commandId - command id to construct
args - array of arguments with which to initialize the CacheRpcCommand
cacheName - cache name at which command to be created is directed
Returns:
a CacheRpcCommand

-->

Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.