org.vrspace.server
Class PipedConnection

java.lang.Object
  extended byjava.util.Observable
      extended byorg.vrspace.util.Connection
          extended byorg.vrspace.server.PipedConnection
All Implemented Interfaces:
java.util.Observer, java.lang.Runnable

public class PipedConnection
extends Connection
implements java.util.Observer


Field Summary
protected  PipedSession session
           
 
Fields inherited from class org.vrspace.util.Connection
active, host, in, inQueue, login, maxTries, out, outQueue, password, port, reader, reconnect, socket, TERMINATOR, tries, writer
 
Constructor Summary
PipedConnection(PipedSession session, java.lang.String login, java.lang.String password)
           
 
Method Summary
 void close()
          Closes the connection
 java.lang.String getHostName()
          Returns the host name
 Session getSession()
           
 void login()
           
 void run()
          Interface java.lang.Runnable - reading from network
 void update(java.util.Observable o, java.lang.Object msg)
           
protected  void write(java.lang.String s)
          Writes this line to the session
 
Methods inherited from class org.vrspace.util.Connection
addObserver, getHostPort, getLogin, isActive, login, login, login, quit, read, reconnect, send, setLogin, setMaxTries
 
Methods inherited from class java.util.Observable
clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

session

protected PipedSession session
Constructor Detail

PipedConnection

public PipedConnection(PipedSession session,
                       java.lang.String login,
                       java.lang.String password)
                throws ConnectionException
Method Detail

update

public void update(java.util.Observable o,
                   java.lang.Object msg)
Specified by:
update in interface java.util.Observer

login

public void login()
           throws ConnectionException
Throws:
ConnectionException

close

public void close()
Description copied from class: Connection
Closes the connection

Overrides:
close in class Connection

getHostName

public java.lang.String getHostName()
Description copied from class: Connection
Returns the host name

Overrides:
getHostName in class Connection

write

protected void write(java.lang.String s)
Writes this line to the session

Overrides:
write in class Connection

getSession

public Session getSession()

run

public void run()
Description copied from class: Connection
Interface java.lang.Runnable - reading from network

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class Connection