net.jradius.handler
Class EventHandlerBase
java.lang.Object
net.jradius.handler.EventHandlerBase
- All Implemented Interfaces:
- JRCommand, EventHandler, org.apache.commons.chain.Command
- Direct Known Subclasses:
- EventHandlerChain, PacketHandlerBase
public abstract class EventHandlerBase
- extends java.lang.Object
- implements EventHandler
The base abstract class of all Event Handlers (the base of all handles)
- Author:
- David Bird, Gert Jan Verhoog
Fields inherited from interface org.apache.commons.chain.Command |
CONTINUE_PROCESSING, PROCESSING_COMPLETE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
config
protected HandlerConfigurationItem config
EventHandlerBase
public EventHandlerBase()
setConfig
public void setConfig(ConfigurationItem cfg)
- Description copied from interface:
JRCommand
- Set the ConfigurationItem of this handler. All JRadius handlers
have an associated HandlerConfigurationItem associated with it.
- Specified by:
setConfig
in interface JRCommand
- Parameters:
cfg
- The HandlerConfigurationItem to be set
doesHandle
public boolean doesHandle(JRadiusEvent event)
- Description copied from interface:
JRCommand
- Tests whether or not this handler handles the given JRadiusEvent.
- Specified by:
doesHandle
in interface JRCommand
- Parameters:
event
- The JRadiusEvent (or JRadiusRequest) to be checked
- Returns:
- Returns true if this handler should handle the given event
handle
public abstract boolean handle(JRadiusEvent event)
throws java.lang.Exception
- Specified by:
handle
in interface EventHandler
- Throws:
java.lang.Exception
execute
public boolean execute(org.apache.commons.chain.Context context)
throws java.lang.Exception
- Specified by:
execute
in interface org.apache.commons.chain.Command
- Throws:
java.lang.Exception
getName
public java.lang.String getName()
- Specified by:
getName
in interface JRCommand
- Returns:
- Returns the name of the handler (as defined in the configuration)
setName
public void setName(java.lang.String name)
- Specified by:
setName
in interface EventHandler
Copyright © 2008 JRadius Project, All Rights Reserved.