edu.cmu.emulator.controlComm
Class CommReceiver

java.lang.Object
  extended by edu.cmu.emulator.controlComm.CommReceiver
All Implemented Interfaces:
Runnable

public class CommReceiver
extends Object
implements Runnable


Field Summary
private  ArrayList allTypeAllSourceListeners
           
private  HashMap listenerLists
           
private static int LOCAL_RECV_PORT
           
protected  Logger log
           
private  byte[] recvBuf
           
private  DatagramPacket recvPacket
           
private  DatagramSocket recvSocket
           
private  boolean running
           
 
Constructor Summary
CommReceiver()
           
CommReceiver(SchedClient schedClient)
           
 
Method Summary
 void addCMessageListener(CMessageListener listener, int type, int source)
           
private  void dispatch(CMessage msg)
           
private  void dispatch(CMessage msg, CMListenerFilter filter)
           
private  void dispatchToList(CMessage msg, ArrayList list)
           
 void run()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

running

private boolean running

listenerLists

private HashMap listenerLists

allTypeAllSourceListeners

private ArrayList allTypeAllSourceListeners

recvSocket

private DatagramSocket recvSocket

recvPacket

private DatagramPacket recvPacket

recvBuf

private byte[] recvBuf

log

protected Logger log

LOCAL_RECV_PORT

private static final int LOCAL_RECV_PORT
See Also:
Constant Field Values
Constructor Detail

CommReceiver

public CommReceiver()
             throws IOException
Throws:
IOException

CommReceiver

public CommReceiver(SchedClient schedClient)
             throws IOException
Throws:
IOException
Method Detail

addCMessageListener

public void addCMessageListener(CMessageListener listener,
                                int type,
                                int source)

stop

public void stop()

run

public void run()
Specified by:
run in interface Runnable

dispatch

private void dispatch(CMessage msg)

dispatch

private void dispatch(CMessage msg,
                      CMListenerFilter filter)

dispatchToList

private void dispatchToList(CMessage msg,
                            ArrayList list)


Copyright © 2013. All Rights Reserved.