org.jboss.cache.commands.read
Class GetChildrenNamesCommand

java.lang.Object
  extended by org.jboss.cache.commands.read.AbstractDataCommand
      extended by org.jboss.cache.commands.read.GetChildrenNamesCommand
All Implemented Interfaces:
Cloneable, DataCommand, ReplicableCommand, VisitableCommand

public class GetChildrenNamesCommand
extends AbstractDataCommand

This command retrieves the names of children for a specific Fqn, as defined by Node.getChildrenNames()

This is the equivalent of the old MethodCallDefinitions.getChildrenNamesMethodLocal method call from 2.1.x.

Since:
2.2.0
Author:
Mircea.Markus@jboss.com

Field Summary
static int METHOD_ID
           
 
Fields inherited from class org.jboss.cache.commands.read.AbstractDataCommand
dataContainer, fqn
 
Constructor Summary
GetChildrenNamesCommand()
           
GetChildrenNamesCommand(Fqn fqn)
           
 
Method Summary
 Object acceptVisitor(InvocationContext ctx, Visitor visitor)
          Accept a visitor, and return the result of accepting this visitor.
 int getCommandId()
          Used by marshallers to convert this command into an id for streaming.
 Object perform(InvocationContext ctx)
          Retrieves the names of children for a specific Fqn.
 
Methods inherited from class org.jboss.cache.commands.read.AbstractDataCommand
equals, getFqn, getParameters, hashCode, initialize, setParameters, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

METHOD_ID

public static final int METHOD_ID
See Also:
Constant Field Values
Constructor Detail

GetChildrenNamesCommand

public GetChildrenNamesCommand()

GetChildrenNamesCommand

public GetChildrenNamesCommand(Fqn fqn)
Method Detail

perform

public Object perform(InvocationContext ctx)
Retrieves the names of children for a specific Fqn.

Parameters:
ctx - invocation context
Returns:
a Set of child names, for a given Fqn, or null if the Fqn refers to a node that does not exist.

acceptVisitor

public Object acceptVisitor(InvocationContext ctx,
                            Visitor visitor)
                     throws Throwable
Description copied from interface: VisitableCommand
Accept a visitor, and return the result of accepting this visitor.

Parameters:
ctx - invocation context
visitor - visitor to accept
Returns:
arbitrary return value
Throws:
Throwable - in the event of problems

getCommandId

public int getCommandId()
Description copied from interface: ReplicableCommand
Used by marshallers to convert this command into an id for streaming.

Returns:
the method id of this command. This is compatible with pre-2.2.0 MethodCall ids.


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