|
| Services |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object | +--com.sas.services.AbstractRemoteService
Abstract implementation of a remoteable service. A service may extend this implementation if it is remoteable and is intended to be deployed in a distributed environment.
Note that this class is extended by
com.sas.services.AbstractService
which provides a version that may be used
locally within a JVM process. Methods specified in the local version do
not throw RemoteException.
RemoteServiceInterface,
ServiceConfigurationInterface| Fields inherited from interface com.sas.services.RemoteServiceInterface |
CLASS_IDENTIFIER |
| Constructor Summary | |
AbstractRemoteService()
Constructs a default instance. |
|
| Method Summary | |
void |
addServiceObserver(ServiceRemoteObserverInterface serviceObserver)
Adds a service observer. |
void |
configure(ServiceConfigurationInterface serviceConfiguration)
Configures the service. |
void |
destroy()
Handles the destruction of this service. |
long |
getCreationTime()
Gets the time at which this configuration was created. |
String |
getEntityKey()
Gets this service's entity key. |
ServiceConfigurationInterface |
getServiceConfiguration()
Gets this service's configuration. |
ServiceConfigurationInterface |
getServiceConfiguration(Object key)
Gets the service configuration associated with the specified lookup key. |
RemoteServiceInterface |
getServiceProxy()
Gets the service proxy. |
short |
getServiceState()
Gets the service's state. |
boolean |
isAccessibleToRemoteClients()
Determines whether or not the service is intended to be accessible to remote clients. |
boolean |
isExported()
Determines whether or not the service has been exported to the RMI system. |
void |
notifyServiceObservers(ServiceEvent serviceEvent)
Notify all registered service observers of the specified service event. |
void |
removeAllServiceObservers()
Removes all service observers. |
void |
removeServiceObserver(ServiceRemoteObserverInterface serviceObserver)
Removes a service observer. |
boolean |
sameEntity(EntityKeyInterface entity)
Determines whether or not this service entity is the same as the specified entity. |
void |
setEntityKey(String entityKey)
Set the unique entity key for the service. |
void |
setRemoteableExporter(RemoteObjectExporterInterface remoteableExporter)
Sets the remoteable exporter. |
void |
setServiceState(ServiceState serviceState)
Sets the service's state. |
String |
toString()
Returns a String representation of this service. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AbstractRemoteService()
| Method Detail |
public final void setRemoteableExporter(RemoteObjectExporterInterface remoteableExporter)
remoteableExporter - Utility to export/unexport a remoteable object.
public ServiceConfigurationInterface getServiceConfiguration()
throws RemoteException
The service's configuration can always be retrieved irregardless of the service's state.
getServiceConfiguration in interface RemoteServiceInterfaceRemoteException - if a network anomaly occurs.
public ServiceConfigurationInterface getServiceConfiguration(Object key)
throws RemoteException
ServiceConfigurationInterface.CONFIGURATION_SERVICE_DISCOVERY
then this configuration would be returned if defined.
If a null lookup key is specified, then the base service
configuration is returned.getServiceConfiguration in interface RemoteServiceInterfacekey - Key designating an ancillary configuration.null if no configuration is defined for the
specified key.RemoteException - if a network anomaly occurs.
public void configure(ServiceConfigurationInterface serviceConfiguration)
throws InitializationException,
RemoteException,
ServiceException
configure in interface RemoteServiceInterfaceserviceConfiguration - Service's configuration.InitializationException - in unable to configure the service.ServiceException - if a service exception is encountered.RemoteException - if a network anomaly occurs.
public String getEntityKey()
throws RemoteException
getEntityKey in interface EntityKeyInterfaceRemoteException - if a network anomaly occurs.
public void setEntityKey(String entityKey)
throws RemoteException,
IllegalStateException
setEntityKey in interface EntityKeyInterfaceentityKey - Unique entity key.RemoteException - if a network anomaly occurs.IllegalStateException - The unique entity key for
a service cannot be changed.
public boolean sameEntity(EntityKeyInterface entity)
throws RemoteException
sameEntity in interface EntityKeyInterfaceentity - Entity to be compared to this service entity.true if the service entities are the same or
false if they aren't.RemoteException - if a network anomaly occurs.
public short getServiceState()
throws RemoteException
getServiceState in interface RemoteServiceInterfaceRemoteException - if a network anomaly occurs.
public void setServiceState(ServiceState serviceState)
throws ServiceException,
RemoteException
setServiceState in interface RemoteServiceInterfaceserviceState - Service's new state.ServiceException - if unable to process the request.RemoteException - if a network anomaly occurs.
public boolean isExported()
throws ServiceException,
RemoteException
isExported in interface RemoteServiceInterfacetrue if the service has been exported or
false if it hasn't.ServiceException - if unable to process the request.RemoteException - if a network anomaly occurs.
public boolean isAccessibleToRemoteClients()
throws ServiceException,
RemoteException
isAccessibleToRemoteClients in interface RemoteServiceInterfacetrue if the service is intended to be accessible
to remote clients or
false if it isn't.ServiceException - if unable to process the request.RemoteException - if a network anomaly is encountered.
public void destroy()
throws ServiceException,
RemoteException
Once a service has been destroyed it should never be used again. The
service's state is set to
ServiceState.SERVICE_STATE_DEACTIVATED.
This method is synchronized to ensure that service destruction only occurs once.
destroy in interface RemoteServiceInterfaceServiceException - if a service exception is encountered.RemoteException - if a network anomaly occurs.
public final void addServiceObserver(ServiceRemoteObserverInterface serviceObserver)
throws RemoteException
addServiceObserver in interface ServiceNotificationBroadcasterInterfaceserviceObserver - An observer interested in receiving service notifications.RemoteException - if a network anomaly is encountered.
public final void removeServiceObserver(ServiceRemoteObserverInterface serviceObserver)
throws RemoteException
removeServiceObserver in interface ServiceNotificationBroadcasterInterfaceserviceObserver - An observer no longer interested in receiving service notifications.RemoteException - if a network anomaly is encountered.
public final void removeAllServiceObservers()
throws RemoteException
removeAllServiceObservers in interface ServiceNotificationBroadcasterInterfaceRemoteException - if a network anomaly is encountered.
public final void notifyServiceObservers(ServiceEvent serviceEvent)
throws RemoteException,
IllegalArgumentException
notifyServiceObservers in interface ServiceNotificationBroadcasterInterfaceserviceEvent - Service event to be broadcast to all registered service observers.RemoteException - if a network anomaly is encountered.IllegalArgumentException - if a null service event
is specified.
public long getCreationTime()
throws RemoteException
getCreationTime in interface RemoteServiceInterfaceRemoteException - if a network anomaly is encountered.
public RemoteServiceInterface getServiceProxy()
throws RemoteException
getServiceProxy in interface RemoteServiceInterfacenull
if a proxy is not available.RemoteException - if a network anomaly is encountered.public String toString()
toString in class Object
|
| Services |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||