nl.west.aaa
Class AccountingHandler

java.lang.Object
  |
  +--nl.west.aaa.AccountingHandler

public abstract class AccountingHandler
extends java.lang.Object
implements MessageHandler

A MessageHandler handling accounting messages. All messages of type Message.ACCOUNTING_REQUEST are replied to with a Message.ACCOUNTING_REPLY message. Subclasses must override the handleRequest() method to store the message in a database or to generate session records.


Constructor Summary
AccountingHandler(AAAUnit unit)
           
 
Method Summary
 void addForPolling(Identifier id, long interval)
           
 boolean handleMessage(Message msg, AAAUnit unit)
          Process the incoming message.
protected abstract  boolean handleRequest(Message msg, AAAUnit unit)
          Handle the incoming accounting request.
 void removeForPolling(Identifier id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccountingHandler

public AccountingHandler(AAAUnit unit)
Method Detail

handleMessage

public boolean handleMessage(Message msg,
                             AAAUnit unit)
Process the incoming message. Return true if message is an ACCOUNTING_REQUEST message, otherwise return false. A ACCOUNTING_REPLY message is sent back.
Specified by:
handleMessage in interface MessageHandler

handleRequest

protected abstract boolean handleRequest(Message msg,
                                         AAAUnit unit)
Handle the incoming accounting request. A accounting request should be replied to with an accounting reply.

addForPolling

public void addForPolling(Identifier id,
                          long interval)

removeForPolling

public void removeForPolling(Identifier id)



Arthur <arthur@ch.twi.tudelft.nl> http://ch.twi.tudelft.nl/~arthur/
2002-05-27