org.apache.hivemind.service.impl
Class BuilderFactory
java.lang.Object
|
+--org.apache.hivemind.service.impl.BuilderFactory
- All Implemented Interfaces:
- ServiceImplementationFactory
- public class BuilderFactory
- extends java.lang.Object
- implements ServiceImplementationFactory
Implementation of ServiceImplementationFactory
that can instantiate an object and then configure its properties.
Some thought has been given to using bytecode generation to create properties
for messages, extension point id, and so forth. This is being avoided because it
undermines the ability to test service implemenations as POJOs, outside the
framework of HiveMind.
Instead the service is configured by means of the implementation's
constructor and setter methods.
- Author:
- Howard Lewis Ship
Method Summary |
java.lang.Object |
createCoreServiceImplementation(java.lang.String serviceId,
java.lang.Class serviceInterface,
org.apache.commons.logging.Log serviceLog,
Module invokingModule,
java.util.List parameters)
Creates a core implementation object for a particular service extension point. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BuilderFactory
public BuilderFactory()
createCoreServiceImplementation
public java.lang.Object createCoreServiceImplementation(java.lang.String serviceId,
java.lang.Class serviceInterface,
org.apache.commons.logging.Log serviceLog,
Module invokingModule,
java.util.List parameters)
- Description copied from interface:
ServiceImplementationFactory
- Creates a core implementation object for a particular service extension point.
Typically, the factory creates an instance and modifies it to implement
the necessary interface (in much the same way that an
ServiceInterceptorFactory
would).
- Specified by:
createCoreServiceImplementation
in interface ServiceImplementationFactory
- Parameters:
serviceId
- the id of the service extension point for which a core service implementation
should be createdserviceInterface
- the interface for the serviceinvokingModule
- the module containing the service extension which invokes
the factoryserviceLog
- the logger to use for any output concerning the serviceparameters
- the parameters passed to the factory (possibly converted, if
the factory has a parameter schema). May be empty but won't be null.