equip.city
Class CityProxy.TCPHandlerAna

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--equip.city.CityProxy.TCPHandlerAna
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
CityProxy.TCPHandlerDub
Enclosing class:
CityProxy

protected class CityProxy.TCPHandlerAna
extends java.lang.Thread

handler for TCP connection to VR content client (ana)

sends (optional) refresh ($R) message and EOM ($S) message

See Also:
City protocol, Ana

Field Summary
protected  equip.config.ConfigManager config
          config for this handler
protected  equip.runtime.Time connectTime
          time of initial connection as base for trace output
protected  java.lang.String device
          this user's device
protected  boolean dirty
          content dirty flag (so send $R)
protected  equip.data.EquipConnector ec
          this handler's connection to equip
protected  java.lang.String equipDS
          application (visit) dataspace
protected  equip.data.DataItemListener expnListener
          listener for Explanation events
protected  java.io.BufferedReader in
          stream for replies to client
protected  java.lang.String lastLocn
          temporary hack for same-name bboxes
protected  java.lang.String name
          name of this handler's user
protected  java.io.PrintWriter out
          stream for replies to client
protected  java.net.Socket socket
          socket for this handler
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
protected  java.lang.String elapsedTime()
          returns formatted string (000.000) of seconds since connection
protected  void handleDevice(java.lang.String s)
          handles device message from client
protected  void handleEquipDS(java.lang.String s)
          handles equip dataspace message from client (coerces to lower case)
protected  void handleUser(java.lang.String s)
          handles position message from client
 void run()
          sends (optional) refresh ($R) message and EOM ($S) messages while stream is OK
protected  void sendRefresh(java.io.PrintWriter out)
          sends refresh ($R;) message to client (for consistency and extension)
protected  void sendStop(java.io.PrintWriter out)
          sends stop ($S) message to client (for consistency and extension)
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

socket

protected java.net.Socket socket
socket for this handler

out

protected java.io.PrintWriter out
stream for replies to client

in

protected java.io.BufferedReader in
stream for replies to client

dirty

protected boolean dirty
content dirty flag (so send $R)

expnListener

protected equip.data.DataItemListener expnListener
listener for Explanation events

ec

protected equip.data.EquipConnector ec
this handler's connection to equip

lastLocn

protected java.lang.String lastLocn
temporary hack for same-name bboxes

connectTime

protected equip.runtime.Time connectTime
time of initial connection as base for trace output

name

protected java.lang.String name
name of this handler's user

device

protected java.lang.String device
this user's device

equipDS

protected java.lang.String equipDS
application (visit) dataspace

config

protected equip.config.ConfigManager config
config for this handler
Method Detail

elapsedTime

protected java.lang.String elapsedTime()
returns formatted string (000.000) of seconds since connection

run

public void run()
sends (optional) refresh ($R) message and EOM ($S) messages while stream is OK
Overrides:
run in class java.lang.Thread

handleUser

protected void handleUser(java.lang.String s)
handles position message from client
Parameters:
s - user and time stamp ($UXXX,HHMMSS; without marker)

handleDevice

protected void handleDevice(java.lang.String s)
handles device message from client
Parameters:
s - device ($DXXX...; without marker)

handleEquipDS

protected void handleEquipDS(java.lang.String s)
handles equip dataspace message from client (coerces to lower case)
Parameters:
s - device ($EXXX...; without marker)

sendRefresh

protected void sendRefresh(java.io.PrintWriter out)
sends refresh ($R;) message to client (for consistency and extension)
Parameters:
out - stream for refresh reply

sendStop

protected void sendStop(java.io.PrintWriter out)
sends stop ($S) message to client (for consistency and extension)
Parameters:
out - stream for stop reply