All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jadex.bridge.service.component.IInternalRequiredServicesFeature Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 4.0.267
Show newest version
package jadex.bridge.service.component;

import java.util.Collection;

import jadex.bridge.service.RequiredServiceInfo;
import jadex.bridge.service.search.ServiceQuery;
import jadex.commons.future.IFuture;
import jadex.commons.future.ISubscriptionIntermediateFuture;
import jadex.commons.future.ITerminableIntermediateFuture;

/**
 *  Interface for internal service access methods.
 */
public interface IInternalRequiredServicesFeature
{
	/**
	 *  Get the required service info for a name.
	 *  @param name	The required service name.
	 */
	// Hack!!! used by multi invoker?
	public RequiredServiceInfo	getServiceInfo(String name);
	
	/**
	 *  Get a service raw (i.e. w/o required proxy).
	 */
	// Hack???
	public 	T	getRawService(Class type);

	/**
	 *  Get a service raw (i.e. w/o required proxy).
	 */
	// Hack???
	public 	Collection	getRawServices(Class type);

	/**
	 *  Search for matching services and provide first result.
	 *  @param query	The search query.
	 *  @param info	Used for required service proxy configuration -> null for no proxy.
	 *  @return Future providing the corresponding service or ServiceNotFoundException when not found.
	 */
	public  IFuture resolveService(ServiceQuery query, RequiredServiceInfo info);
	
	/**
	 *  Search for matching services and provide first result.
	 *  Synchronous method only for locally available services.
	 *  @param query	The search query.
	 *  @param info	Used for required service proxy configuration -> null for no proxy.
	 *  @return Future providing the corresponding service or ServiceNotFoundException when not found.
	 */
	public  T resolveLocalService(ServiceQuery query, RequiredServiceInfo info);
	
	/**
	 *  Search for all matching services.
	 *  @param query	The search query.
	 *  @param info	Used for required service proxy configuration -> null for no proxy.
	 *  @return Future providing the corresponding services or ServiceNotFoundException when not found.
	 */
	public   ITerminableIntermediateFuture resolveServices(ServiceQuery query, RequiredServiceInfo info);
	
	/**
	 *  Search for all matching services.
	 *  Synchronous method only for locally available services.
	 *  @param query	The search query.
	 *  @param info	Used for required service proxy configuration -> null for no proxy.
	 *  @return Future providing the corresponding services or ServiceNotFoundException when not found.
	 */
	public  Collection resolveLocalServices(ServiceQuery query, RequiredServiceInfo info);
	
	/**
	 *  Query for all matching services.
	 *  @param query	The search query.
	 *  @param info	Used for required service proxy configuration -> null for no proxy.
	 *  @return Future providing the corresponding services.
	 */
	public  ISubscriptionIntermediateFuture resolveQuery(ServiceQuery query, RequiredServiceInfo info);
	
	//-------- all declared services (e.g. JCC component details) --------
	
	/**
	 *  Get the required services.
	 *  @return The required services.
	 */
	public RequiredServiceInfo[] getServiceInfos();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy