com.gargoylesoftware.base.objectstore
Class ReflectedObjectStore

java.lang.Object
  extended bycom.gargoylesoftware.base.objectstore.ObjectStore
      extended bycom.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.4 $
Author:
Mike Bowler

Constructor Summary
ReflectedObjectStore()
          Create an instance
 
Method Summary
protected  Object executeImpl(ObjectStoreCommand command)
          Execute the specified command
 void registerCommand(Class commandClass, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectedObjectStore

public ReflectedObjectStore()
Create an instance

Method Detail

executeImpl

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

Specified by:
executeImpl in class ObjectStore
Parameters:
command - The command to execute
Returns:
An object
Throws:
Throwable - If an error occurs
See Also:
ObjectStore.execute(ObjectStoreCommand)

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


Copyright © 1998-2005 Gargoyle Software Inc.. All Rights Reserved.