rcf.core.concurrent.schedule
Class AbstractTask

java.lang.Object
  extended by rcf.core.concurrent.events.AbstractEventSource
      extended by rcf.core.concurrent.schedule.AbstractTask
All Implemented Interfaces:
EventSource, Task
Direct Known Subclasses:
AbstractInterruptibleTask, AbstractService, AbstractTransaction, DynamicOperation.Default.Continuation, ExternalTransaction, Framework.Default, MethodRunnableFuture

@Revision(value="$Revision: 1.9 $",
          date="$Date: 2006/11/25 20:02:00 $",
          tag="$Name:  $")
public class AbstractTask
extends AbstractEventSource
implements Task

TODO: Javadoc

TODO: Unit tests, Code review, Javadoc review, Seal/Finalize TODO: equals, hashCode, toString

Version:
$Revision: 1.9 $
Author:
Greg Gibeling

Nested Class Summary
 
Nested classes/interfaces inherited from interface rcf.core.concurrent.schedule.Task
Task.State
 
Field Summary
private  Task.State state
          TODO: Javadoc
protected static SoftReference<rcf.core.util.collection.ImmutableCollection<Class>> taskEventTypes
          TODO: Javadoc
 
Fields inherited from class rcf.core.concurrent.events.AbstractEventSource
syndicate
 
Constructor Summary
AbstractTask()
           
 
Method Summary
 rcf.core.util.collection.ImmutableCollection<Class> events()
          Return an immutable collection of all the classes of Events which this source will generate and syndicate.
 EventSyndicate syndicate()
          Return the current syndicate for this event source, or allocate one if there isn't one.
protected static rcf.core.util.collection.ImmutableCollection<Class> taskEventTypes()
          TODO: Javadoc
 Task.State taskState()
          TODO: Javadoc
protected  Task.State taskState(Task.State _state)
          TODO: Javadoc
 
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.events.EventSource
getSequenceNumber, incSequenceNumber, isSyndicated
 

Field Detail

taskEventTypes

protected static SoftReference<rcf.core.util.collection.ImmutableCollection<Class>> taskEventTypes
TODO: Javadoc


state

private Task.State state
TODO: Javadoc

Constructor Detail

AbstractTask

public AbstractTask()
Method Detail

taskEventTypes

protected static final rcf.core.util.collection.ImmutableCollection<Class> taskEventTypes()
TODO: Javadoc

Returns:

events

public final rcf.core.util.collection.ImmutableCollection<Class> events()
Description copied from interface: EventSource
Return an immutable collection of all the classes of Events which this source will generate and syndicate. This can be used to check if a source will be will to generate specific events of interest to a potential sink.

Specified by:
events in interface EventSource
Returns:
An immutable collection of all the classes of events which this source will generate and syndicate.

taskState

public Task.State taskState()
Description copied from interface: Task
TODO: Javadoc

Specified by:
taskState in interface Task
Returns:

taskState

protected Task.State taskState(Task.State _state)
TODO: Javadoc

Parameters:
_state -

syndicate

public EventSyndicate syndicate()
Description copied from interface: EventSource
Return the current syndicate for this event source, or allocate one if there isn't one. This method should never return null unless EventSource.events().ImmutableIterable.isEmpty() == true.

Specified by:
syndicate in interface EventSource
Overrides:
syndicate in class AbstractEventSource
Returns:
The event syndicate which an EventSink should register with (EventSyndicate.add(rcf.core.util.reference.Reference, Class)) to receive events from this source.