|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.services.discovery.ActivatableDiscoveryService
public final class ActivatableDiscoveryService
Remotely accessible discovery service.
This implementation of the discovery service supports a remote deployment whereby services registered with this service can be made accessible to clients running in other JVM processes.
| 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 | |
|---|---|
ActivatableDiscoveryService(ServiceConfigurationInterface serviceConfiguration,
DiscoveryServiceInterface discoveryService)
Constructs a default instance of a remote discovery service. |
|
| Method Summary | |
|---|---|
void |
addDiscoveryDelegate(FindServiceInterface serviceFinder)
Adds an delegate that is capable of discovering implementations. |
void |
addService(RemoteServiceInterface service)
Adds a service to the registry. |
void |
configure(ServiceConfigurationInterface serviceConfiguration)
Configures service. |
void |
destroy()
Destroys the service. |
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 runtimeServiceId)
Re-acquires a previously discovered service via its service discovery ID. |
java.util.Iterator<FindServiceInterface> |
getDiscoverers()
Gets an iterator of the discovery services. |
DiscoveryServiceInterface |
getDiscoveryService()
Gets the discovery service. |
java.util.Iterator<RemoteServiceInterface> |
getLocalServices()
Gets an iterator of local objects that implement the RemoteServiceInterface interface. |
java.util.Iterator<RemoteServiceInterface> |
getRemoteServices()
Gets an iterator of registered services. |
java.lang.String |
getServiceName()
Gets the service's name. |
RemoteServiceInterface |
getServiceProxy()
Gets a new proxy to this service. |
void |
removeDiscoveryDelegate(FindServiceInterface serviceFinder)
Removes an agent previously added as a discovery agent. |
void |
removeService(RemoteServiceInterface service)
Removes a service from the registry. |
java.lang.String |
toString()
Gets a string representation of this instance. |
| Methods inherited from interface com.sas.services.RemoteServiceInterface |
|---|
getCreationTime, getServiceConfiguration, getServiceConfiguration, getServiceState, isAccessibleToRemoteClients, isExported, reconfigure, setServiceState |
| Methods inherited from interface com.sas.services.mgmt.ServiceNotificationBroadcasterInterface |
|---|
addServiceObserver, notifyServiceObservers, removeAllServiceObservers, removeServiceObserver |
| Constructor Detail |
|---|
public ActivatableDiscoveryService(ServiceConfigurationInterface serviceConfiguration,
DiscoveryServiceInterface discoveryService)
throws ServiceException,
java.lang.IllegalArgumentException
serviceConfiguration - Service's configuration.discoveryService - A discovery service which may be used to locate other services and
to which a service must bind in order to be located by other
services.
java.lang.IllegalArgumentException - if unable to configure the service.
ServiceException - if unable to export this service.
The service exception's cause may be a RemoteException.| Method Detail |
|---|
public void configure(ServiceConfigurationInterface serviceConfiguration)
throws InitializationException,
java.rmi.RemoteException,
ServiceException,
java.lang.IllegalArgumentException
configure in interface RemoteServiceInterfaceconfigure in class AbstractRemoteServiceserviceConfiguration - An object containing configuration data
necessary to initialize or re-configure a service. Note that the
service provider must verify that the object type is supported.
An InitializationException should be thrown if
the initialization was not completed successfully to indicate that
the instance should not be used.
InitializationException - if unable to configure the service.
java.rmi.RemoteException - if a network anomaly is encountered.
ServiceException - if unable to configure the service.
java.lang.IllegalArgumentException - if a null service configuration
is specified.
public RemoteServiceInterface getServiceProxy()
throws java.lang.IllegalStateException
getServiceProxy in interface RemoteServiceInterfacegetServiceProxy in class AbstractRemoteServicenull
if a proxy is not available.
java.lang.IllegalStateException - if this service has been destroyed.
public void destroy()
throws ServiceException,
java.rmi.RemoteException
destroy in interface RemoteServiceInterfacedestroy in class AbstractRemoteServicejava.rmi.RemoteException - if a network anomaly is encountered.
ServiceException - if the service is unable to prepare itself
for destruction.
public DiscoveryServiceInterface getDiscoveryService()
throws java.lang.IllegalStateException
getDiscoveryService in class AbstractRemoteServicejava.lang.IllegalStateException - if this service has been destroyed.
public RemoteServiceInterface findServiceUsingId(java.lang.String runtimeServiceId)
throws ServiceException,
ServiceNotAvailableException,
java.lang.IllegalStateException,
java.rmi.RemoteException
findServiceUsingId in interface FindServiceInterfaceruntimeServiceId - 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.
java.lang.IllegalStateException
public RemoteServiceInterface findService(ServiceTemplate serviceTemplate)
throws ServiceException,
ServiceNotAvailableException,
java.lang.IllegalArgumentException,
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 FindServiceInterfaceserviceTemplate - 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.
java.lang.IllegalArgumentExceptionServiceTemplate
public Services findServices(ServiceTemplate serviceTemplate,
int maxNumMatches,
Services discoveredServices)
throws ServiceException,
ServiceNotAvailableException,
java.lang.IllegalStateException,
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 FindServiceInterfaceserviceTemplate - 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.
java.lang.IllegalStateException - if this service has been destroyed.ServiceTemplate
public java.util.Iterator<RemoteServiceInterface> getRemoteServices()
throws java.rmi.RemoteException
getRemoteServices in interface DiscoveryAdminInterfaceRemoteServiceInterface interface.
java.rmi.RemoteException - if a network anomaly is encountered.
public java.util.Iterator<RemoteServiceInterface> getLocalServices()
throws java.rmi.RemoteException
RemoteServiceInterface interface.
getLocalServices in interface DiscoveryAdminInterfaceRemoteServiceInterface interface.
java.rmi.RemoteException - if a network anomaly is encountered.
public void addDiscoveryDelegate(FindServiceInterface serviceFinder)
throws java.rmi.RemoteException
addDiscoveryDelegate in interface DiscoveryAdminInterfaceserviceFinder - Discovery service implementation.
java.rmi.RemoteException - if a network anomaly is encountered.
public void removeDiscoveryDelegate(FindServiceInterface serviceFinder)
throws java.rmi.RemoteException
removeDiscoveryDelegate in interface DiscoveryAdminInterfaceserviceFinder - Discovery service implementation to remove.
java.rmi.RemoteException - if a network anomaly is encountered.
public java.util.Iterator<FindServiceInterface> getDiscoverers()
throws java.rmi.RemoteException
getDiscoverers in interface DiscoveryAdminInterfacejava.rmi.RemoteException - if a network anomaly is encountered.
public void addService(RemoteServiceInterface service)
throws ServiceException,
java.rmi.RemoteException
addService in interface DiscoveryAdminInterfaceservice - Service that can be discovered via its service capabilities.
ServiceException - if unable to cache the service.
java.rmi.RemoteException - if a network anomaly is encountered.
public void removeService(RemoteServiceInterface service)
throws java.rmi.RemoteException
removeService in interface DiscoveryAdminInterfaceservice - Service that is to be removed.
java.rmi.RemoteException - if a network anomaly is encountered.public java.lang.String getServiceName()
public java.lang.String toString()
toString in class AbstractRemoteService
|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||