public class RemoteCommandsFactory extends Object
ReplicableCommand
s from a byte stream.
This is a Scopes.GLOBAL
component and doesn't have knowledge of initializing a command by injecting
cache-specific components into it.
Usually a second step to unmarshalling a command from a byte stream (after
creating an un-initialized version using this factory) is to pass the command though CommandsFactory.initializeReplicableCommand(ReplicableCommand,boolean)
.CommandsFactory.initializeReplicableCommand(ReplicableCommand,boolean)
Constructor and Description |
---|
RemoteCommandsFactory() |
Modifier and Type | Method and Description |
---|---|
ReplicableCommand |
fromStream(byte id,
Object[] parameters,
byte type)
Creates an un-initialized command.
|
CacheRpcCommand |
fromStream(byte id,
Object[] parameters,
byte type,
String cacheName)
Resolve an
CacheRpcCommand from the stream. |
void |
inject(EmbeddedCacheManager cacheManager,
GlobalComponentRegistry registry,
Map<Byte,ModuleCommandFactory> commandFactories) |
public void inject(EmbeddedCacheManager cacheManager, GlobalComponentRegistry registry, Map<Byte,ModuleCommandFactory> commandFactories)
public ReplicableCommand fromStream(byte id, Object[] parameters, byte type)
CommandsFactory.initializeReplicableCommand(ReplicableCommand,boolean)
id
- id of the commandparameters
- parameters to settype
- public CacheRpcCommand fromStream(byte id, Object[] parameters, byte type, String cacheName)
CacheRpcCommand
from the stream.id
- id of the commandparameters
- parameters to be settype
- type of command (whether internal or user defined)cacheName
- cache name at which this command is directedCacheRpcCommand
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.