public interface Service extends Service
| Modifier and Type | Interface and Description | 
|---|---|
static interface  | 
Service.MemberJoinAction
MemberJoinAction is taken to allow a new member to join a clustered Service. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addMemberListener(MemberListener listener)
Add a Member listener. 
 | 
Cluster | 
getCluster()
Return the Cluster object that this Service is a part of. 
 | 
ServiceDependencies | 
getDependencies()
Return the service's dependencies. 
 | 
ServiceInfo | 
getInfo()
Return the ServiceInfo object for this Service. 
 | 
ResourceRegistry | 
getResourceRegistry()
Retrieves a Service scoped  
ResourceRegistry. | 
Serializer | 
getSerializer()
Return a Serializer used by this Service. 
 | 
Object | 
getUserContext()
Return the user context object associated with this Service. 
 | 
void | 
removeMemberListener(MemberListener listener)
Remove a Member listener. 
 | 
void | 
setDependencies(ServiceDependencies deps)
Configure the Service. 
 | 
void | 
setUserContext(Object oCtx)
Associate a user context object with this Service. 
 | 
addServiceListener, removeServiceListenerconfigure, isRunning, shutdown, start, stopgetContextClassLoader, setContextClassLoaderCluster getCluster()
ServiceInfo getInfo()
void addMemberListener(MemberListener listener)
MemberListeners will be invoked in the order in which they are registered.
listener - the MemberListener to addvoid removeMemberListener(MemberListener listener)
listener - the MemberListener to removeObject getUserContext()
The data type and semantics of this context object are entirely application specific and are opaque to the Service itself.
void setUserContext(Object oCtx)
oCtx - a user context objectSerializer getSerializer()
void setDependencies(ServiceDependencies deps)
This method can only be called before the Service is started.
deps - the dependencies object carrying configuration information specific to this ServiceIllegalStateException - thrown if the Service is already runningIllegalArgumentException - thrown if the configuration information is invalidServiceDependencies getDependencies()
ResourceRegistry getResourceRegistry()
ResourceRegistry. The resource registry is used to:
ResourceRegistry API for details on how to enable cleanup of resources.