com.wrq.vhi.script.api
Class AttributeEventHandler

java.lang.Object
  extended by com.wrq.vhi.script.api.AttributeEventHandler
All Implemented Interfaces:
EventHandler

public abstract class AttributeEventHandler
extends java.lang.Object
implements EventHandler

Abstract base class for an attribute event listener. All classes that extend this class appear as attribute event handlers in the VHI design tool.


Field Summary
 
Fields inherited from interface com.wrq.vhi.script.api.EventHandler
DEFAULT_TIMEOUT
 
Constructor Summary
AttributeEventHandler()
           
 
Method Summary
 java.lang.String readAttribute(ReadAttributeEvent event)
          Called to read the attribute.
 void writeAttribute(WriteAttributeEvent event)
          Called to write the attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeEventHandler

public AttributeEventHandler()
Method Detail

readAttribute

public java.lang.String readAttribute(ReadAttributeEvent event)
                               throws ApptrieveException
Called to read the attribute. The value returned from this method will be considered the value of the attribute.

Any exception thrown from this event will cause the attribute read to fail.

Parameters:
event - the event instance
Returns:
the attribute value
Throws:
ApptrieveException

writeAttribute

public void writeAttribute(WriteAttributeEvent event)
                    throws ApptrieveException
Called to write the attribute. The write will be considered successful unless an exception is thrown.

Any exception thrown from this event will cause the attribute write to fail.

Parameters:
event - the event instance
Throws:
ApptrieveException