things.thing
Interface THINGInterface

All Superinterfaces:
BASEInterface
All Known Implementing Classes:
THING

public interface THINGInterface
extends BASEInterface

A thing interface.
This can allow non-THING objects access to a THING's services. It's a bad idea for a non-THING to do anything from a THING that is not in this interface.

Version:
1.0

Version History

 EPG - Initial - 26 FEB 07
 EPG - Add RUN_TIME - 10 MAR 08
 
Author:
Erich P. Gatejen

Method Summary
 RESULT CALL(java.lang.String thingName)
          Call a THING.
 void EXPRESS(RESULT theResult)
          Express a result.
 Universe GET_UNIVERSE(java.lang.String name)
          Get a universe by the local name.
 MODULE INSTANCE(java.lang.String moduleName)
          Instantiate a module.
 long RUN_TIME()
          Get how long the thing has been running in milliseconds.
 
Methods inherited from interface things.thing.BASEInterface
GET_LOGGER
 

Method Detail

INSTANCE

MODULE INSTANCE(java.lang.String moduleName)
                throws UserException,
                       java.lang.InterruptedException
Instantiate a module. It will seek and create the one as named and init it. You'll have to cast it to the specific class if you want to access subclass methods.

Parameters:
moduleName - the name of the module. This must match the class name for the MODULE or it will not be found and run.
Returns:
the MODULE
Throws:
UserException - or InterruptedException. It's important to let InterruptedException out.
java.lang.InterruptedException

CALL

RESULT CALL(java.lang.String thingName)
            throws UserException,
                   java.lang.InterruptedException
Call a THING. A new instance of it will be created.

Parameters:
thingName - the name of the thing. This must match the class name for the THING or it will not be found and run.
Returns:
the RESULT of the call.
Throws:
UserException - or InterruptedException. It's important to let InterruptedException out.
java.lang.InterruptedException

EXPRESS

void EXPRESS(RESULT theResult)
             throws UserException
Express a result. It is up to the environment as to where it will be expressed, be it to the local log or across the wire. It is up to the kernel to make this reliable and there will be no receipt for it. If you absolutely must be certain that your receipt made it somewhere, use a channel.

Throws:
UserException

GET_UNIVERSE

Universe GET_UNIVERSE(java.lang.String name)
                      throws UserException
Get a universe by the local name.

Parameters:
name - the local name (as registered)
Returns:
the universe
Throws:
UserException
See Also:
Universe

RUN_TIME

long RUN_TIME()
              throws UserException
Get how long the thing has been running in milliseconds. This is not how much processing time has accumulated, but from the moment it started running until it stopped, pauses and whatever included.

Returns:
milliseconds.
Throws:
UserException


Things.