cast.core.CASTComponent Class Reference

Inheritance diagram for cast.core.CASTComponent:

cast.interfaces._CASTComponentOperations cast.core.SubarchitectureComponent cast.examples.SimpleAggregateServer cast.examples.SimpleServer cast.examples.WordServerClient cast.architecture.SubarchitectureWorkingMemory cast.architecture.WorkingMemoryAttachedComponent cast.architecture.WorkingMemoryWriterComponent cast.architecture.UnmanagedComponent cast.architecture.WorkingMemoryReaderComponent comedyarch.StraightMan cast.architecture.ManagedComponent cast.architecture.SubarchitectureTaskManager cast.examples.PriorityTest cast.tests.DirectAccessReader cast.tests.DirectAccessWriter comedyarch.AssistantDirector comedyarch.AudienceMember comedyarch.Director comedyarch.FunnyMan cast.architecture.AlwaysPositiveTaskManager

List of all members.

Public Member Functions

 CASTComponent ()
TimeServerPrx getTimeServer ()
ComponentManagerPrx getComponentManager ()
void debug (Object _o)
void debug (Object _o, Throwable _t)
String getProcessIdentifier ()
String getComponentID ()
String getID (Current __current)
void logException (Throwable _t)
void logException (Object _message, Throwable _t)
boolean isLocked ()
void lockComponent ()
void log (Object _o)
void log (Object _o, Throwable _t)
void println (Object _o)
void println (Object _o, Throwable _t)
void unlockComponent ()
final boolean isRunning ()
void beat (Current __current)
void configure (Map< String, String > _config, Current __current)
LogAdditions getLogAdditions ()
void run (Current __current)
void setComponentManager (ComponentManagerPrx _man, Current __current)
void setID (String _id, Current __current)
void start (Current __current)
void stop (Current __current)
void run ()
void setObjectAdapter (ObjectAdapter adapter)
ObjectAdapter getObjectAdapter ()
void setIceIdentity (Identity iceIdentity)
Identity getIceIdentity ()
void destroy (Current __current)
void destroyInternal (Current __current)
void setTimeServer (TimeServerPrx _ts, Current __current)
ComponentLogger getLogger ()
ComponentLogger getLogger (String _postfix)
String getLoggerName ()

Protected Member Functions

CASTTime getCASTTime ()
Communicator getCommunicator ()
void waitForUnlock ()
final String getStartColourEscape ()
void runComponent ()
void sleepComponent (long _millis)
void startInternal ()
void start ()
void configure (Map< String, String > _config)
void configureInternal (Map< String, String > __config)
void stopInternal ()
void stop ()
void destroy ()

Protected Attributes

Semaphore m_semaphore
boolean m_asleep
Object m_unlockNotification
ComponentLogger m_logger
boolean m_bDebugOutput
boolean m_bLogOutput

Package Functions

public< InterfaceType extends
Ice.Object > void 
registerIceServer (Class< InterfaceType > _interface, InterfaceType _servant)
public< InterfaceType extends
Ice.Object > void 
registerIceInterface (String name, String category, InterfaceType _servant)
public< Type extends
Ice.Object, TypePrx extends
Ice.ObjectPrx > TypePrx 
getIceServer (String _componentID, Class< Type > _cls, Class< TypePrx > _prxCls) throws CASTException


Detailed Description

A basic component in the CAST framework. This class provides some basic functionality useful for debugging

Author:
nah

Definition at line 56 of file CASTComponent.java.


Constructor & Destructor Documentation

cast.core.CASTComponent.CASTComponent (  ) 

Construct a new component with the given unique ID.

Parameters:
_id The id used to identify this component.

Definition at line 106 of file CASTComponent.java.


Member Function Documentation

void cast.core.CASTComponent.beat ( Current  __current  ) 

Definition at line 433 of file CASTComponent.java.

void cast.core.CASTComponent.configure ( Map< String, String >  _config,
Current  __current 
)

Definition at line 436 of file CASTComponent.java.

void cast.core.CASTComponent.configure ( Map< String, String >  _config  )  [protected]

Reimplemented in comedyarch.AudienceMember, and comedyarch.Director.

Definition at line 363 of file CASTComponent.java.

void cast.core.CASTComponent.configureInternal ( Map< String, String >  __config  )  [protected]

void cast.core.CASTComponent.debug ( Object  _o,
Throwable  _t 
)

Print some debugging output.

Parameters:
_o 

Definition at line 163 of file CASTComponent.java.

void cast.core.CASTComponent.debug ( Object  _o  ) 

