public interface IServiceContainer extends IServiceProvider
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<Void> |
addService(IInternalService service,
ProvidedServiceInfo info)
Add a service to the container.
|
IServiceInvocationInterceptor[] |
getInterceptors(Object service)
Get the interceptors of a service.
|
IService |
getProvidedService(String name)
Get provided (declared) service.
|
IService[] |
getProvidedServices(Class<?> clazz)
Get provided (declared) service.
|
<T> IFuture<T> |
getRequiredService(String name)
Get a required service of a given name.
|
<T> IFuture<T> |
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.
|
<T> IIntermediateFuture<T> |
getRequiredServices(String name)
Get a required services of a given name.
|
<T> IIntermediateFuture<T> |
getRequiredServices(String name,
boolean rebind)
Get a required services.
|
<T> IFuture<T> |
getService(Class<T> type,
IComponentIdentifier cid)
Get one service of a type from a specific component.
|
void |
removeInterceptor(IServiceInvocationInterceptor interceptor,
Object service)
Remove a service interceptor.
|
IFuture<Void> |
removeService(IServiceIdentifier sid)
Removes a service from the container (shutdowns also the service if the container is running).
|
<T> IFuture<T> |
searchService(Class<T> type)
Get one service of a type.
|
<T> IFuture<T> |
searchService(Class<T> type,
String scope)
Get one service of a type.
|
<T> IIntermediateFuture<T> |
searchServices(Class<T> type)
Get all services of a type.
|
<T> IIntermediateFuture<T> |
searchServices(Class<T> type,
String scope)
Get all services of a type.
|
<T> IFuture<T> |
searchServiceUpwards(Class<T> type)
Get one service of a type and only search upwards (parents).
|
void |
setRequiredServiceInfos(RequiredServiceInfo[] requiredservices)
Set the required services.
|
IFuture<Void> |
shutdown()
Shutdown the service.
|
IFuture<Void> |
start()
Start the service.
|
getChildren, getId, getParent, getServices, getType
IFuture<Void> start()
IFuture<Void> shutdown()
IFuture<Void> addService(IInternalService service, ProvidedServiceInfo info)
service
- The service.info
- The provided service info.IFuture<Void> removeService(IServiceIdentifier sid)
service
- The service identifier.IService getProvidedService(String name)
name
- The service name.IService[] getProvidedServices(Class<?> clazz)
clazz
- The interface.RequiredServiceInfo[] getRequiredServiceInfos()
RequiredServiceInfo getRequiredServiceInfo(String name)
name
- The name.void setRequiredServiceInfos(RequiredServiceInfo[] requiredservices)
required
- services The required services to set.void addRequiredServiceInfos(RequiredServiceInfo[] requiredservices)
prefix
- The name prefix to use.required
- services The required services to set.<T> IFuture<T> getRequiredService(String name)
name
- The service name.<T> IIntermediateFuture<T> getRequiredServices(String name)
name
- The services name.<T> IFuture<T> getRequiredService(String name, boolean rebind)
<T> IIntermediateFuture<T> getRequiredServices(String name, boolean rebind)
void addInterceptor(IServiceInvocationInterceptor interceptor, Object service, int pos)
interceptor
- The interceptor.service
- The service.pos
- The position (0=first).void removeInterceptor(IServiceInvocationInterceptor interceptor, Object service)
interceptor
- The interceptor.service
- The service.IServiceInvocationInterceptor[] getInterceptors(Object service)
service
- The service.<T> IFuture<T> getService(Class<T> type, IComponentIdentifier cid)
type
- The class.cid
- The component identifier of the target component.<T> IFuture<T> searchService(Class<T> type)
type
- The class.<T> IFuture<T> searchService(Class<T> type, String scope)
type
- The class.<T> IFuture<T> searchServiceUpwards(Class<T> type)
type
- The class.<T> IIntermediateFuture<T> searchServices(Class<T> type)
type
- The class.<T> IIntermediateFuture<T> searchServices(Class<T> type, String scope)
type
- The class.Copyright © 2012. All Rights Reserved.