public abstract class EntityEventHandler extends java.lang.Object implements EventHandler
DEFAULT_TIMEOUT
Constructor and Description |
---|
EntityEventHandler() |
Modifier and Type | Method and Description |
---|---|
void |
entityArrival(EntityArrivalEvent event)
Called when a new entity is recognized and validated as defined
in the model.
|
void |
entityDeparture(EntityDepartureEvent event)
Called when the current entity is no longer recognized.
|
void |
moveCursor(EntityMoveCursorEvent event)
Called when the cursor needs to move to a specific location on the
terminal screen.
|
void |
writeAttributes(WriteAttributesEvent event)
Called when when a client or procedure requests to write one or more
attributes on the entity.
|
public void entityArrival(EntityArrivalEvent event) throws ApptrieveException
Any exception thrown from this event will cause the currently running operation, if any, to fail.
event
- the event instanceApptrieveException
public void entityDeparture(EntityDepartureEvent event) throws ApptrieveException
Any exception thrown from this event will cause the currently running operation, if any, to fail.
event
- the event instanceApptrieveException
public void moveCursor(EntityMoveCursorEvent event) throws ApptrieveException
If no method to move the cursor forward or backward is defined for a character mode model, this event will fire to position the cursor at each attribute and field before writing.
If the cursor is not positioned at the specified location upon returning from the event, VHI will fail the current client request.
Any exception thrown from this event will cause the current command to fail.
event
- the event instanceApptrieveException
public void writeAttributes(WriteAttributesEvent event) throws ApptrieveException
This event is not fired when an attribute or field is written with one of the following commands:
The intended usage of this event is to orchestrate the order of
attribute writes and the cursor movement between them. The actual
writing of each attribute to the terminal can be done, but its
recommended to use WriteAttributesEvent.writeAttribute(java.lang.String, java.lang.String)
to write each attribute. This method ensures that the appropriate
AttributeEventHandler.writeAttribute(com.wrq.vhi.script.api.WriteAttributeEvent)
event handler, if any,
is called.
Any exception thrown from this event will cause the write request to fail.
event
- the event instanceApptrieveException