rcf.core.framework
Interface Framework
- All Superinterfaces:
- ConcurrentRunnableTask, EventSource, InterruptibleTask, Runnable, RunnableTask, Runner<Service>, Service, Task
- All Known Implementing Classes:
- Framework.Default
@Revision(value="$Revision: 1.14 $",
date="$Date: 2006/12/15 20:37:51 $",
tag="$Name: $")
@StaticComponent
public interface Framework- extends Service, EventSource, Runner<Service>
TODO: Javadoc
Framework Lifecycle:
ThreadLocal stores the current application.
Should extend/implement some kind of Runner which puts runnables in their own threads.
Has a single root application.
Has a list of running services.
Should start committing when all the applications are committed.
Should commit when all the applications & daemons are committed.
Calling commit merely initiates the commit process.
This process can also be started if the java runtime shutdown is invoked somehow.
Lifecycle:
Running - Things are running normally.
Committing - Currently committing, only services are running (could have a timeout to interrupt them after a while).
Commited - Everything is done.
On construction a single application is loaded.
Move can be launched using the run(Application) method.
When all applications commit (exit) the framework syndicates a committing event.
Afterwards it clears out any committed services and then sets up eventsinks to wait for the commit of the remaining services.
When all services are committed or interrupted, syndicate a commit event and then actualy exit...
If commit is called or Runtime.exit is called syndicate a commit event.
TODO: Unit tests, Code review, Javadoc review, Seal/Finalize
TODO: equals, hashCode, toString
- Version:
- $Revision: 1.14 $
- Author:
- Greg Gibeling
| Nested classes/interfaces inherited from interface rcf.core.concurrent.schedule.Task |
Task.State |
|
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. |
long |
freeMemory()
TODO: Javadoc |
int |
numProcessors()
TODO: Javadoc |
rcf.core.util.collection.ImmutableCollection<Service> |
services()
TODO: Javadoc
Collection of running services. |
| Methods inherited from interface rcf.core.concurrent.schedule.Task |
taskState |
| Methods inherited from interface rcf.core.concurrent.schedule.Runner |
run |
application
Application application()
- TODO: Javadoc
The application running in the current thread.
- Returns:
applications
rcf.core.util.map.single.ImmutableSMapCollection<Application,Thread> applications()
- TODO: Javadoc
Collection of applications, and the threads running them.
- Returns:
collectGarbage
void collectGarbage()
- TODO: Javadoc
Suggest to the java runtime that now would be a good time to collection garbage.
freeMemory
long freeMemory()
- TODO: Javadoc
- Returns:
numProcessors
int numProcessors()
- TODO: Javadoc
- Returns:
services
rcf.core.util.collection.ImmutableCollection<Service> services()
- TODO: Javadoc
Collection of running services.
- Returns: