edu.cmu.emulator.message
Class MessageCenter

java.lang.Object
  extended by edu.cmu.emulator.message.MessageCenter

public class MessageCenter
extends Object


Field Summary
protected static int BUF_LIMIT
           
protected  HashMap bufMap
           
protected  HashMap lockMap
           
protected static long NO_TIMEOUT
           
protected  HashMap waitListMap
           
 
Constructor Summary
MessageCenter()
           
 
Method Summary
protected  ArrayList getBuf(Object id)
           
protected  Object getLock(Object id)
           
protected  ArrayList getWaitList(Object id)
           
 void messageArrived(Object id, Object msg)
           
protected  void noWaiterMessage(Object id, Object msg)
           
 Object waitForMessage(Object id)
           
 Object waitForMessage(Object id, long timeoutMillis)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

waitListMap

protected HashMap waitListMap

bufMap

protected HashMap bufMap

lockMap

protected HashMap lockMap

BUF_LIMIT

protected static final int BUF_LIMIT
See Also:
Constant Field Values

NO_TIMEOUT

protected static final long NO_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

MessageCenter

public MessageCenter()
Method Detail

messageArrived

public void messageArrived(Object id,
                           Object msg)

noWaiterMessage

protected void noWaiterMessage(Object id,
                               Object msg)

getWaitList

protected ArrayList getWaitList(Object id)

getBuf

protected ArrayList getBuf(Object id)

getLock

protected Object getLock(Object id)

waitForMessage

public Object waitForMessage(Object id)

waitForMessage

public Object waitForMessage(Object id,
                             long timeoutMillis)


Copyright © 2013. All Rights Reserved.