rcf.core.framework.services
Class AbstractApplication
java.lang.Object
rcf.core.concurrent.events.AbstractEventSource
rcf.core.concurrent.schedule.AbstractTask
rcf.core.concurrent.schedule.AbstractInterruptibleTask
rcf.core.framework.services.AbstractApplication
- All Implemented Interfaces:
- Runnable, EventSource, ConcurrentRunnableTask, InterruptibleTask, RunnableTask, Task, Application, Service
- Direct Known Subclasses:
- Main
@Revision(value="$Revision: 1.8 $",
date="$Date: 2006/12/11 21:29:06 $",
tag="$Name: $")
public abstract class AbstractApplication- extends AbstractInterruptibleTask
- implements Application
TODO: Javadoc
This class implements all of the methods from the Application interface.
In return it has a single abstract methods AbstractInterruptibleTask.inner() into which the
concrete implementation class can put a simple imperative program.
This class also contains a condition variable which any wait loops in the AbstractInterruptibleTask.inner()
method should periodically check. This condition variable is meant to help support
the ConcurrentRunnableTask.interrupt() method during
long running computations.
Notice that the methods of this class take complete care of the lifecycle of an application.
TODO: Unit tests, Code review, Javadoc review, Seal/Finalize
TODO: equals, hashCode, toString
TODO: Add a condition variable which is set when the interrupt() method is called
- Version:
- $Revision: 1.8 $
- Author:
- Greg Gibeling
| Nested classes/interfaces inherited from interface rcf.core.concurrent.schedule.Task |
Task.State |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface rcf.core.concurrent.schedule.Task |
taskState |
AbstractApplication
public AbstractApplication()
commit
public void commit()
- Description copied from interface:
ConcurrentRunnableTask
- TODO: Javadoc
Fully commit. Stop accepting new work and gracefully finish anything that's in progress.
Transition to
Task.State.Committing and then Task.State.Committed.
If the commit takes too long (stays in Task.State.Committing), the ConcurrentRunnableTask.interrupt() method may be
used to force an immediate cessation of activity.
- Specified by:
commit in interface ConcurrentRunnableTask
getSummary
public String getSummary()
- Description copied from interface:
Service
- TODO: Javadoc
- Specified by:
getSummary in interface Service
- Returns:
getVersion
public Version getVersion()
- Description copied from interface:
Service
- TODO: Javadoc
- Specified by:
getVersion in interface Service
- Returns: