public abstract class BasicServiceContainer extends Object implements IServiceContainer
| Constructor and Description |
|---|
BasicServiceContainer(IComponentIdentifier id)
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<Void> |
addService(IInternalService service,
ProvidedServiceInfo info)
Add a service to the container.
|
abstract IRequiredServiceFetcher |
createServiceFetcher(String name)
Create a service fetcher.
|
boolean |
equals(Object obj)
Test if the object eqquals another one.
|
abstract IFuture<Collection<IServiceProvider>> |
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.
|
static long |
getMethodTimeout(Class<?>[] interfaces,
Method method,
boolean remote)
Get the default timeout for a method.
|
abstract IFuture<IServiceProvider> |
getParent()
Get the parent service container.
|
IService |
getProvidedService(String name)
Get provided (declared) service.
|
IService[] |
getProvidedServices(Class<?> clazz)
Get provided (declared) service.
|
IFuture<IService> |
getRequiredService(RequiredServiceInfo info,
RequiredServiceBinding binding)
Get a required service.
|
<T> IFuture<T> |
getRequiredService(RequiredServiceInfo info,
RequiredServiceBinding binding,
boolean rebind)
Get a required 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 a required service info.
|
RequiredServiceInfo[] |
getRequiredServiceInfos()
Get the required services.
|
IIntermediateFuture<IService> |
getRequiredServices(RequiredServiceInfo info,
RequiredServiceBinding binding)
Get required services.
|
<T> IIntermediateFuture<T> |
getRequiredServices(RequiredServiceInfo info,
RequiredServiceBinding binding,
boolean rebind)
Get required services.
|
<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.
|
IIntermediateFuture<IService> |
getServices(ISearchManager manager,
IVisitDecider decider,
IResultSelector selector)
Get all services of a type.
|
abstract IFuture<Class<?>> |
getServiceType(IServiceIdentifier sid) |
String |
getType()
Get the type of the service provider (e.g. enclosing component type).
|
int |
hashCode()
Get the hashcode.
|
void |
removeInterceptor(IServiceInvocationInterceptor interceptor,
Object service)
Remove a service interceptor.
|
IFuture<Void> |
removeService(IServiceIdentifier sid)
Removes a service from the platform (shutdowns also the service).
|
IFuture<Void> |
serviceShutdowned(IInternalService service)
Called after a service has been shutdowned.
|
IFuture<Void> |
serviceStarted(IInternalService service)
Called after a service has been started.
|
void |
setRequiredServiceInfos(RequiredServiceInfo[] requiredservices)
Set the required services.
|
IFuture<Void> |
shutdown()
Shutdown the service.
|
IFuture<Void> |
start()
Start the service.
|
String |
toString()
Get the string representation.
|
searchService, searchService, searchServices, searchServices, searchServiceUpwardspublic BasicServiceContainer(IComponentIdentifier id)
public IIntermediateFuture<IService> getServices(ISearchManager manager, IVisitDecider decider, IResultSelector selector)
getServices in interface IServiceProviderclazz - The class.public abstract IFuture<IServiceProvider> getParent()
getParent in interface IServiceProviderpublic abstract IFuture<Collection<IServiceProvider>> getChildren()
getChildren in interface IServiceProviderpublic IComponentIdentifier getId()
getId in interface IServiceProviderpublic String getType()
getType in interface IServiceProviderpublic IFuture<Void> addService(IInternalService service, ProvidedServiceInfo info)
addService in interface IServiceContainerid - The name.service - The service.public IFuture<Void> removeService(IServiceIdentifier sid)
removeService in interface IServiceContainerid - The name.service - The service.public IFuture<Void> start()
start in interface IServiceContainerpublic IFuture<Void> shutdown()
shutdown in interface IServiceContainerpublic IFuture<Void> serviceStarted(IInternalService service)
public IFuture<Void> serviceShutdowned(IInternalService service)
public <T> IFuture<T> getService(Class<T> 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)
getProvidedServices in interface IServiceContainerclazz - The interface.public RequiredServiceInfo[] getRequiredServiceInfos()
getRequiredServiceInfos in interface IServiceContainerpublic void setRequiredServiceInfos(RequiredServiceInfo[] requiredservices)
setRequiredServiceInfos in interface IServiceContainerrequired - services The required services to set.public void addRequiredServiceInfos(RequiredServiceInfo[] requiredservices)
addRequiredServiceInfos in interface IServiceContainerprefix - The name prefix to use.required - services The required services to set.public RequiredServiceInfo getRequiredServiceInfo(String name)
getRequiredServiceInfo in interface IServiceContainername - The name.public IFuture<IService> getRequiredService(RequiredServiceInfo info, RequiredServiceBinding binding)
public IIntermediateFuture<IService> getRequiredServices(RequiredServiceInfo info, RequiredServiceBinding binding)
public <T> IFuture<T> getRequiredService(String name)
getRequiredService in interface IServiceContainername - The service name.public <T> IIntermediateFuture<T> getRequiredServices(String name)
getRequiredServices in interface IServiceContainername - The services name.public <T> IFuture<T> getRequiredService(String name, boolean rebind)
getRequiredService in interface IServiceContainerpublic <T> IIntermediateFuture<T> getRequiredServices(String name, boolean rebind)
getRequiredServices in interface IServiceContainerpublic <T> IFuture<T> getRequiredService(RequiredServiceInfo info, RequiredServiceBinding binding, boolean rebind)
public <T> IIntermediateFuture<T> getRequiredServices(RequiredServiceInfo info, RequiredServiceBinding binding, boolean rebind)
public abstract IRequiredServiceFetcher createServiceFetcher(String name)
public void addInterceptor(IServiceInvocationInterceptor interceptor, Object service, int pos)
addInterceptor in interface IServiceContainerinterceptor - The interceptor.service - The service.pos - The position (0=first, -1=last-1, i.e. one before method invocation).public void removeInterceptor(IServiceInvocationInterceptor interceptor, Object service)
removeInterceptor in interface IServiceContainerinterceptor - The interceptor.service - The service.public IServiceInvocationInterceptor[] getInterceptors(Object service)
getInterceptors in interface IServiceContainerservice - The service.public abstract IFuture<Class<?>> getServiceType(IServiceIdentifier sid)
public String toString()
public int hashCode()
public boolean equals(Object obj)
Copyright © 2012. All Rights Reserved.