public class MuxClient extends Object
| Modifier and Type | Field and Description | 
|---|---|
static int | 
MAX_REQUESTS  | 
| Constructor and Description | 
|---|
MuxClient(OutputStream out,
         InputStream in,
         long handshakeTimeout)
Initiates the client side of the multiplexed connection over
 the given input/output stream pair. 
 | 
MuxClient(SocketChannel channel,
         long handshakeTimeout)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
handleDown()
Handles indication that this multiplexed connection has
 gone down, either through normal operation or failure. 
 | 
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. 
 | 
void | 
start()
Starts I/O processing. 
 | 
public static final int MAX_REQUESTS
public MuxClient(OutputStream out, InputStream in, long handshakeTimeout) throws IOException
out - the output stream of the underlying connectionin - the input stream of the underlying connectionhandshakeTimeout - IOExceptionpublic MuxClient(SocketChannel channel, long handshakeTimeout) throws IOException
IOExceptionpublic OutboundRequest newRequest() throws IOException
IOExceptionpublic 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)
public void start()
           throws IOException
IOExceptionprotected void handleDown()
Copyright © 2016–2018. All rights reserved.