ist.palcom.assemblies
Class ScriptedAssembly

java.lang.Object
  extended by ist.palcom.services.AbstractService
      extended by ist.palcom.assemblies.Assembly
          extended by ist.palcom.assemblies.ScriptedAssembly
All Implemented Interfaces:
Service, IHgraphNode

public class ScriptedAssembly
extends Assembly


Field Summary
 
Fields inherited from class ist.palcom.assemblies.Assembly
assemblyVer, commandThread, connectionEstablished, debugService
 
Fields inherited from class ist.palcom.services.AbstractService
_node, connectionsMonitor, context, info, siid
 
Fields inherited from interface ist.palcom.hgraph.IHgraphNode
CHILD_NAME_CLASH, CIRCULARITY_CLASH, COMMAND_OR_NODE_MISSING, ERROR, HANDLER_MISSING, INVOKATOR_MISSING, LISTENER_MISSING, NODE_NOT_CHILD, PATH_MISSING, SIBLING_ALREADY_EXISTS, SIBLING_NONEXISTENT, SIBLING_REFERENCE_ALREADY_EXISTS, SIBLING_REFERENCE_NONEXISTENT, STATUS_OK, VALUE_ALREADY_EXISTS, VALUE_NOT_PRESENT
 
Constructor Summary
ScriptedAssembly(AssemblyDeviceContext context, PRDAssemblyVer assemblyInfo, int period)
          This constructor also adds the assembly instance's sublist and services to the device context
 
Method Summary
protected  void commandReceived(CommandEvent event)
          Handle a CommandEvent received from a ServiceDescription.
protected  void connectionClosed(UnicastConnection connection)
          Notification that a connection has been closed.
protected  void connectionCreated(UnicastConnection connection)
          Notification that a new connection has been established.
 void start()
          Start the assembly.
 void stop()
          Stop the assembly.
protected  boolean validateScript()
          Check that bound services have the messages used in the script, and that parameter lists match.
 
Methods inherited from class ist.palcom.assemblies.Assembly
allConnectionsEstablished, doRequestConnection, doRequestConnection, doRequestConnections, doRequestDisconnection, doRequestDisconnection, doRequestDisconnections, getSelfTester, getServiceID, logClear, logMsg, replaceServiceDecl, setSelfTestResult, setThisReferencesToDeviceID
 
Methods inherited from class ist.palcom.services.AbstractService
addNodeChild, addServiceProxyListener, connectTo, disconnectFrom, getChildIterator, getConnections, getFuncFunc, getNodeName, getNodeParent, getPath, getRemoteServiceProxy, getSelector, getServiceInfo, getServiceInstanceID, getServiceProxy, getSiblingFunc, getValueFunc, hasChildNamed, isAncestorOf, remoteServiceProxyIterator, removeNodeChild, removeServiceProxyListener, sendToAll, setGroupID, setLocalSID, setName, setNodeName, setNodeParent, setServiceInstanceID, setServiceProxy, setStatus, setTopic, toXML, toXMLFull, toXMLFullRecursively, toXMLRecursively, updatePath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptedAssembly

public ScriptedAssembly(AssemblyDeviceContext context,
                        PRDAssemblyVer assemblyInfo,
                        int period)
                 throws java.io.IOException
This constructor also adds the assembly instance's sublist and services to the device context

Parameters:
context -
assemblyInfo -
period -
Throws:
java.io.IOException
Method Detail

start

public void start()
           throws java.io.IOException
Start the assembly.

Overrides:
start in class Assembly
Throws:
java.io.IOException

stop

public void stop()
          throws java.io.IOException
Stop the assembly.

Overrides:
stop in class Assembly
Throws:
java.io.IOException

validateScript

protected boolean validateScript()
Check that bound services have the messages used in the script, and that parameter lists match.

Returns:
false on errors

commandReceived

protected void commandReceived(CommandEvent event)
Handle a CommandEvent received from a ServiceDescription.

Overrides:
commandReceived in class Assembly

connectionCreated

protected void connectionCreated(UnicastConnection connection)
Description copied from class: AbstractService
Notification that a new connection has been established. Service-specific things may be performed by subclasses. The default implementation here is empty.

Overrides:
connectionCreated in class AbstractService

connectionClosed

protected void connectionClosed(UnicastConnection connection)
Description copied from class: AbstractService
Notification that a connection has been closed. Service-specific things may be performed by subclasses. The default implementation here is empty.

Overrides:
connectionClosed in class AbstractService