|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.cinnamon.config.ServiceConfig
public class ServiceConfig
Represents a single service configuration. Each service is defined by a unique name, a service interface and a set of operations. Optionally a service implementation can be specified (some ServiceFactories like the SpringServiceFactory do not need that information).
| Constructor Summary | |
|---|---|
ServiceConfig(String name,
String scope,
Class<?> serviceInterface,
Class<?> implementation,
List<OperationConfig> operations,
boolean processAnnotations)
Creates a new service configuration. |
|
| Method Summary | |
|---|---|
void |
addOperation(OperationConfig operation)
Adds an operation that can be invoked by clients to this service. |
ServiceFactory |
getFactory()
Returns the ServiceFactory that should be used to handle requests for this service. |
String |
getName()
Returns the name of this service. |
List<OperationConfig> |
getOperations()
Returns the list of operations that can be invoked by clients. |
boolean |
getProcessAnnotations()
Check if annotations should be processed for this service. |
String |
getScope()
Returns the scope of this service. |
Class<?> |
getServiceApi()
Returns the API of the service, which usually is the interface of the service, or the implementation if no interface was specified. |
Class<?> |
getServiceImplementation()
Returns the class that implements this service. |
Class<?> |
getServiceInterface()
Returns the service interface. |
void |
setFactory(ServiceFactory factory)
Sets the factory that should be used to handle requests for this service. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceConfig(String name,
String scope,
Class<?> serviceInterface,
Class<?> implementation,
List<OperationConfig> operations,
boolean processAnnotations)
name - the name of the servicescope - the scope (optional parameter, not used by all ServiceFactories)serviceInterface - the service interface (optional if implementation is specified)implementation - the service implementation (optional parameter, not used by all ServiceFactories)operations - the list of operations that can be invoked by clientsprocessAnnotations - whether annotations in the service interface should be processed| Method Detail |
|---|
public String getName()
public String getScope()
request, session or application.
public Class<?> getServiceApi()
public Class<?> getServiceInterface()
public Class<?> getServiceImplementation()
public List<OperationConfig> getOperations()
public void addOperation(OperationConfig operation)
operation - an operation that can be invoked by clientspublic boolean getProcessAnnotations()
public ServiceFactory getFactory()
public void setFactory(ServiceFactory factory)
factory - the factory that should be used to handle requests for this servicepublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||