Class ReflectedObjectStore
- java.lang.Object
-
- com.gargoylesoftware.base.objectstore.ObjectStore
-
- com.gargoylesoftware.base.objectstore.ReflectedObjectStore
-
public abstract class ReflectedObjectStore extends ObjectStore
An object store that allows configuration by reflection. Commands are mapped to method names such that when a specified command is received, it will be dispatched via reflection to the specified method.- Version:
- $Revision: 1.3 $
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map
commandMap_
-
Constructor Summary
Constructors Constructor Description ReflectedObjectStore()
Create an instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
attemptToSuppressAccessControl(java.lang.reflect.Method method)
protected java.lang.Object
executeImpl(ObjectStoreCommand command)
Execute the specified commandvoid
registerCommand(java.lang.Class commandClass, java.lang.String methodName)
Register a command and the method that will be invoked when that command is passed into execute()-
Methods inherited from class com.gargoylesoftware.base.objectstore.ObjectStore
assertNotNull, execute, getResource, getResourceManager, handleError, handleException, releaseResource, setResourceFactoryMap, setResourceManager
-
-
-
-
Method Detail
-
executeImpl
protected final java.lang.Object executeImpl(ObjectStoreCommand command) throws java.lang.Throwable
Execute the specified command- Specified by:
executeImpl
in classObjectStore
- Parameters:
command
- The command to execute- Returns:
- An object
- Throws:
java.lang.Throwable
- If an error occurs- See Also:
ObjectStore.execute(ObjectStoreCommand)
-
registerCommand
public void registerCommand(java.lang.Class commandClass, java.lang.String methodName)
Register a command and the method that will be invoked when that command is passed into execute()- Parameters:
commandClass
- The class of the commandmethodName
- The name of the method that will be executed
-
attemptToSuppressAccessControl
private void attemptToSuppressAccessControl(java.lang.reflect.Method method)
-
-