nl.west.aaa
Class AccountingSender

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

public class AccountingSender
extends java.lang.Object

Class to send accounting data to an accounting server. Accounting data is buffered until a reply is received. Event-driven, polling and event-driven polling models are supported (see constructor).


Field Summary
static int EVENT_DRIVEN
          Used for event-driven delivery model (no batching).
static int EVENT_DRIVEN_BATCHING
          Used for event-driven batching delivery model.
static int EVENT_DRIVEN_POLLING
          Used for event-driven-polling.
static int POLLING
          Used for polling delivery model.
 
Constructor Summary
AccountingSender(int model, AAAUnit unit)
          Create a new AccountingSender and connect it to the given AAAUnit.
 
Method Summary
 void account(java.util.Hashtable attrs)
          Send accounting data to the registered server given a model for delivering accounting messages.
 void addReceiver(Identifier server)
          Adds the given Identifier to the list of possible accounting servers.
 long getIndicationTimeout()
           
 int getMaxBufferSize()
           
 long getMaxBufferTime()
           
 long getRequestTimeout()
           
 boolean getSendIndication()
           
 void removeReceiver(Identifier server)
          Removes the given accounting-server from the list of registered accounting-servers.
 void setIndicationTimeout(long timeout)
           
 void setMaxBufferSize(int size)
           
 void setMaxBufferTime(long time)
           
 void setRequestTimeout(long timeout)
           
 void setSendIndication(boolean send)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVENT_DRIVEN

public static final int EVENT_DRIVEN
Used for event-driven delivery model (no batching). When this value is passed to the constructor, an event-driven message delivery model is used. No batching will occur.

EVENT_DRIVEN_BATCHING

public static final int EVENT_DRIVEN_BATCHING
Used for event-driven batching delivery model. When this value is passed to the constructor, an event-driven message delivery model with batching is used.

POLLING

public static final int POLLING
Used for polling delivery model. When this value is passed to the contructor, a polling message delivery model is asumed.

EVENT_DRIVEN_POLLING

public static final int EVENT_DRIVEN_POLLING
Used for event-driven-polling. When this value is passed to the constructor, an event-driven polling message delivery model is used.
Constructor Detail

AccountingSender

public AccountingSender(int model,
                        AAAUnit unit)
Create a new AccountingSender and connect it to the given AAAUnit. The model can be one of EVENT_DRIVEN, EVENT_DRIVEN_BATCHING POLLING or EVENT_DRIVEN_POLLING.
See Also:
EVENT_DRIVEN, EVENT_DRIVEN_BATCHING, POLLING, EVENT_DRIVEN_POLLING
Method Detail

account

public void account(java.util.Hashtable attrs)
Send accounting data to the registered server given a model for delivering accounting messages.

addReceiver

public void addReceiver(Identifier server)
Adds the given Identifier to the list of possible accounting servers. All servers are tried in a ronud-robin fashion if the AAAUnit signals an error, of if the message was not replied to within a given time.

removeReceiver

public void removeReceiver(Identifier server)
Removes the given accounting-server from the list of registered accounting-servers. No more accounting-messages will be sent to the accounting-server.

setMaxBufferSize

public void setMaxBufferSize(int size)

setMaxBufferTime

public void setMaxBufferTime(long time)

setSendIndication

public void setSendIndication(boolean send)

setRequestTimeout

public void setRequestTimeout(long timeout)

setIndicationTimeout

public void setIndicationTimeout(long timeout)

getMaxBufferSize

public int getMaxBufferSize()

getMaxBufferTime

public long getMaxBufferTime()

getSendIndication

public boolean getSendIndication()

getRequestTimeout

public long getRequestTimeout()

getIndicationTimeout

public long getIndicationTimeout()



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