Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.vrspace.server
Class PipedSession  view PipedSession download PipedSession.java

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

public class PipedSession
extends Session
implements java.util.Observer


Nested Class Summary
 
Nested classes inherited from class org.vrspace.server.Session
Session.Status
 
Field Summary
(package private)  PipedConnection connection
           
(package private)  org.vrspace.util.Queue requests
           
 
Fields inherited from class org.vrspace.server.Session
active, cacheRequests, client, daemon, dispatcher, lastTime, lf, receivedChars, receivedRequests, RESPONSE_ERR, RESPONSE_NONE, RESPONSE_OK, sentChars, sentRequests, server, socket, startTime, stopTime, TERMINATOR, writer
 
Fields inherited from class java.util.Observable
 
Constructor Summary
PipedSession(PipedConnection connection, Server server, Dispatcher dispatcher)
           
PipedSession(Server server, java.lang.String login, java.lang.String password)
           
 
Method Summary
 org.vrspace.util.Connection getConnection()
           
 java.lang.String getId()
          Returns the session id in format remoteHost:remotePort
protected  java.lang.String read()
          Returns one line read from the network.
 void update(java.util.Observable o, java.lang.Object msg)
          This method is called whenever the observable object changes, and has called notifyObservers.
protected  void write(java.lang.String type, org.vrspace.util.Message r)
          Sends s to the client, appending TERMINATOR as necessary.
 
Methods inherited from class org.vrspace.server.Session
close, flushRequests, getStatus, isActive, readln, run, sendError, sendRequest, sendResponse
 
Methods inherited from class java.util.Observable
addObserver, 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

connection

PipedConnection connection

requests

org.vrspace.util.Queue requests
Constructor Detail

PipedSession

public PipedSession(Server server,
                    java.lang.String login,
                    java.lang.String password)
             throws java.lang.Exception

PipedSession

public PipedSession(PipedConnection connection,
                    Server server,
                    Dispatcher dispatcher)
Method Detail

getId

public java.lang.String getId()
Description copied from class: Session
Returns the session id in format remoteHost:remotePort

Overrides:
getId in class Session

update

public void update(java.util.Observable o,
                   java.lang.Object msg)
Description copied from interface: java.util.Observer
This method is called whenever the observable object changes, and has called notifyObservers. The Observable object can pass arbitrary information in the second parameter.

Specified by:
update in interface java.util.Observer

write

protected void write(java.lang.String type,
                     org.vrspace.util.Message r)
Sends s to the client, appending TERMINATOR as necessary.

Overrides:
write in class Session

read

protected java.lang.String read()
Returns one line read from the network.

Overrides:
read in class Session

getConnection

public org.vrspace.util.Connection getConnection()