public class OperationRegistry
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
copyright
|
Constructor and Description |
---|
OperationRegistry() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the registry.
|
java.lang.Object |
executeOperation(java.lang.Object handler,
java.lang.String operationName,
java.lang.Object... parameters)
Execute an operation.
|
Value[] |
getValues()
Get the list of valid operation name values.
|
void |
registerOperation(Operation operation)
Register an operation.
|
void |
registerOperation(java.lang.String name,
java.lang.String description,
java.lang.reflect.Method method)
Register an operation.
|
java.lang.String |
toString()
Returns the string representation of this registery object.
|
public static final java.lang.String COPYRIGHT
public void clear()
public void registerOperation(java.lang.String name, java.lang.String description, java.lang.reflect.Method method)
name
- The operation name.description
- The descriptionmethod
- The method to invoke.public void registerOperation(Operation operation)
operation
- The operation model.public java.lang.Object executeOperation(java.lang.Object handler, java.lang.String operationName, java.lang.Object... parameters) throws java.lang.Exception
handler
- The handler on which to call the operation.operationName
- The operation name.parameters
- The parameters to send to the operation.java.lang.Exception
- if anything goes wrong.public Value[] getValues()
public java.lang.String toString()
toString
in class java.lang.Object