|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.codemonster.surinam.export.lifecycle.ServiceAdapter
public class ServiceAdapter
User: Samuel Provencher Date: Jun 6, 2006 Time: 8:24:01 PM
This Adapter class is here simply to provide a convenient implementation for those who might only want to implement a subset of the lifecycle methods and safely ignore the others (the default implementations are used).
| Field Summary | |
|---|---|
ServiceFinder |
serviceFinder
Injection makes it easy for services to find other services. |
| Constructor Summary | |
|---|---|
ServiceAdapter()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Dummy implementation for subclasses that don't need the method. |
ServiceAvailability |
getServiceAvailability()
This is a standard accessor to acquire a service implementation's availability status. |
ManagedService |
getServiceObject()
Since this implementation does not live as a pooled instance, we simply return a reference to itself. |
String |
getVersion()
A managed implementation will have a version associated with it. |
VersionedProviderImplementationName |
getVersionedProviderImplementationName()
We want to make it easy to get the versioned key if you already have the impl object. |
void |
initialize()
Dummy implementation for subclasses that don't need the method. |
boolean |
isServiceEnabled()
This asks the specific boolean question (because we will ask it a lot), whether or not the impl is 'Service Enabled' which means it is ready to handle requests. |
void |
releaseServiceObject(ManagedService service)
This is a lifecycle management method that provides an implementation the opportunity to perform some action when invocation pooling is being used. |
void |
setServiceAvailability(ServiceAvailability availability)
This is a request for the organization implementation to set its availability to the given state. |
void |
setServiceFinder(ServiceFinder serviceFinder)
|
String |
toString()
Just a quick implementation for subclasses to override. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public ServiceFinder serviceFinder
| Constructor Detail |
|---|
public ServiceAdapter()
| Method Detail |
|---|
public VersionedProviderImplementationName getVersionedProviderImplementationName()
getVersionedProviderImplementationName in interface ManagedServicepublic String getVersion()
ManagedService
getVersion in interface ManagedServicepublic void releaseServiceObject(ManagedService service)
service - This object is the service implementation object that needs to be put back into the pool.public ManagedService getServiceObject()
public ServiceAvailability getServiceAvailability()
getServiceAvailability in interface ManagedServicepublic void setServiceAvailability(ServiceAvailability availability)
setServiceAvailability in interface ManagedServiceavailability - Set the availability of this service implementation.public boolean isServiceEnabled()
isServiceEnabled in interface ManagedServicepublic String toString()
toString in interface ManagedServicetoString in class Objectpublic void initialize()
initialize in interface LifecycleAwarepublic void destroy()
destroy in interface LifecycleAwarepublic void setServiceFinder(ServiceFinder serviceFinder)
setServiceFinder in interface ServiceClient
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||