Extending the Event Handler Definition

The general guidelines for developing event handlers provide basic information on defining an event handler by defining a Java class that directly extends the Host Integrator-defined event handler base class. However, it is permissible to use more complex class hierarchies that extend the base class through multiple subclasses.

For example, if a user defines the following classes:

class A extends AttributeEventHandler
{
   public static final int readAttributeTimeout = 50;
   void readAttribute(ReadAttributeEvent e) throws ApptrieveException;
   public String myRandomExampleMethod();
}
class B extends class A
{
   void readAttribute(ReadAttributeEvent e) throws ApptrieveException;
   void writeAttribute(WriteAttributeEvent e) throws ApptrieveException;
}
class C extends class B
{
   public static final int readAttributeTimeout = 100;
}

All three of the above classes are valid attribute event handlers that can be mapped into a model.

 


 

 

  Attachmate