Print some debugging output.

Parameters:
_o 

Definition at line 154 of file CASTComponent.java.

void cast.core.CASTComponent.destroy (  )  [protected]

Called after stop, just before component destruction.

Reimplemented in cast.examples.SimpleAggregateServer.

Definition at line 562 of file CASTComponent.java.

void cast.core.CASTComponent.destroy ( Current  __current  ) 

Definition at line 545 of file CASTComponent.java.

void cast.core.CASTComponent.destroyInternal ( Current  __current  ) 

Definition at line 550 of file CASTComponent.java.

CASTTime cast.core.CASTComponent.getCASTTime (  )  [protected]

Definition at line 122 of file CASTComponent.java.

Communicator cast.core.CASTComponent.getCommunicator (  )  [protected]

Returns the Ice.Communicator used by this component.

Returns:

Definition at line 144 of file CASTComponent.java.

String cast.core.CASTComponent.getComponentID (  ) 

Gets the unique ID of this component.

Returns:

Definition at line 182 of file CASTComponent.java.

ComponentManagerPrx cast.core.CASTComponent.getComponentManager (  ) 

Definition at line 134 of file CASTComponent.java.

Identity cast.core.CASTComponent.getIceIdentity (  ) 

Returns:
the iceIdentity

Definition at line 540 of file CASTComponent.java.

public<Type extends Ice.Object, TypePrx extends Ice.ObjectPrx> TypePrx cast.core.CASTComponent.getIceServer ( String  _componentID,
Class< Type >  _cls,
Class< TypePrx >  _prxCls 
) throws CASTException [package]

Resolve an ice server provided by the given component providing the supplied interface.

Parameters:
<Type> 
_componentID 
_cls 
Exceptions:
CASTException 

Definition at line 614 of file CASTComponent.java.

String cast.core.CASTComponent.getID ( Current  __current  ) 

Definition at line 186 of file CASTComponent.java.

LogAdditions cast.core.CASTComponent.getLogAdditions (  ) 

Get extra information to use for logging.

Returns:

Reimplemented in cast.core.SubarchitectureComponent.

Definition at line 459 of file CASTComponent.java.

ComponentLogger cast.core.CASTComponent.getLogger ( String  _postfix  ) 

Get a logger with a name that extends the component logger name.

Parameters:
_postfix String to be directly appended to base logger name.
Returns:

Definition at line 651 of file CASTComponent.java.

ComponentLogger cast.core.CASTComponent.getLogger (  ) 

Gets the logger currently used by the component. Used during configure() to retrieve logger for the component.

Returns:

Definition at line 633 of file CASTComponent.java.

String cast.core.CASTComponent.getLoggerName (  ) 

Override to alter logger name.

Parameters:
_name 
Returns:

Reimplemented in cast.core.SubarchitectureComponent.

Definition at line 661 of file CASTComponent.java.

ObjectAdapter cast.core.CASTComponent.getObjectAdapter (  ) 

Returns:
the adapter

Definition at line 524 of file CASTComponent.java.

String cast.core.CASTComponent.getProcessIdentifier (  ) 

Use getComponentID instead.

Returns:

Definition at line 173 of file CASTComponent.java.

final String cast.core.CASTComponent.getStartColourEscape (  )  [protected]

Definition at line 268 of file CASTComponent.java.

TimeServerPrx cast.core.CASTComponent.getTimeServer (  ) 

Definition at line 129 of file CASTComponent.java.

boolean cast.core.CASTComponent.isLocked (  ) 

Determines whether the component is currently locked.

Returns:

Definition at line 231 of file CASTComponent.java.

final boolean cast.core.CASTComponent.isRunning (  ) 

Definition at line 355 of file CASTComponent.java.

void cast.core.CASTComponent.lockComponent (  ) 

Acquire the semaphore for access to this component.

Definition at line 238 of file CASTComponent.java.

void cast.core.CASTComponent.log ( Object  _o,
Throwable  _t 
)

Print some logging output.

Parameters:
_o 

Definition at line 264 of file CASTComponent.java.

void cast.core.CASTComponent.log ( Object  _o  ) 

Print some logging output.

Parameters:
_o 

Definition at line 255 of file CASTComponent.java.

void cast.core.CASTComponent.logException ( Object  _message,
Throwable  _t 
)

Log an exception to the ERROR logger.

Parameters:
_message 
_t 

Definition at line 222 of file CASTComponent.java.

void cast.core.CASTComponent.logException ( Throwable  _t  ) 

Log an exception to the ERROR logger, using the message from the throwable.

Parameters:
_t 

