net.sf.jradius.handler
Class EventHandlerChain

java.lang.Object
  extended by net.sf.jradius.handler.EventHandlerBase
      extended by net.sf.jradius.handler.EventHandlerChain
All Implemented Interfaces:
JRCommand, EventHandler, org.apache.commons.chain.Command
Direct Known Subclasses:
PacketHandlerChain

public class EventHandlerChain
extends EventHandlerBase

The EventHandlerChain is a simple EventHandler that delegates the request to a type specific command within a chain catalog, if one is found. In the case of accounting, if the 'accounting' chain is not found, accounting status specific chains are tried (e.g. acct-start, acct-interim, and acct-stop).

Author:
David Bird

Field Summary
 
Fields inherited from class net.sf.jradius.handler.EventHandlerBase
config
 
Constructor Summary
EventHandlerChain()
           
 
Method Summary
protected  boolean execute(JRCommand command, JRadiusEvent event)
           
protected  boolean execute(java.lang.String commandName, JRadiusEvent event)
           
 org.apache.commons.chain.Catalog getCatalog()
           
 java.lang.String getCatalogName()
           
 java.lang.String getOnFalse()
           
 java.lang.String getOnTrue()
           
 boolean handle(JRadiusEvent event)
           
 void setCatalogName(java.lang.String catalogName)
           
 void setConfig(ConfigurationItem cfg)
          Set the ConfigurationItem of this handler.
 void setOnFalse(java.lang.String onFalse)
           
 void setOnTrue(java.lang.String onTrue)
           
 
Methods inherited from class net.sf.jradius.handler.EventHandlerBase
doesHandle, execute, getName, setName, splitUserName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventHandlerChain

public EventHandlerChain()
Method Detail

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
Overrides:
setConfig in class EventHandlerBase
Parameters:
cfg - The HandlerConfigurationItem to be set

handle

public boolean handle(JRadiusEvent event)
               throws java.lang.Exception
Specified by:
handle in interface EventHandler
Specified by:
handle in class EventHandlerBase
Throws:
java.lang.Exception

execute

protected boolean execute(java.lang.String commandName,
                          JRadiusEvent event)
                   throws java.lang.Exception
Throws:
java.lang.Exception

execute

protected boolean execute(JRCommand command,
                          JRadiusEvent event)
                   throws java.lang.Exception
Throws:
java.lang.Exception

setOnFalse

public void setOnFalse(java.lang.String onFalse)

setOnTrue

public void setOnTrue(java.lang.String onTrue)

getOnFalse

public java.lang.String getOnFalse()

getOnTrue

public java.lang.String getOnTrue()

getCatalogName

public java.lang.String getCatalogName()

setCatalogName

public void setCatalogName(java.lang.String catalogName)

getCatalog

public org.apache.commons.chain.Catalog getCatalog()


Copyright © 2006 The JRadius Project, All Rights Reserved.