    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class org.w3c.www.mux.MuxSession

    java.lang.Object
       |
       +----org.w3c.www.mux.MuxSession

public class MuxSession
extends Object

##

aborted
  Has this session been aborted ?
finsent
  Has this session emitted a FIN (is it half-closed ?)
id
  This session's identifier.
in
  The session's input stream.
INPUT_BUFFER_SIZE
  The default input buffer size for all sessions.
out
  The session's output stream.
protid
  This session's protocol identifier.
stream
  The stream to which that session belongs.

##

MuxSession(MuxStream, int, int)

##

abort()
  Abort that session.
getIdentifier()
  Get this session identifier.
getInetAddress()
  Get the other end's IP address.
getInputBufferSize()
  Get this session's input stream buffer size.
getInputStream()
  Get this session's input stream.
getMuxStream()
  Get the Mux stream to which that session is attached.
getOutputStream()
  Get this session's output stream.
getProtocolIdentifier()
  Get this session protocol identifier.
notifyControl(int)
notifyCredit(int)
notifyFIN()
  We have received a FIN on that session's output stream.
notifyOutputClose()
notifyPUSH()
notifyRST()
  The other end is telling us that something is going wrong.
pushInput(byte[], int, int, boolean)
  Push some data into that session's input stream.
sendFIN()
  Send a FIN message on that session.
shutdown()
  Shutdown that session gracefully.

##

INPUT_BUFFER_SIZE

     public static final int INPUT_BUFFER_SIZE

  The default input buffer size for all sessions.

stream

     protected MuxStream stream

  The stream to which that session belongs.

in

     protected MuxInputStream in

  The session's input stream.

out

     protected MuxOutputStream out

  The session's output stream.

id

     protected int id

  This session's identifier.

protid

     protected int protid

  This session's protocol identifier.

aborted

     protected boolean aborted

  Has this session been aborted ?

finsent

     protected boolean finsent

  Has this session emitted a FIN (is it half-closed ?)

##

MuxSession

     protected MuxSession(MuxStream stream,
                          int id,
                          int protid)

##

pushInput

     protected final void pushInput(byte data[],
                                    int off,
                                    int len,
                                    boolean noflush) throws IOException

  Push some data into that session's input stream.

  Parameters:
    data - The buffer containing the data to be pushed.
    off - Offset of the data within above buffer.
    len - Length of data to be pushed.
    noflush - Set to true if there is already more data available for that session.
  Throws: IOException
    If IO was interrupted.

sendFIN

     protected final void sendFIN() throws IOException

  Send a FIN message on that session.

notifyFIN

     protected final void notifyFIN() throws IOException

  We have received a FIN on that session's output stream.

  Throws: IOException
    If some IO error occured.

notifyRST

     protected void notifyRST() throws IOException

  The other end is telling us that something is going wrong. Cleanup.

notifyPUSH

     protected void notifyPUSH()

notifyCredit

     protected final void notifyCredit(int credit)

notifyControl

     protected final void notifyControl(int fragsz)

notifyOutputClose

     protected void notifyOutputClose() throws IOException

abort

     protected synchronized void abort()

  Abort that session. The MUX stream erred, the underlying transport streams are broken. Terminate that session, make sure any further action on it will trigger an IO error.

shutdown

     public void shutdown() throws IOException

  Shutdown that session gracefully.

getMuxStream

     protected final MuxStream getMuxStream()

  Get the Mux stream to which that session is attached.

  Returns:
    A MuxStream instance.

getInputBufferSize

     protected int getInputBufferSize()

  Get this session's input stream buffer size.

  Returns:
    The standard buffer size for that session input stream.

getInetAddress

     public InetAddress getInetAddress()

  Get the other end's IP address.

  Returns:
    An InetAddress instance.

getIdentifier

     public final int getIdentifier()

  Get this session identifier.

  Returns:
    An integer identifier for that session.

getProtocolIdentifier

     public final int getProtocolIdentifier()

  Get this session protocol identifier.

  Returns:
    An integer identifying the protocol runnin on that session.

getInputStream

     public synchronized InputStream getInputStream() throws IOException

  Get this session's input stream.

  Returns:
    An InputStream instance.

getOutputStream

     public synchronized OutputStream getOutputStream() throws IOException

  Get this session's output stream.

  Returns:
    An OutputStream instance.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index