| java.lang.Object org.w3c.www.mux.MuxWriter
MuxWriter | class MuxWriter implements MUX(Code) | | This class is dumb. It does no control flow, and nothing clever, just
emit appropriate MUX headers before sending some data.
The flow control is handled on a per session basis, by both the
MuxSession class, and the MuxOutputStream class.
See Also: MuxSession See Also: MuxOutputStream |
Field Summary | |
protected byte | buffer The output buffer. | protected int | buflen The current buffer size. | protected int | bufptr The current buffer pointer. | protected OutputStream | out The output stream to write data to. | protected MuxStream | stream The MUX Stream this writer is working for. |
Method Summary | |
protected void | ctrlDefineStack(int id, int stack) | protected void | ctrlDefineString(int stackid, String id) | protected void | ctrlMuxControl(int sessid, int fragsz) | protected void | ctrlSendCredit(int sessid, int credit) | protected synchronized void | flush() Flush current output buffer. | protected synchronized boolean | needsFlush() | protected synchronized void | shutdown() Shutdown the writer. | protected synchronized void | writeData(int sessid, byte b, int o, int l) Short cut to write data on a given session. | protected synchronized void | writeMessage(int sessid, int flags, int protocol, byte b, int o, int l) Write one message of output. | protected synchronized void | writeMessage(int sessid, int flags, int protocol) Write one message of output. |
buffer | protected byte buffer(Code) | | The output buffer.
|
buflen | protected int buflen(Code) | | The current buffer size.
|
bufptr | protected int bufptr(Code) | | The current buffer pointer.
|
stream | protected MuxStream stream(Code) | | The MUX Stream this writer is working for.
|
ctrlDefineStack | protected void ctrlDefineStack(int id, int stack) throws IOException(Code) | | |
ctrlMuxControl | protected void ctrlMuxControl(int sessid, int fragsz) throws IOException(Code) | | |
ctrlSendCredit | protected void ctrlSendCredit(int sessid, int credit) throws IOException(Code) | | |
flush | protected synchronized void flush() throws IOException(Code) | | Flush current output buffer.
|
needsFlush | protected synchronized boolean needsFlush()(Code) | | |
shutdown | protected synchronized void shutdown()(Code) | | Shutdown the writer.
|
writeData | protected synchronized void writeData(int sessid, byte b, int o, int l) throws IOException(Code) | | Short cut to write data on a given session.
Parameters: sessid - The session to write data to. Parameters: b - The buffer containing the data to be written. Parameters: o - Offset of data within above buffer. Parameters: l - Length of data to be written. |
writeMessage | protected synchronized void writeMessage(int sessid, int flags, int protocol, byte b, int o, int l) throws IOException(Code) | | Write one message of output.
Parameters: sessid - The session identifier. Parameters: flags - The flags of that message. Parameters: protid - The protocol identifier. Parameters: b - The buffer containing the data to write. Parameters: o - Offset of data within above buffer. Parameters: l - Length of data to be written. |
writeMessage | protected synchronized void writeMessage(int sessid, int flags, int protocol) throws IOException(Code) | | Write one message of output.
Parameters: sessid - The session identifier. Parameters: flags - The flags of that message. Parameters: protid - The protocol identifier. |
|
|