public interface IServiceContainer extends IServiceProvider
Modifier and Type | Method and Description |
---|---|
void |
addInterceptor(IServiceInvocationInterceptor interceptor,
Object service,
int pos)
Add a service interceptor.
|
void |
addMethodInvocationListener(IServiceIdentifier sid,
MethodInfo mi,
IMethodInvocationListener listener)
Add a method invocation handler.
|
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.
|
<T> T |
getLastRequiredService(String name)
Get the result of the last search.
|
<T> Collection<T> |
getLastRequiredServices(String name)
Get the result of the last search.
|
IService |
getProvidedService(Class<?> clazz)
Get provided (declared) service.
|
IService |
getProvidedService(String name)
Get provided (declared) service.
|
Object |
getProvidedServiceRawImpl(Class<?> clazz)
Get the provided 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.
|
<T> IFuture<T> |
getRequiredService(String name,
boolean rebind,
IRemoteFilter<T> filter)
Get a required service.
|
RequiredServiceInfo |
getRequiredServiceInfo(String name)
Get the required service info.
|
RequiredServiceInfo[] |
getRequiredServiceInfos()
Get the required service infos.
|
INFMixedPropertyProvider |
getRequiredServicePropertyProvider(IServiceIdentifier sid)
Get the required service property provider for a service.
|
<T> ITerminableIntermediateFuture<T> |
getRequiredServices(String name)
Get a required services of a given name.
|
<T> ITerminableIntermediateFuture<T> |
getRequiredServices(String name,
boolean rebind)
Get a required services.
|
<T> ITerminableIntermediateFuture<T> |
getRequiredServices(String name,
boolean rebind,
IRemoteFilter<T> filter)
Get a required services.
|
<T> IFuture<T> |
getService(Class<T> type,
IComponentIdentifier cid)
Get one service of a type from a specific component.
|
boolean |
hasMethodListeners(IServiceIdentifier sid,
MethodInfo mi)
Test if service and method has listeners.
|
boolean |
hasRequiredServicePropertyProvider(IServiceIdentifier sid)
Has the service a property provider.
|
void |
notifyMethodListeners(IServiceIdentifier sid,
boolean start,
Object proxy,
Method method,
Object[] args,
Object callid,
ServiceInvocationContext context)
Notify listeners that a service method has been called.
|
void |
removeInterceptor(IServiceInvocationInterceptor interceptor,
Object service)
Remove a service interceptor.
|
void |
removeMethodInvocationListener(IServiceIdentifier sid,
MethodInfo mi,
IMethodInvocationListener listener)
Remove a method invocation handler.
|
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 getProvidedService(Class<?> clazz)
clazz
- The interface.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.INFMixedPropertyProvider getRequiredServicePropertyProvider(IServiceIdentifier sid)
boolean hasRequiredServicePropertyProvider(IServiceIdentifier sid)
<T> IFuture<T> getRequiredService(String name)
name
- The service name.<T> ITerminableIntermediateFuture<T> getRequiredServices(String name)
name
- The services name.<T> IFuture<T> getRequiredService(String name, boolean rebind)
<T> ITerminableIntermediateFuture<T> getRequiredServices(String name, boolean rebind)
<T> IFuture<T> getRequiredService(String name, boolean rebind, IRemoteFilter<T> filter)
<T> ITerminableIntermediateFuture<T> getRequiredServices(String name, boolean rebind, IRemoteFilter<T> filter)
<T> T getLastRequiredService(String name)
name
- The required service name.<T> Collection<T> getLastRequiredServices(String name)
name
- The required services name.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.void addMethodInvocationListener(IServiceIdentifier sid, MethodInfo mi, IMethodInvocationListener listener)
void removeMethodInvocationListener(IServiceIdentifier sid, MethodInfo mi, IMethodInvocationListener listener)
void notifyMethodListeners(IServiceIdentifier sid, boolean start, Object proxy, Method method, Object[] args, Object callid, ServiceInvocationContext context)
boolean hasMethodListeners(IServiceIdentifier sid, MethodInfo mi)
<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 © 2013. All Rights Reserved.