maslab.telemetry
Class JugHub

java.lang.Object
  extended by maslab.telemetry.JugHub

public class JugHub
extends java.lang.Object

Connects all clients together, distributing messages according to subscription and advertisement requests.


Nested Class Summary
 class JugHub.Connection
          Represents one TCP connection to a client, including reader and writer threads.
 class JugHub.LocalConnection
           
 class JugHub.TCPConnection
           
 
Field Summary
static int DEFAULTPORT
          The default port to listen for incoming TCP connections
static JugHub localJugHub
           
 
Constructor Summary
JugHub()
          Create a new hub, listening on the default port.
 
Method Summary
 void directReceive(maslab.telemetry.JugPacket p)
          Receives a packet of type COMMAND_MSG from a client in the same JVM.
static void main(java.lang.String[] args)
          Create a Hub on the default port and begin listening.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULTPORT

public static final int DEFAULTPORT
The default port to listen for incoming TCP connections

See Also:
Constant Field Values

localJugHub

public static JugHub localJugHub
Constructor Detail

JugHub

public JugHub()
Create a new hub, listening on the default port.

Method Detail

directReceive

public void directReceive(maslab.telemetry.JugPacket p)
Receives a packet of type COMMAND_MSG from a client in the same JVM.


main

public static void main(java.lang.String[] args)
Create a Hub on the default port and begin listening.