You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Purpose

In order to be able to query event histories, a persistent store of events received over the event bus connecting clients, services and containers is maintained. This store is provided with a simple (Axis) web-service façade (no authentication required).

The position of this repository service can be seen in the events & messaging diagram; the implementation of the service subscribes to the bus and stores all events sent over it.

A special query object is used to retrieve sets of events. There are also ports on the service for removing matching events and for writing out matching events to a log file.

Mode of Usage

In most cases, the user will interact with this service through a specially designed Siege views (refer to the tutorial for specifics). Programmatic interactions also take place via the web service ports from the Workflow Broker when cleanup or archive routines are called. A brief description of the API follows.

API

EventRepository

removeNoReply is useful when cleaning up the database (returning all events will with a high probability generate an out-of-memory error in the client).

The return value of the logEvents method is the URL where the log file may be found.

public interface EventRepository
{
   public EventDescriptor[] select( EventQuery query );
   public EventDescriptor[] remove( EventQuery query );
   public void removeNoReply( EventQuery query );
   public String logEvents( EventQuery query );
   public long count( EventQuery query );
} 

EventDescriptor

A simple wrapper around the LocalEvent object. Class name identifies the type of local event (necessary for deserialization).

public class EventDescriptor
{
   public LocalEvent toLocalEvent() throws DeserializationException,
      UnknownExtensionException, InstantiationException,
      IllegalAccessException, ClassNotFoundException;
   public String getClassName();
   public void setClassName( String className );
   public String getXml();
   public void setXml( String xml );
   public Integer getId();
   public void setId( Integer id );
}

EventQuery

  • No labels