public class CacheServiceContainer extends Object implements IServiceContainer
| Constructor and Description |
|---|
CacheServiceContainer(IServiceContainer container)
Create a new service container.
|
CacheServiceContainer(IServiceContainer container,
int max,
long ttl)
Create a new service container.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInterceptor(IServiceInvocationInterceptor interceptor,
Object service,
int pos)
Add a service interceptor.
|
void |
addRequiredServiceInfos(RequiredServiceInfo[] requiredservices)
Add required services for a given prefix.
|
IFuture |
addService(IInternalService service,
ProvidedServiceInfo info)
Add a service to the platform.
|
IFuture |
getChildren()
Get the children container.
|
IComponentIdentifier |
getId()
Get the globally unique id of the provider.
|
IServiceInvocationInterceptor[] |
getInterceptors(Object service)
Get the interceptors of a service.
|
IFuture |
getParent()
Get the parent service container.
|
IService |
getProvidedService(String name)
Get provided (declared) service.
|
IService[] |
getProvidedServices(Class clazz)
Get provided (declared) service.
|
IFuture |
getRequiredService(String name)
Get a required service of a given name.
|
IFuture |
getRequiredService(String name,
boolean rebind)
Get a required service.
|
RequiredServiceInfo |
getRequiredServiceInfo(String name)
Get the required service info.
|
RequiredServiceInfo[] |
getRequiredServiceInfos()
Get the required service infos.
|
IIntermediateFuture |
getRequiredServices(String name)
Get a required services of a given name.
|
IIntermediateFuture |
getRequiredServices(String name,
boolean rebind)
Get a required services.
|
IFuture |
getService(Class type,
IComponentIdentifier cid)
Get one service of a type from a specific component.
|
IIntermediateFuture |
getServices(ISearchManager manager,
IVisitDecider decider,
IResultSelector selector)
Get all services of a type.
|
String |
getType()
Get the type of the service provider (e.g. enclosing component type).
|
void |
removeInterceptor(IServiceInvocationInterceptor interceptor,
Object service)
Remove a service interceptor.
|
IFuture |
removeService(IServiceIdentifier sid)
Removes a service from the platform (shutdowns also the service).
|
IFuture |
searchService(Class type)
Get one service of a type.
|
IFuture |
searchService(Class type,
String scope)
Get one service of a type.
|
IIntermediateFuture |
searchServices(Class type)
Get all services of a type.
|
IIntermediateFuture |
searchServices(Class type,
String scope)
Get all services of a type.
|
IFuture |
searchServiceUpwards(Class type)
Get one service of a type and only search upwards (parents).
|
void |
setRequiredServiceInfos(RequiredServiceInfo[] requiredservices)
Set the required services.
|
IFuture |
shutdown()
Shutdown the service.
|
IFuture |
start()
Start the service.
|
String |
toString()
Get the string representation.
|
public CacheServiceContainer(IServiceContainer container)
public CacheServiceContainer(IServiceContainer container, int max, long ttl)
public IIntermediateFuture getServices(ISearchManager manager, IVisitDecider decider, IResultSelector selector)
getServices in interface IServiceProvidertype - The class.public IFuture getParent()
getParent in interface IServiceProviderpublic IFuture getChildren()
getChildren in interface IServiceProviderpublic IComponentIdentifier getId()
getId in interface IServiceProviderpublic String getType()
getType in interface IServiceProviderpublic IFuture start()
start in interface IServiceContainerpublic IFuture shutdown()
shutdown in interface IServiceContainerpublic IFuture addService(IInternalService service, ProvidedServiceInfo info)
addService in interface IServiceContainername - The name.service - The service.public IFuture removeService(IServiceIdentifier sid)
removeService in interface IServiceContainername - The name.service - The service.public String toString()
public IFuture getService(Class type, IComponentIdentifier cid)
getService in interface IServiceContainertype - The class.cid - The component identifier of the target component.public IService getProvidedService(String name)
getProvidedService in interface IServiceContainername - The service name.public IService[] getProvidedServices(Class clazz)
IServiceContainergetProvidedServices in interface IServiceContainerclazz - The interface.public RequiredServiceInfo[] getRequiredServiceInfos()
IServiceContainergetRequiredServiceInfos in interface IServiceContainerpublic RequiredServiceInfo getRequiredServiceInfo(String name)
IServiceContainergetRequiredServiceInfo in interface IServiceContainername - The name.public void setRequiredServiceInfos(RequiredServiceInfo[] requiredservices)
IServiceContainersetRequiredServiceInfos in interface IServiceContainerpublic void addRequiredServiceInfos(RequiredServiceInfo[] requiredservices)
IServiceContaineraddRequiredServiceInfos in interface IServiceContainerpublic IFuture getRequiredService(String name)
IServiceContainergetRequiredService in interface IServiceContainername - The service name.public IIntermediateFuture getRequiredServices(String name)
IServiceContainergetRequiredServices in interface IServiceContainername - The services name.public IFuture getRequiredService(String name, boolean rebind)
IServiceContainergetRequiredService in interface IServiceContainerpublic IIntermediateFuture getRequiredServices(String name, boolean rebind)
IServiceContainergetRequiredServices in interface IServiceContainerpublic void addInterceptor(IServiceInvocationInterceptor interceptor, Object service, int pos)
IServiceContaineraddInterceptor in interface IServiceContainerinterceptor - The interceptor.service - The service.pos - The position (0=first).public void removeInterceptor(IServiceInvocationInterceptor interceptor, Object service)
IServiceContainerremoveInterceptor in interface IServiceContainerinterceptor - The interceptor.service - The service.public IServiceInvocationInterceptor[] getInterceptors(Object service)
IServiceContainergetInterceptors in interface IServiceContainerservice - The service.public IFuture searchService(Class type)
searchService in interface IServiceContainertype - The class.public IFuture searchService(Class type, String scope)
searchService in interface IServiceContainertype - The class.public IFuture searchServiceUpwards(Class type)
searchServiceUpwards in interface IServiceContainertype - The class.public IIntermediateFuture searchServices(Class type)
searchServices in interface IServiceContainertype - The class.public IIntermediateFuture searchServices(Class type, String scope)
searchServices in interface IServiceContainertype - The class.Copyright © 2012. All Rights Reserved.