com.gargoylesoftware.base.objectstore

Class 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 $

Author: Mike Bowler

Field Summary
MapcommandMap_
Constructor Summary
ReflectedObjectStore()
Create an instance
Method Summary
voidattemptToSuppressAccessControl(Method method)
protected ObjectexecuteImpl(ObjectStoreCommand command)
Execute the specified command
voidregisterCommand(Class commandClass, String methodName)
Register a command and the method that will be invoked when that command is passed into execute()

Field Detail

commandMap_

private final Map commandMap_

Constructor Detail

ReflectedObjectStore

public ReflectedObjectStore()
Create an instance

Method Detail

attemptToSuppressAccessControl

private void attemptToSuppressAccessControl(Method method)

executeImpl

protected final Object executeImpl(ObjectStoreCommand command)
Execute the specified command

Parameters: command The command to execute

Returns: An object

Throws: Throwable If an error occurs

registerCommand

public void registerCommand(Class commandClass, 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 command methodName The name of the method that will be executed