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.

Java

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.

.NET

public class A : AttributeEventHandler
{
    [Timeout(50)]
	public override string ReadAttribute(IReadAttributeEvent vsEvent)
	{
	    return vsEvent.DefaultReadAttribute();
	}
	public String MyRandomExampleMethod()
	{
	}
}
class B : A
{
    public override string ReadAttribute(IReadAttributeEvent vsEvent)
	{
	}
	
	public override void WriteAttribute(IWriteAttributeEvent vsEvent)
	{
	}
}
class C : B
{
    [Timeout(100)]
	public override string ReadAttribute(IReadAttributeEvent vsEvent)
	{
	}
}

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


Bullet About event handlers
Bullet Event handler guidelines