Definition at line 212 of file CASTComponent.java.

void cast.core.CASTComponent.println ( Object  _o,
Throwable  _t 
)

Print out the input in a formatted way.

Parameters:
_s String to print.

Definition at line 302 of file CASTComponent.java.

void cast.core.CASTComponent.println ( Object  _o  ) 

Print out the input in a formatted way.

Parameters:
_s String to print.

Definition at line 292 of file CASTComponent.java.

public<InterfaceType extends Ice.Object> void cast.core.CASTComponent.registerIceInterface ( String  name,
String  category,
InterfaceType  _servant 
) [package]

Registers the provided servant as a Ice server that can offer the provided interface. Servants are automatically removed at shutdown.

Parameters:
<InterfaceType> 
name 
category 
_servant 

Definition at line 594 of file CASTComponent.java.

public<InterfaceType extends Ice.Object> void cast.core.CASTComponent.registerIceServer ( Class< InterfaceType >  _interface,
InterfaceType  _servant 
) [package]

Registers the provided servant as a Ice server that can offer the provided interface. Servants are automatically removed at shutdown.

Parameters:
<InterfaceType> 
_interface 
_servant 
Exceptions:
CASTException 

Definition at line 579 of file CASTComponent.java.

void cast.core.CASTComponent.run (  ) 

Called when the thread starts at runtime

Definition at line 501 of file CASTComponent.java.

void cast.core.CASTComponent.run ( Current  __current  ) 

Definition at line 467 of file CASTComponent.java.

void cast.core.CASTComponent.runComponent (  )  [protected]

Method called in separate thread to run processing component. This method is called for each component when it is started by the framework process server.

Reimplemented in cast.architecture.AlwaysPositiveTaskManager, cast.examples.PriorityTest, cast.examples.WordServerClient, cast.tests.DirectAccessWriter, and comedyarch.StraightMan.

Definition at line 319 of file CASTComponent.java.

void cast.core.CASTComponent.setComponentManager ( ComponentManagerPrx  _man,
Current  __current 
)

Definition at line 472 of file CASTComponent.java.

void cast.core.CASTComponent.setIceIdentity ( Identity  iceIdentity  ) 

Parameters:
iceIdentity the iceIdentity to set

Definition at line 533 of file CASTComponent.java.

void cast.core.CASTComponent.setID ( String  _id,
Current  __current 
)

Definition at line 477 of file CASTComponent.java.

void cast.core.CASTComponent.setObjectAdapter ( ObjectAdapter  adapter  ) 

Parameters:
adapter the adapter to set

Definition at line 517 of file CASTComponent.java.

void cast.core.CASTComponent.setTimeServer ( TimeServerPrx  _ts,
Current  __current 
)

Definition at line 566 of file CASTComponent.java.

void cast.core.CASTComponent.sleepComponent ( long  _millis  )  [protected]

Put the processes thread to sleep for a number of milliseconds.

Parameters:
_millis Number of milliseconds to sleep for.

Definition at line 328 of file CASTComponent.java.

void cast.core.CASTComponent.start ( Current  __current  ) 

Definition at line 482 of file CASTComponent.java.

void cast.core.CASTComponent.start (  )  [protected]

void cast.core.CASTComponent.startInternal (  )  [protected]

void cast.core.CASTComponent.stop ( Current  __current  ) 

Definition at line 487 of file CASTComponent.java.

void cast.core.CASTComponent.stop (  )  [protected]

Reimplemented in cast.architecture.AlwaysPositiveTaskManager.

Definition at line 430 of file CASTComponent.java.

void cast.core.CASTComponent.stopInternal (  )  [protected]

void cast.core.CASTComponent.unlockComponent (  ) 

Release the semaphore for access to this component.

Definition at line 341 of file CASTComponent.java.

void cast.core.CASTComponent.waitForUnlock (  )  [protected]

Wait until the unlockComponent is successfully called.

Definition at line 193 of file CASTComponent.java.


Member Data Documentation

boolean cast.core.CASTComponent.m_asleep [protected]

Definition at line 67 of file CASTComponent.java.

Definition at line 96 of file CASTComponent.java.

Definition at line 98 of file CASTComponent.java.

Definition at line 89 of file CASTComponent.java.

Semaphore cast.core.CASTComponent.m_semaphore [protected]

Definition at line 65 of file CASTComponent.java.

Definition at line 69 of file CASTComponent.java.


The documentation for this class was generated from the following file:

Generated on Mon Jun 13 15:55:46 2011 for CAST Java by  doxygen 1.5.8