radtools.services
Class RADTools

java.lang.Object
  extended by rcf.core.framework.component.DynamicComponent.Abstract
      extended by radtools.services.AbstractRADService
          extended by radtools.services.RADTools
All Implemented Interfaces:
Runnable, RADService, EventSink<TaskEvent>, DynamicBound, DynamicComponent, ReflectedBindable<DynamicComponent>, ReflectedComponent, rcf.core.util.accessor.GUIAccessible

@Revision(value="$Revision: 1.2 $",
          date="$Date: 2006/12/16 05:18:21 $",
          tag="$Name:  $")
public class RADTools
extends AbstractRADService
implements EventSink<TaskEvent>, Runnable

TODO: Javadoc

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

Version:
$Revision: 1.2 $
Author:
Greg Gibeling

Nested Class Summary
protected  class RADTools.HelpListener
          TODO: Javadoc
protected  class RADTools.State
          TODO: Javadoc
 
Nested classes/interfaces inherited from class radtools.services.AbstractRADService
AbstractRADService.AbstractRADServiceState, AbstractRADService.RefreshTask, AbstractRADService.StateProxy, AbstractRADService.UpdateTask
 
Nested classes/interfaces inherited from interface rcf.core.framework.component.DynamicComponent
DynamicComponent.Abstract, DynamicComponent.Default
 
Nested classes/interfaces inherited from interface rcf.core.framework.component.DynamicBound
DynamicBound.GUIType
 
Field Summary
protected  Application application
          TODO: Javadoc
protected  RADService datacenter
          TODO: Javadoc
protected  rcf.core.util.collection.sorted.Sorted<TimerTask> queue
          TODO: Javadoc
protected  RADService website
          TODO: Javadoc
 
Fields inherited from class radtools.services.AbstractRADService
composition, dependency, management, proxy, state, window
 
Fields inherited from class rcf.core.framework.component.DynamicComponent.Abstract
component, operations, properties
 
Constructor Summary
RADTools(RADService _management, RADService _dependency, RADService _composition, Application _application)
          TODO: Javadoc
 
Method Summary
 void check()
          TODO: Javadoc Check on the state of the actual service this object represents, and update the state of this object to match.
 RADService datacenter()
          TODO: Javadoc
 boolean event(TaskEvent event)
          Called by an EventSyndicate to notify this sink that an event has occured.
 boolean isConcrete()
          Determine if this RADService is a concrete service, or simply an arbitrary abstraction built for management purposes.
 DynamicProperty<RADService.State> radServiceState()
          Returns the dynamic property object for the state of this service.
 void run()
           
 void schedule(TimerTask task)
          TODO: Javadoc
 String toString()
           
 RADService website()
          TODO: Javadoc
 void window()
          Popup the automatically generated window containing controls for the various DynamicComponent.properties() and DynamicComponent.operations() supported by not only this interface, but by any other component interfaces implemented by any specific RADService object.
 
Methods inherited from class radtools.services.AbstractRADService
communication, composition, dependency, icon, management, radTools, refresh, update
 
Methods inherited from class rcf.core.framework.component.DynamicComponent.Abstract
bind, component, gui, interfaces, isInstance, o, operations, popupMenu, properties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface rcf.core.framework.component.DynamicComponent
component, operations, properties
 
Methods inherited from interface rcf.core.framework.component.DynamicBound
gui
 
Methods inherited from interface rcf.core.util.accessor.GUIAccessible
popupMenu
 
Methods inherited from interface rcf.core.framework.component.ReflectedComponent
interfaces, isInstance
 
Methods inherited from interface rcf.core.framework.component.ReflectedBindable
bind
 

Field Detail

application

protected final Application application
TODO: Javadoc


datacenter

protected final RADService datacenter
TODO: Javadoc


website

protected final RADService website
TODO: Javadoc


queue

protected rcf.core.util.collection.sorted.Sorted<TimerTask> queue
TODO: Javadoc

Constructor Detail

RADTools

public RADTools(RADService _management,
                RADService _dependency,
                RADService _composition,
                Application _application)
TODO: Javadoc

Parameters:
_management -
_dependency -
_composition -
_application -
Method Detail

check

public void check()
Description copied from class: AbstractRADService
TODO: Javadoc Check on the state of the actual service this object represents, and update the state of this object to match. This method should rarely be called directly.

Overrides:
check in class AbstractRADService

datacenter

public RADService datacenter()
TODO: Javadoc

Returns:

event

public boolean event(TaskEvent event)
Description copied from interface: EventSink
Called by an EventSyndicate to notify this sink that an event has occured.

Specified by:
event in interface EventSink<TaskEvent>
Parameters:
event - The event which has occured.
Returns:
true to keep receiving events from the source of this event. false to stop receiving events from the source of this event.

isConcrete

public boolean isConcrete()
Description copied from interface: RADService
Determine if this RADService is a concrete service, or simply an arbitrary abstraction built for management purposes.

Specified by:
isConcrete in interface RADService
Returns:
true if this object represents a concrete service. false if this object represents an arbitrary abstraction, and does not correspond to a real service.

radServiceState

public DynamicProperty<RADService.State> radServiceState()
Description copied from interface: RADService
Returns the dynamic property object for the state of this service. The dynamic property can then be used to query the actual state, or to set it. There are few restrictions on state, except that it must be RADService.State.Unknown when RADService.management().parent().get().radServiceState().get() != RADService.State.Running.

Note that the ImmutableSingletonInterface.get() and SingletonInterface#set() methods on the dynamic property refer to the offline state of this service. The RADService.refresh() and RADService.update(boolean, RADService.State) methods can be used to synchronize this state with the state of the actual service. SingletonInterface#set() will schedule a call to RADService.update(boolean, RADService.State) so that the service state will be updated in the future.

Specified by:
radServiceState in interface RADService
Returns:
The dynamic property which represents the offline state of this service.

run

public void run()
Specified by:
run in interface Runnable

schedule

public void schedule(TimerTask task)
TODO: Javadoc

Parameters:
task -

toString

public String toString()
Overrides:
toString in class Object

website

public RADService website()
TODO: Javadoc

Returns:

window

public void window()
Description copied from interface: RADService
Popup the automatically generated window containing controls for the various DynamicComponent.properties() and DynamicComponent.operations() supported by not only this interface, but by any other component interfaces implemented by any specific RADService object.

Two calls to this method, will display the same window, rather than generating a new one.

Specified by:
window in interface RADService
Overrides:
window in class AbstractRADService