|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.jeri.internal.mux.Mux
com.sun.jini.jeri.internal.mux.MuxClient
net.jini.jeri.connection.ConnectionManager.OutboundMux
private final class ConnectionManager.OutboundMux
Subclass wrapper around MuxClient for outbound connections.
Field Summary | |
---|---|
private Connection |
c
The outbound connection. |
private long |
idleTime
The time this mux was found to be idle by the Reaper thread. |
private int |
pendingNewRequests
Number of pending newRequest calls. |
private boolean |
pendingStart
True if the mux needs to be started. |
private Object |
startLock
Lock to enforce single start of mux. |
Fields inherited from class com.sun.jini.jeri.internal.mux.Mux |
---|
MAX_REQUESTS |
Constructor Summary | |
---|---|
ConnectionManager.OutboundMux(Connection c)
Constructs an instance from the connection's streams. |
|
ConnectionManager.OutboundMux(Connection c,
boolean ignore)
Constructs an instance from the connection's channel. |
Method Summary | |
---|---|
(package private) boolean |
checkIdle(long now)
Returns true if the mux is dead, or the mux is idle and the recorded idle time is more than TIMEOUT milliseconds before now, and returns false otherwise. |
(package private) Connection |
getConnection()
Returns the outbound connection. |
protected void |
handleDown()
Close the connection, so that the provider is notified. |
OutboundRequest |
newRequest()
Initiates a new request on the mux and returns it, and sets the idle time to zero. |
(package private) void |
newRequestPending()
Registers a pending newRequest call. |
int |
requestsInProgress()
Returns the number of active and pending requests. |
(package private) boolean |
shouldRetry()
|
Methods inherited from class com.sun.jini.jeri.internal.mux.MuxClient |
---|
populateContext, shutdown |
Methods inherited from class com.sun.jini.jeri.internal.mux.Mux |
---|
setStartTimeout, start |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Connection c
private final Object startLock
private boolean pendingStart
private int pendingNewRequests
private long idleTime
Constructor Detail |
---|
ConnectionManager.OutboundMux(Connection c) throws IOException
IOException
ConnectionManager.OutboundMux(Connection c, boolean ignore) throws IOException
IOException
Method Detail |
---|
Connection getConnection()
void newRequestPending()
public OutboundRequest newRequest() throws IOException
newRequest
in class MuxClient
IOException
public int requestsInProgress() throws IOException
requestsInProgress
in class MuxClient
IOException
- if the multiplexed connection is no longer
activeboolean checkIdle(long now)
protected void handleDown()
handleDown
in class Mux
boolean shouldRetry()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |