org.iids.aos.messagecenter
Class MessageBuffer

java.lang.Object
  extended by org.iids.aos.messagecenter.MessageBuffer

public class MessageBuffer
extends java.lang.Object

this class implements a bandwidth limited message buffer, which sends the messages put into it, while keeping within allocated buffer.

Modification by reinier: do not use alarm queue anymore, but block until send is complete. Meaning that either the message has been delivered, or is is made sure that the message cannot be delivered.

Author:
mobach@cs.vu.nl, rjtimmer@cs.vu.nl

Constructor Summary
MessageBuffer(Communicator comm, AsLookupService _ls)
           
 
Method Summary
 void enableLimiting(AgentID agentId)
           
 void sendMessage(AgentID fromId, AgentID toId, Envelope envelope)
           
 void setBandwidthLimit(AgentID agentId, int bandwidth)
           
 void setMaxBufferSize(AgentID agentId, int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageBuffer

public MessageBuffer(Communicator comm,
                     AsLookupService _ls)
Method Detail

enableLimiting

public void enableLimiting(AgentID agentId)

setBandwidthLimit

public void setBandwidthLimit(AgentID agentId,
                              int bandwidth)

setMaxBufferSize

public void setMaxBufferSize(AgentID agentId,
                             int size)

sendMessage

public void sendMessage(AgentID fromId,
                        AgentID toId,
                        Envelope envelope)
                 throws AgentUnknownException,
                        MessageException
Throws:
AgentUnknownException
MessageException


Copyright © 2003, 2004 IIDS Group. All Rights Reserved.