final class Session extends Object
Modifier and Type | Class and Description |
---|---|
private class |
Session.MuxInputStream
Output stream returned by OutboundRequests and InboundRequests for
a session of a multiplexed connection.
|
private class |
Session.MuxOutputStream
Output stream returned by OutboundRequests and InboundRequests for
a session of a multiplexed connection.
|
Modifier and Type | Field and Description |
---|---|
private Collection |
ackListeners |
(package private) static int |
CLIENT |
private boolean |
fakeOKtoWrite |
private static int |
FINISHED |
private static int |
IDLE |
private InputStream |
in |
private int |
inBufPos |
private LinkedList |
inBufQueue |
private int |
inBufRemaining |
private boolean |
inClosed |
private boolean |
inEOF |
private int |
inRation |
private boolean |
inRationInfinite |
private int |
inState |
private static Logger |
logger
mux logger
|
private Mux |
mux |
private static int |
OPEN |
private OutputStream |
out |
private int |
outRation |
private boolean |
outRationInfinite |
private int |
outState |
private boolean |
partialDeliveryStatus |
private boolean |
receivedAcknowledgment |
private boolean |
receivedAckRequired |
private boolean |
removeLater |
private int |
role |
private boolean |
sentAcknowledgment |
private boolean |
sentAckRequired |
(package private) static int |
SERVER |
private boolean |
sessionDown |
private Throwable |
sessionDownCause |
private String |
sessionDownMessage |
private int |
sessionID |
private Object |
sessionLock
lock guarding all mutable instance state (below)
|
private static String[] |
stateNames |
private static Executor |
systemThreadPool
pool of threads for executing tasks in system thread group: used for
I/O (reader and writer) threads and other asynchronous tasks
|
private static int |
TERMINATED |
Constructor and Description |
---|
Session(Mux mux,
int sessionID,
int role) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
abort() |
(package private) InboundRequest |
getInboundRequest() |
(package private) OutboundRequest |
getOutboundRequest() |
(package private) void |
handleAbort(boolean partial) |
(package private) void |
handleAcknowledgment() |
(package private) void |
handleClose() |
(package private) void |
handleData(ByteBuffer data,
boolean eof,
boolean close,
boolean ackRequired) |
(package private) void |
handleIncrementRation(int increment) |
(package private) void |
handleOpen() |
private void |
notifyAcknowledgmentListeners(boolean received) |
(package private) void |
setDown(String message,
Throwable cause) |
private void |
setInState(int newState) |
private void |
setOutState(int newState) |
static final int CLIENT
static final int SERVER
private static final int IDLE
private static final int OPEN
private static final int FINISHED
private static final int TERMINATED
private static final String[] stateNames
private static final Executor systemThreadPool
private static final Logger logger
private final Mux mux
private final int sessionID
private final int role
private final OutputStream out
private final InputStream in
private final Object sessionLock
private boolean sessionDown
private String sessionDownMessage
private Throwable sessionDownCause
private int outState
private int outRation
private final boolean outRationInfinite
private boolean partialDeliveryStatus
private int inState
private int inRation
private final boolean inRationInfinite
private int inBufRemaining
private final LinkedList inBufQueue
private int inBufPos
private boolean inEOF
private boolean inClosed
private boolean fakeOKtoWrite
private boolean removeLater
private boolean receivedAckRequired
private boolean sentAcknowledgment
private Collection ackListeners
private boolean sentAckRequired
private boolean receivedAcknowledgment
Session(Mux mux, int sessionID, int role)
OutboundRequest getOutboundRequest()
InboundRequest getInboundRequest()
void abort()
void handleIncrementRation(int increment) throws ProtocolException
ProtocolException
void handleAbort(boolean partial) throws ProtocolException
ProtocolException
void handleClose() throws ProtocolException
ProtocolException
void handleAcknowledgment() throws ProtocolException
ProtocolException
void handleData(ByteBuffer data, boolean eof, boolean close, boolean ackRequired) throws ProtocolException
ProtocolException
void handleOpen() throws ProtocolException
ProtocolException
private void setOutState(int newState)
private void setInState(int newState)
private void notifyAcknowledgmentListeners(boolean received)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.