All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.mux.MuxSession

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

public class MuxSession
extends Object

Variable Index

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

Constructor Index

 o MuxSession(MuxStream, int, int)

Method Index

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

Variables

 o INPUT_BUFFER_SIZE
 public static final int INPUT_BUFFER_SIZE
The default input buffer size for all sessions.

 o stream
 protected MuxStream stream
The stream to which that session belongs.

 o in
 protected MuxInputStream in
The session's input stream.

 o out
 protected MuxOutputStream out
The session's output stream.

 o id
 protected int id
This session's identifier.

 o protid
 protected int protid
This session's protocol identifier.

 o aborted
 protected boolean aborted
Has this session been aborted ?

 o finsent
 protected boolean finsent
Has this session emitted a FIN (is it half-closed ?)

Constructors

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

Methods

 o 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.
 o sendFIN
 protected final void sendFIN() throws IOException
Send a FIN message on that session.

 o 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.
 o notifyRST
 protected void notifyRST() throws IOException
The other end is telling us that something is going wrong. Cleanup.

 o notifyPUSH
 protected void notifyPUSH()
 o notifyCredit
 protected final void notifyCredit(int credit)
 o notifyControl
 protected final void notifyControl(int fragsz)
 o notifyOutputClose
 protected void notifyOutputClose() throws IOException
 o 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.

 o shutdown
 public void shutdown() throws IOException
Shutdown that session gracefully.

 o getMuxStream
 protected final MuxStream getMuxStream()
Get the Mux stream to which that session is attached.

Returns:
A MuxStream instance.
 o getInputBufferSize
 protected int getInputBufferSize()
Get this session's input stream buffer size.

Returns:
The standard buffer size for that session input stream.
 o getInetAddress
 public InetAddress getInetAddress()
Get the other end's IP address.

Returns:
An InetAddress instance.
 o getIdentifier
 public final int getIdentifier()
Get this session identifier.

Returns:
An integer identifier for that session.
 o getProtocolIdentifier
 public final int getProtocolIdentifier()
Get this session protocol identifier.

Returns:
An integer identifying the protocol runnin on that session.
 o getInputStream
 public synchronized InputStream getInputStream() throws IOException
Get this session's input stream.

Returns:
An InputStream instance.
 o 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