public class ComponentServiceContainer extends BasicServiceContainer
Constructor and Description |
---|
ComponentServiceContainer(IComponentAdapter adapter,
String type,
IInternalAccess instance)
Create a new service container.
|
Modifier and Type | Method and Description |
---|---|
IRequiredServiceFetcher |
createServiceFetcher(String name)
Create a service fetcher.
|
IFuture<Collection<IServiceProvider>> |
getChildren()
Get the children service containers.
|
<T> T |
getMultiService(String reqname,
Class<T> multitype)
Get a multi service.
|
IFuture<IServiceProvider> |
getParent()
Get the parent service container.
|
static IFuture<IPublishService> |
getPublishService(IInternalAccess instance,
String type,
Iterator<IPublishService> services)
Get the publish service for a publish type (e.g. web service).
|
<T> IFuture<T> |
getRequiredService(RequiredServiceInfo info,
RequiredServiceBinding binding,
boolean rebind)
Get a required service.
|
<T> IIntermediateFuture<T> |
getRequiredServices(RequiredServiceInfo info,
RequiredServiceBinding binding,
boolean rebind)
Get required services.
|
<T> IFuture<T> |
getService(Class<T> type,
IComponentIdentifier cid)
Get a service of a specific component.
|
IFuture<Class<?>> |
getServiceType(IServiceIdentifier sid) |
String |
getType()
Get the type of the service provider (e.g. enclosing component type).
|
<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).
|
IFuture<Void> |
serviceShutdowned(IInternalService service)
Called after a service has been shutdowned.
|
IFuture<Void> |
serviceStarted(IInternalService service)
Called after a service has been started.
|
IFuture<Void> |
shutdown()
Shutdown the container.
|
IFuture<Void> |
start()
Start the service.
|
String |
toString()
Get the string representation.
|
addInterceptor, addRequiredServiceInfos, addService, equals, getId, getInterceptors, getMethodTimeout, getProvidedService, getProvidedServices, getRequiredService, getRequiredService, getRequiredService, getRequiredServiceInfo, getRequiredServiceInfos, getRequiredServices, getRequiredServices, getRequiredServices, getServices, hashCode, removeInterceptor, removeService, setRequiredServiceInfos
public ComponentServiceContainer(IComponentAdapter adapter, String type, IInternalAccess instance)
public <T> IFuture<T> getRequiredService(RequiredServiceInfo info, RequiredServiceBinding binding, boolean rebind)
getRequiredService
in class BasicServiceContainer
public <T> T getMultiService(String reqname, Class<T> multitype)
reqname
- The required service name.multitype
- The interface of the multi service.public <T> IIntermediateFuture<T> getRequiredServices(RequiredServiceInfo info, RequiredServiceBinding binding, boolean rebind)
getRequiredServices
in class BasicServiceContainer
public <T> IFuture<T> getService(Class<T> type, IComponentIdentifier cid)
getService
in interface IServiceContainer
getService
in class BasicServiceContainer
type
- The class.cid
- The component identifier of the target component.public <T> IFuture<T> searchService(Class<T> type)
type
- The class.public <T> IFuture<T> searchService(Class<T> type, String scope)
type
- The class.public <T> IFuture<T> searchServiceUpwards(Class<T> type)
type
- The class.public <T> IIntermediateFuture<T> searchServices(Class<T> type)
type
- The class.public <T> IIntermediateFuture<T> searchServices(Class<T> type, String scope)
type
- The class.public IFuture<IServiceProvider> getParent()
getParent
in interface IServiceProvider
getParent
in class BasicServiceContainer
public IFuture<Collection<IServiceProvider>> getChildren()
getChildren
in interface IServiceProvider
getChildren
in class BasicServiceContainer
public IRequiredServiceFetcher createServiceFetcher(String name)
createServiceFetcher
in class BasicServiceContainer
public String getType()
getType
in interface IServiceProvider
getType
in class BasicServiceContainer
public IFuture<Void> start()
start
in interface IServiceContainer
start
in class BasicServiceContainer
public IFuture<Void> shutdown()
shutdown
in interface IServiceContainer
shutdown
in class BasicServiceContainer
public IFuture<Void> serviceStarted(IInternalService service)
serviceStarted
in class BasicServiceContainer
public IFuture<Void> serviceShutdowned(IInternalService service)
serviceShutdowned
in class BasicServiceContainer
public static IFuture<IPublishService> getPublishService(IInternalAccess instance, String type, Iterator<IPublishService> services)
type
- The type.services
- The iterator of publish services (can be null).public IFuture<Class<?>> getServiceType(IServiceIdentifier sid)
getServiceType
in class BasicServiceContainer
public String toString()
toString
in class BasicServiceContainer
Copyright © 2012. All Rights Reserved.