|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.discovery.RemoteDiscoveryServiceProxy
public class RemoteDiscoveryServiceProxy
Proxy to a discovery service that is capable of servicing remote clients.
If this proxy is serialized to a remote process then the proxy will optimize calls to ensure that a local object reference is used where appropriate and that static data is cached locally to minimize remote calls.
Field Summary |
---|
Fields inherited from interface com.sas.services.discovery.FindServiceInterface |
---|
FIND_ALL_MATCHES, FIND_ONE_MATCH |
Fields inherited from interface com.sas.services.RemoteServiceInterface |
---|
CLASS_IDENTIFIER, CLASS_IDENTIFIER_1_1, CLASS_IDENTIFIER_1_2, CLASS_IDENTIFIER_SERVICE_TYPE, CLASS_IDENTIFIER_SERVICE_TYPE_1_1, CLASS_IDENTIFIER_SERVICE_TYPE_1_2 |
Constructor Summary | |
---|---|
RemoteDiscoveryServiceProxy(DiscoveryServiceInterface discoveryService)
Constructs a proxy to the specified discovery service. |
Method Summary | |
---|---|
void |
addDiscoveryDelegate(FindServiceInterface serviceFinder)
Adds an delegate that is capable of discovering implementations. |
void |
addService(RemoteServiceInterface serviceIf)
Adds a service to the registry. |
RemoteServiceInterface |
findService(ServiceTemplate serviceTemplate)
Finds a service using a discovery mechanism. |
Services |
findServices(ServiceTemplate serviceTemplate,
int maxNumMatches,
Services discoveredServices)
Finds a collection of objects via a discovery mechanism. |
RemoteServiceInterface |
findServiceUsingId(java.lang.String serviceId)
Re-acquires a previously discovered service via its service discovery ID. |
java.util.Iterator |
getDiscoverers()
Gets an iterator of the discovery services. |
java.util.Iterator |
getLocalServices()
Gets an iterator of local objects that implement the RemoteServiceInterface interface. |
java.util.Iterator |
getRemoteServices()
Gets an iterator of registered services. |
RemoteServiceInterface |
getServiceProxy()
Gets the service proxy. |
void |
removeDiscoveryDelegate(FindServiceInterface serviceFinder)
Removes an agent previously added as a discovery agent. |
void |
removeService(RemoteServiceInterface serviceIf)
Removes a service from the registry. |
Methods inherited from interface com.sas.services.RemoteServiceInterface |
---|
configure, destroy, getCreationTime, getServiceConfiguration, getServiceConfiguration, getServiceState, isAccessibleToRemoteClients, isExported, reconfigure, setServiceState |
Methods inherited from interface com.sas.services.mgmt.ServiceNotificationBroadcasterInterface |
---|
addServiceObserver, notifyServiceObservers, removeAllServiceObservers, removeServiceObserver |
Constructor Detail |
---|
public RemoteDiscoveryServiceProxy(DiscoveryServiceInterface discoveryService) throws InitializationException
discoveryService
- Remote discovery service to be proxied.
InitializationException
- if unable to create a
proxy for the discovery service.Method Detail |
---|
public final RemoteServiceInterface getServiceProxy()
getServiceProxy
in interface RemoteServiceInterface
getServiceProxy
in class ServiceProxy
null
if a proxy is not available.public RemoteServiceInterface findServiceUsingId(java.lang.String serviceId) throws ServiceException, ServiceNotAvailableException, java.rmi.RemoteException
findServiceUsingId
in interface FindServiceInterface
serviceId
- Service's discovery ID.
RemoteServiceInterface
implementation
that satisfies the discovery parameters. Note that
RemoteServiceInterface
is the base interface
implemented by all services.
ServiceException
- if an unanticipated exception occurs while
processing the discovery. Note that
ServiceNotAvailableException
extends
ServiceException
.
ServiceNotAvailableException
- if no service satisfies
the requested service template.
java.rmi.RemoteException
- if a network anomaly is encountered.public final RemoteServiceInterface findService(ServiceTemplate serviceTemplate) throws ServiceException, ServiceNotAvailableException, java.rmi.RemoteException
To be considered a successful match, the service must satisfy the requested service template which may be used to specify:
ServiceAttributeInterface
findService
in interface FindServiceInterface
serviceTemplate
- Service capability template that specifies
the desired class(es) that define a service.
The template may also specify
criteria to provide additional filtering.
RemoteServiceInterface
implementation
that satisfies the requested service template. Note that
RemoteServiceInterface
is the base interface
implemented by all services.
ServiceException
- if an unanticipated exception occurs while
processing the discovery.
ServiceNotAvailableException
- if no service satisfies
the requested service template. Note that
ServiceNotAvailableException
extends
ServiceException
.
java.rmi.RemoteException
- if a network anomaly is encountered.ServiceTemplate
public final Services findServices(ServiceTemplate serviceTemplate, int maxNumMatches, Services discoveredServices) throws ServiceException, ServiceNotAvailableException, java.rmi.RemoteException
To be considered a successful match, the service must satisfy the requested service template which may be used to specify:
findServices
in interface FindServiceInterface
serviceTemplate
- Service capability template that specifies either
maxNumMatches
- Maximum number of services.discoveredServices
- A collection containing services that
have already been found. Set this parameter to
null
if no services have
been found yet.
java.rmi.RemoteException
- if a network anomaly is encountered.
ServiceException
- if an unanticipated exception occurs while
processing the discovery.
ServiceNotAvailableException
- if no service satisfies the
requested service template.ServiceTemplate
public void addDiscoveryDelegate(FindServiceInterface serviceFinder) throws java.rmi.RemoteException
addDiscoveryDelegate
in interface DiscoveryAdminInterface
serviceFinder
- Discovery service implementation.
java.rmi.RemoteException
- if a network anomaly is encountered.public void removeDiscoveryDelegate(FindServiceInterface serviceFinder) throws java.rmi.RemoteException
removeDiscoveryDelegate
in interface DiscoveryAdminInterface
serviceFinder
- Discovery service implementation to remove.
java.rmi.RemoteException
- if a network anomaly is encountered.public java.util.Iterator getRemoteServices() throws java.rmi.RemoteException
getRemoteServices
in interface DiscoveryAdminInterface
RemoteServiceInterface
interface.
java.rmi.RemoteException
- if a network anomaly is encountered.public final java.util.Iterator getLocalServices() throws java.rmi.RemoteException
RemoteServiceInterface
interface.
getLocalServices
in interface DiscoveryAdminInterface
RemoteServiceInterface
interface.
java.rmi.RemoteException
- if a network anomaly is encountered.public void removeService(RemoteServiceInterface serviceIf) throws java.rmi.RemoteException
removeService
in interface DiscoveryAdminInterface
serviceIf
- Service that is to be removed.
java.rmi.RemoteException
- if a network anomaly is encountered.public final java.util.Iterator getDiscoverers() throws java.rmi.RemoteException
getDiscoverers
in interface DiscoveryAdminInterface
java.rmi.RemoteException
- if a network anomaly is encountered.public void addService(RemoteServiceInterface serviceIf) throws ServiceException, java.rmi.RemoteException
addService
in interface DiscoveryAdminInterface
serviceIf
- Service that is discoverable via its service
capabilities.
ServiceException
- if unable to cache the service.
java.rmi.RemoteException
- if a network anomaly is encountered.
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |