public class MuxClient extends Mux
Modifier and Type | Field and Description |
---|---|
private static int |
clientInitialInboundRation
initial inbound ration as client, default is 32768
|
Abort, Abort_partial, Acknowledgment, busySessions, CLIENT, ClientConnectionHeader_negotiate, Close, Data, Data_ackRequired, Data_close, Data_eof, Data_open, Error, IncrementRation, IncrementRation_shift, initialInboundRation, initialOutboundRation, MAX_REQUESTS, MAX_SESSION_ID, maxFragmentSize, muxDown, muxDownCause, muxDownMessage, muxLock, NoOperation, Ping, PingAck, role, SERVER, serverConnectionReady, sessions, Shutdown
Constructor and Description |
---|
MuxClient(OutputStream out,
InputStream in)
Initiates the client side of the multiplexed connection over
the given input/output stream pair.
|
MuxClient(SocketChannel channel) |
Modifier and Type | Method and Description |
---|---|
OutboundRequest |
newRequest()
Starts a new request over this connection, returning the
corresponding OutboundRequest object.
|
protected void |
populateContext(Collection context)
Populates the context collection with information representing
this connection.
|
int |
requestsInProgress()
Returns the current number of requests in progress over this
connection.
|
void |
shutdown(String message)
Shuts down this multiplexed connection.
|
addSession, asyncSendAbort, asyncSendAcknowledgment, asyncSendClientConnectionHeader, asyncSendClose, asyncSendData, asyncSendError, asyncSendIncrementRation, asyncSendNoOperation, asyncSendPing, asyncSendPingAck, asyncSendServerConnectionHeader, asyncSendShutdown, directBuffersUseful, futureSendData, futureSendError, handleDown, handleOpen, processIncomingData, removeSession, setDown, setStartTimeout, start
private static final int clientInitialInboundRation
public MuxClient(OutputStream out, InputStream in) throws IOException
out
- the output stream of the underlying connectionin
- the input stream of the underlying connectionIOException
public MuxClient(SocketChannel channel) throws IOException
IOException
public OutboundRequest newRequest() throws IOException
IOException
public int requestsInProgress() throws IOException
IOException
- if the multiplexed connection is no longer
activepublic void shutdown(String message)
message
- reason for shutdown to be included in
IOExceptions thrown from future I/O operationsprotected void populateContext(Collection context)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.