raccoon.api.eai.endpoint
Interface IEventHandler

All Known Implementing Classes:
AdminHandler, BulkXmlHandler, TibrvMsgKeeper, TibrvMsgWriter

public interface IEventHandler

Interface to implement for a subscribing application.
The object that implements this interface must contain the business logic related to this event.

Since:
Raccoon v0.5
Version:
$Id: IEventHandler.java,v 1.1 2004/08/08 20:25:56 crouvrais Exp $
Author:
Cedric ROUVRAIS

Method Summary
 java.lang.String getHandlerName()
          Returns the unique logical name of this event handler.
 boolean isRunning()
          Should return true if this instance is active.
 void onEvent(java.lang.Object pEventObject, ITracking pEventTracking)
          Handles the incoming EAI Event.
 void start()
          Invoked by the subscribing application to inform the handler that it must load itself.
 void stop()
          Invoked by the subscribing application to inform the handle that it must shut down.
 

Method Detail

onEvent

void onEvent(java.lang.Object pEventObject,
             ITracking pEventTracking)
             throws RaccoonException
Handles the incoming EAI Event.

This method, to be implemented by all EventHandlers, will be invoked each time a message arrives on the subject/topic

Parameters:
pEventObject - the java object that was received by the subscriber
pEventTracking - the tracking element related to this event.
Throws:
RaccoonException - the only type of exception you have the right to throw.

getHandlerName

java.lang.String getHandlerName()
Returns the unique logical name of this event handler. This logical name is used to selectively start/stop event handlers, it must be unique per subscriber.

Returns:
the logical name of this event handler

start

void start()
           throws RaccoonException
Invoked by the subscribing application to inform the handler that it must load itself.

Throws:
RaccoonException - if the handler couldn't load itself.

stop

void stop()
          throws RaccoonException
Invoked by the subscribing application to inform the handle that it must shut down.

Throws:
RaccoonException - if the event handler can't shut down.

isRunning

boolean isRunning()
Should return true if this instance is active.

Returns:
boolean the state of this event handler.


Copyright null null. All Rights Reserved.