maslab.telemetry
Class JugHub.Connection

java.lang.Object
  extended by maslab.telemetry.JugHub.Connection
Direct Known Subclasses:
JugHub.LocalConnection, JugHub.TCPConnection
Enclosing class:
JugHub

public abstract class JugHub.Connection
extends java.lang.Object

Represents one TCP connection to a client, including reader and writer threads.


Constructor Summary
JugHub.Connection()
           
 
Method Summary
 void in(maslab.telemetry.JugPacket p)
          Called by a connection when a packet is received from a JugClient
 void init()
          should be called by sub classes after initialization is finished and connection is established.
abstract  void out(maslab.telemetry.JugPacket p)
          JugHub calls this method when it wishes to send a message
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JugHub.Connection

public JugHub.Connection()
Method Detail

init

public void init()
should be called by sub classes after initialization is finished and connection is established.


out

public abstract void out(maslab.telemetry.JugPacket p)
JugHub calls this method when it wishes to send a message


in

public final void in(maslab.telemetry.JugPacket p)
              throws java.io.IOException
Called by a connection when a packet is received from a JugClient

Throws:
java.io.IOException