com.zion.jbuddy.bots
Class BotEventHandler

java.lang.Object
  extended by com.zion.jbuddy.bots.BotEventHandler

public class BotEventHandler
extends Object

An event handler.

Event handlers are similar to targets, except that they are triggered in response to various events, not user commands. Like targets, they may contain various calls.


Constructor Summary
BotEventHandler(BotEventType type)
          Creates an event handler.
 
Method Summary
 Object clone()
          Returns an exact copy of this event handler.
 BotCallSet getCalls()
          Returns the calls executed by this event handler.
 BotFilterSet getFilters()
          Returns this event handler's filters.
 String getID()
          Returns this event handler's identifier.
 BotRouteSet getRoutes()
          Returns this event handler's routes.
 BotEventType getType()
          Returns the type of event that triggers this event handler.
 boolean isConsume()
          Returns whether this event handler consumes events.
 void setConsume(boolean consume)
          Sets whether this event handler consumes events.
 void setID(String id)
          Sets this event handler's identifier, which can be used by other event handlers to reference this event handler (with the ref attribute).
 void setType(BotEventType type)
          Sets the type of event that triggers this event handler.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BotEventHandler

public BotEventHandler(BotEventType type)
Creates an event handler.

Parameters:
type - the type of event that triggers the event handler
Method Detail

getType

public BotEventType getType()
Returns the type of event that triggers this event handler.


setType

public void setType(BotEventType type)
Sets the type of event that triggers this event handler.


getID

public String getID()
Returns this event handler's identifier.


setID

public void setID(String id)
Sets this event handler's identifier, which can be used by other event handlers to reference this event handler (with the ref attribute).


isConsume

public boolean isConsume()
Returns whether this event handler consumes events.


setConsume

public void setConsume(boolean consume)
Sets whether this event handler consumes events.

If true, the engine will ignore further event handlers for an event after triggering this one.


getFilters

public BotFilterSet getFilters()
Returns this event handler's filters.

An event may only trigger this event handler if the filters allow it.


getRoutes

public BotRouteSet getRoutes()
Returns this event handler's routes.

This event handler's calls are processed for each specified route.


getCalls

public BotCallSet getCalls()
Returns the calls executed by this event handler.


clone

public Object clone()
Returns an exact copy of this event handler.

Overrides:
clone in class Object


JBuddy is a trademark of Zion Software, LLC in the US and other countries.
Copyright 2000-2008 Zion Software, LLC All Rights Reserved.