rcf.core.framework.services
Class AbstractApplication

java.lang.Object
  extended by rcf.core.concurrent.events.AbstractEventSource
      extended by rcf.core.concurrent.schedule.AbstractTask
          extended by rcf.core.concurrent.schedule.AbstractInterruptibleTask
              extended by 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 Class Summary
 
Nested classes/interfaces inherited from interface rcf.core.concurrent.schedule.Task
Task.State
 
Field Summary
 
Fields inherited from class rcf.core.concurrent.schedule.AbstractInterruptibleTask
interrupt
 
Fields inherited from class rcf.core.concurrent.schedule.AbstractTask
taskEventTypes
 
Fields inherited from class rcf.core.concurrent.events.AbstractEventSource
syndicate
 
Constructor Summary
AbstractApplication()
           
 
Method Summary
 void commit()
          TODO: Javadoc Fully commit.
 String getSummary()
          TODO: Javadoc
 Version getVersion()
          TODO: Javadoc
 
Methods inherited from class rcf.core.concurrent.schedule.AbstractInterruptibleTask
inner, interrupt, run
 
Methods inherited from class rcf.core.concurrent.schedule.AbstractTask
events, syndicate, taskEventTypes, taskState, taskState
 
Methods inherited from class rcf.core.concurrent.events.AbstractEventSource
createdSyndicate, destroyedSyndicate, getSequenceNumber, incSequenceNumber, isSyndicated
 
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.ConcurrentRunnableTask
interrupt, run
 
Methods inherited from interface rcf.core.concurrent.schedule.Task
taskState
 
Methods inherited from interface rcf.core.concurrent.events.EventSource
events, getSequenceNumber, incSequenceNumber, isSyndicated, syndicate
 

Constructor Detail

AbstractApplication

public AbstractApplication()
Method Detail

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: