rcf.core.framework
Class Framework.Default

java.lang.Object
  extended by rcf.core.concurrent.events.AbstractEventSource
      extended by rcf.core.concurrent.schedule.AbstractTask
          extended by rcf.core.framework.Framework.Default
All Implemented Interfaces:
Runnable, EventSource, ConcurrentRunnableTask, InterruptibleTask, RunnableTask, Runner<Service>, Task, Framework, Service
Enclosing interface:
Framework

public static class Framework.Default
extends AbstractTask
implements Framework

TODO: Javadoc

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

Version:
$Revision: 1.14 $
Author:
Greg Gibeling

Nested Class Summary
protected  class Framework.Default.RuntimeShutdownHook
          TODO: Javadoc
protected  class Framework.Default.ServiceTaskEventSink
          TODO: Javadoc
 
Nested classes/interfaces inherited from interface rcf.core.framework.Framework
Framework.Default
 
Nested classes/interfaces inherited from interface rcf.core.concurrent.schedule.Task
Task.State
 
Field Summary
protected  ThreadLocalReference<Application> applications
          TODO: Javadoc
protected  Application bootApplication
          TODO: Javadoc
protected  Framework.Default.RuntimeShutdownHook hook
          TODO: Javadoc
protected  rcf.core.util.collection.Collection<Service> services
          TODO: Javadoc
 
Fields inherited from class rcf.core.concurrent.schedule.AbstractTask
taskEventTypes
 
Fields inherited from class rcf.core.concurrent.events.AbstractEventSource
syndicate
 
Constructor Summary
Framework.Default(Application _bootApplication)
          TODO: Javadoc
 
Method Summary
 Application application()
          TODO: Javadoc The application running in the current thread.
 rcf.core.util.map.single.ImmutableSMapCollection<Application,Thread> applications()
          TODO: Javadoc Collection of applications, and the threads running them.
 void collectGarbage()
          TODO: Javadoc Suggest to the java runtime that now would be a good time to collection garbage.
 void commit()
          TODO: Javadoc Fully commit.
 long freeMemory()
          TODO: Javadoc
 String getSummary()
          TODO: Javadoc
 Version getVersion()
          TODO: Javadoc
 void interrupt()
          TODO: Javadoc Stop running VERY quickly, something has happened that requires an immediate cessation of computation.
 int numProcessors()
          TODO: Javadoc
 void run()
          TODO: Javadoc Starts the task running.
 void run(Service service)
          TODO: Javadoc
 rcf.core.util.collection.ImmutableCollection<Service> services()
          TODO: Javadoc Collection of running services.
 
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.Task
taskState
 
Methods inherited from interface rcf.core.concurrent.events.EventSource
events, getSequenceNumber, incSequenceNumber, isSyndicated, syndicate
 

Field Detail

bootApplication

protected final Application bootApplication
TODO: Javadoc


applications

protected final ThreadLocalReference<Application> applications
TODO: Javadoc


services

protected final rcf.core.util.collection.Collection<Service> services
TODO: Javadoc


hook

protected Framework.Default.RuntimeShutdownHook hook
TODO: Javadoc

Constructor Detail

Framework.Default

public Framework.Default(Application _bootApplication)
TODO: Javadoc

Parameters:
_bootApplication -
Method Detail

application

public Application application()
Description copied from interface: Framework
TODO: Javadoc The application running in the current thread.

Specified by:
application in interface Framework
Returns:

applications

public rcf.core.util.map.single.ImmutableSMapCollection<Application,Thread> applications()
Description copied from interface: Framework
TODO: Javadoc Collection of applications, and the threads running them.

Specified by:
applications in interface Framework
Returns:

collectGarbage

public void collectGarbage()
Description copied from interface: Framework
TODO: Javadoc Suggest to the java runtime that now would be a good time to collection garbage.

Specified by:
collectGarbage in interface Framework

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

freeMemory

public long freeMemory()
Description copied from interface: Framework
TODO: Javadoc

Specified by:
freeMemory in interface Framework
Returns:

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:

interrupt

public void interrupt()
Description copied from interface: ConcurrentRunnableTask
TODO: Javadoc Stop running VERY quickly, something has happened that requires an immediate cessation of computation. Transition to Task.State.Interrupting and then Task.State.Interrupted

Specified by:
interrupt in interface ConcurrentRunnableTask
Specified by:
interrupt in interface InterruptibleTask
See Also:
InterruptibleTask.interrupt()

numProcessors

public int numProcessors()
Description copied from interface: Framework
TODO: Javadoc

Specified by:
numProcessors in interface Framework
Returns:

run

public void run()
Description copied from interface: ConcurrentRunnableTask
TODO: Javadoc Starts the task running. May not perform the majority of the work, may just spawn worker threads, etc...

Specified by:
run in interface Runnable
Specified by:
run in interface ConcurrentRunnableTask
Specified by:
run in interface RunnableTask
See Also:
RunnableTask.run()

run

public void run(Service service)
Description copied from interface: Runner
TODO: Javadoc

Specified by:
run in interface Runner<Service>

services

public rcf.core.util.collection.ImmutableCollection<Service> services()
Description copied from interface: Framework
TODO: Javadoc Collection of running services.

Specified by:
services in interface Framework
Returns: