org.oddjob.framework
Class ServiceMethodAdaptor
java.lang.Object
org.oddjob.framework.ServiceMethodAdaptor
- All Implemented Interfaces:
- ComponentAdapter, Service, ServiceAdaptor, Stoppable
public class ServiceMethodAdaptor
- extends Object
- implements ServiceAdaptor
A ServiceAdaptor
that uses a start and stop method.
- Author:
- rob
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceMethodAdaptor
public ServiceMethodAdaptor(Object component,
Method startMethod,
Method stopMethod)
start
public void start()
throws Exception
- Specified by:
start
in interface Service
- Throws:
Exception
stop
public void stop()
throws FailedToStopException
- Description copied from interface:
Stoppable
- Stop executing. This method should not return until the
Stoppable has actually stopped.
- Specified by:
stop
in interface Stoppable
- Throws:
FailedToStopException
getComponent
public Object getComponent()
- Description copied from interface:
ServiceAdaptor
- The component being adapted.
- Specified by:
getComponent
in interface ComponentAdapter
- Specified by:
getComponent
in interface ServiceAdaptor
- Returns:
- The component.