*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.discovery
Class ServicesCache
java.lang.Object
com.sas.services.discovery.ServicesCache
- All Implemented Interfaces:
Serializable
@SASScope("ALL")
@BinaryCompatibilityOnly
public class ServicesCache
extends Object
implements Serializable
Cache used to store foundation services.
- Since:
- 1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidAdds a collection of services to the cache.final voidadd(RemoteServiceInterface service) Adds a service to the the cache.final Iterator<RemoteServiceInterface> Gets an iterator of services that are available within the local JVM process.final Iterator<RemoteServiceInterface> Gets an iterator of remotely available services.final ServicesgetServices(ServiceTemplate serviceTemplate, int maxNumMatches, Services services, boolean isLocal) Gets a collection of services that satisfy the specified service capabilities.final voidremove(RemoteServiceInterface service) Removes the service from the cache.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ServicesCache
public ServicesCache()
-
-
Method Details
-
getServices
public final Services getServices(ServiceTemplate serviceTemplate, int maxNumMatches, Services services, boolean isLocal) Gets a collection of services that satisfy the specified service capabilities. The cache of locally available services is searched first followed by the cache of remotely available services if necessary.- Parameters:
serviceTemplate- Desired service capabilities.maxNumMatches- Maximum number of services to find.services- Collection of discovered services.isLocal- Whether localtrueor remotefalseservices are desired.- Returns:
- Services satisfying the requested service template.
-
add
Adds a collection of services to the cache. Only services that are not presently in the cache may be added.- Parameters:
services- Collection of services.
-
add
Adds a service to the the cache.If a proxy is defined for the service then the service's proxy will be cached instead of the service.
A service will be cached as a remote service if it is a remote object or if the service's proxy is a remote object.
- Parameters:
service- Service to be added to the cache.- Throws:
ServiceException- if unable to cache the service.
-
remove
Removes the service from the cache.- Parameters:
service- The service to remove.
-
getLocalServices
Gets an iterator of services that are available within the local JVM process.- Returns:
- Iterator for collection copy of locally available services
implementing
RemoteServiceInterface.
-
getRemoteServices
Gets an iterator of remotely available services. These are services that are available from an external JVM process.- Returns:
- Iterator for collection copy of remotely available services
implementing
RemoteServiceInterface.
-