|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.cinnamon.service.factory.AbstractMethodInvocationServiceFactory
public abstract class AbstractMethodInvocationServiceFactory
Abstract ServiceFactory implementation as a base for all factories that create
ServiceInvokers which use reflective method invocation.
The only abstract template method is getTargetInstance. Subclasses must implement
this method which locates the service instance that should be invoked for a particular request.
| Constructor Summary | |
|---|---|
AbstractMethodInvocationServiceFactory()
Creates a new ServiceFactory instance. |
|
| Method Summary | |
|---|---|
void |
addServiceConfig(ServiceConfig config)
Add a configuration for a service that should be handled by this factory. |
protected Map<String,Object> |
getApplicationMap()
Returns the Map containing all application attributes. |
protected CinnamonConfig |
getConfig()
Return the CinnamonConfig instance associated with this factory. |
protected Map<String,String> |
getInitMap()
Returns the Map containing all initialization parameters. |
protected List<MethodInvoker> |
getMethodCandidates(ServiceRequest request)
Returns the candidate methods for the given request. |
ServiceInvoker |
getServiceInvoker(ServiceRequest request)
Create a ServiceInvoker instance for a particular ServiceRequest. |
protected abstract Object |
getTargetInstance(ServiceRequest request)
Returns the target instance that should be invoked for the given request. |
void |
init(Map<String,String> initMap,
Map<String,Object> applicationMap,
CinnamonConfig config)
Initializes the ServiceFactory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractMethodInvocationServiceFactory()
| Method Detail |
|---|
public void init(Map<String,String> initMap,
Map<String,Object> applicationMap,
CinnamonConfig config)
ServiceFactory
init in interface ServiceFactoryinitMap - the initialisation parameters (taken from ServletConfig in a web application)applicationMap - the application attributes (taken from ServletContext in a web application)config - the Cinnamon configurationprotected Map<String,String> getInitMap()
protected Map<String,Object> getApplicationMap()
protected CinnamonConfig getConfig()
public ServiceInvoker getServiceInvoker(ServiceRequest request)
ServiceFactory
getServiceInvoker in interface ServiceFactoryrequest - the request to be processed
protected abstract Object getTargetInstance(ServiceRequest request)
request - the service request
protected List<MethodInvoker> getMethodCandidates(ServiceRequest request)
request - the service request
public void addServiceConfig(ServiceConfig config)
ServiceFactory
addServiceConfig in interface ServiceFactoryconfig - a configuration for a service that should be handled by this factory
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||