All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

*** This class provides Binary Compatibility only, not Source Compatibility ***

## com.sas.services.discovery
Class ServicesCache

    com.sas.services.discovery.ServicesCache

All Implemented Interfaces:
  java.io.Serializable

    public class ServicesCache

implements java.io.Serializable

Cache used to store foundation services.

Since:
  1.0
See Also:
  `ServiceTemplate`, `Services`, Serialized Form

Constructor Summary
`ServicesCache()`

Method Summary
`void` | `add(RemoteServiceInterface service)` Adds a service to the the cache.
`void` | `add(Services services)` Adds a collection of services to the cache.
`java.util.Iterator<RemoteServiceInterface>` | `getLocalServices()` Gets an iterator of services that are available within the local JVM process.
`java.util.Iterator<RemoteServiceInterface>` | `getRemoteServices()` Gets an iterator of remotely available services.
`Services` | `getServices(ServiceTemplate serviceTemplate, int maxNumMatches, Services services, boolean isLocal)` Gets a collection of services that satisfy the specified service capabilities.
`void` | `remove(RemoteServiceInterface service)` Removes the service from the cache.

Constructor Detail

### ServicesCache

    public ServicesCache()

Method Detail

### 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 local `true` or remote `false` services are desired.
  Returns:
    Services satisfying the requested service template.

### add

    public final void add(Services services)

  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

    public final void add(RemoteServiceInterface service)
                   throws ServiceException

  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

    public final void remove(RemoteServiceInterface service)

  Removes the service from the cache.

  Parameters:
    `service` - The service to remove.

### getLocalServices

    public final java.util.Iterator<RemoteServiceInterface> 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

    public final java.util.Iterator<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`.

*** This class provides Binary Compatibility only, not Source Compatibility ***

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.