Class JessEventAdapter

  extended by jess.JessEventAdapter
All Implemented Interfaces:
java.util.EventListener, JessListener

public class JessEventAdapter
extends java.lang.Object
implements JessListener

A JessEventAdapter that lets you write JessEvent handlers in the Jess language. The adapter serves as "glue" between a source of JessEvents and a Userfunction that will be invoked when an event is received.

(C) 2013 Sandia Corporation

Constructor Summary
JessEventAdapter(java.lang.String uf, Rete engine)
          Create an adapter.
Method Summary
 void eventHappened(JessEvent e)
          Called when a JessEvent occurs.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public JessEventAdapter(java.lang.String uf,
                        Rete engine)
                 throws JessException
Create an adapter. Normally you'll call this from Jess code using reflection. The first argument is the name of a function to call when a JessEvent occurs; The second is the engine to attach to

uf - The name of a Jess function
engine - The engine to field events from
JessException - If anything goes wrong.
Method Detail


public final void eventHappened(JessEvent e)
Called when a JessEvent occurs. The function specified in the constructor is called, with the event object as the only argument. The function can examine the event using reflection.

Specified by:
eventHappened in interface JessListener
e - The event

2013 Sandia Corporation