jadex.bridge.service.component.IExternalProvidedServicesFeature Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-platform-bridge Show documentation
Show all versions of jadex-platform-bridge Show documentation
Jadex bridge is a base package for kernels and platforms, i.e., it is used by both and provides commonly used interfaces and classes for active components and their management.
package jadex.bridge.service.component;
import jadex.bridge.service.IServiceIdentifier;
import jadex.bridge.service.ProvidedServiceInfo;
import jadex.bridge.service.PublishInfo;
import jadex.bridge.service.ServiceScope;
import jadex.commons.future.IFuture;
/**
* Component feature for provided services.
*/
public interface IExternalProvidedServicesFeature
{
// todo: change signature of addService to return the service or sid!
/**
* Add a service to the container.
* The service is started, if the container is already running.
* @param service The service.
* @param info The provided service info.
* @return A future that is done when the service has completed starting.
*/
public IFuture addService(String name, Class> type, Object service);
/**
* Add a service to the platform.
* If under the same name and type a service was contained,
* the old one is removed and shutdowned.
* @param type The public service interface.
* @param service The service.
* @param type The proxy type (@see{BasicServiceInvocationHandler}).
*/
public IFuture addService(String name, Class> type, Object service, String proxytype);
/**
* Add a service to the platform.
* If under the same name and type a service was contained,
* the old one is removed and shutdowned.
* @param type The public service interface.
* @param service The service.
* @param scope The service scope.
*/
public IFuture addService(String name, Class> type, Object service, PublishInfo pi, ServiceScope scope);
/**
* Add a service to the platform.
* If under the same name and type a service was contained,
* the old one is removed and shutdowned.
* @param type The public service interface.
* @param info The config settings.
*/
public IFuture addService(String name, Class> type, Object service, ProvidedServiceInfo info);
/**
* Sets the tags of a service.
*
* @param sid The Service identifier.
* @param tags The tags.
* @return New service identifier.
*/
public IFuture setTags(IServiceIdentifier sid, String... tags);
/**
* Removes a service from the container (shutdowns also the service if the container is running).
* @param service The service identifier.
* @return A future that is done when the service has completed its shutdown.
*/
public IFuture removeService(IServiceIdentifier sid);
}