Modifier and Type | Class and Description |
---|---|
private class | TCPTransport.
Worker for accepting connections from a server socket. |
private class | TCPTransport.
Services messages on accepted connection |
Modifier and Type | Field and Description |
---|---|
private final Map | channelTable
table mapping endpoints to channels |
private static final AtomicInteger | connectionCount
total connections handled |
private static final int | connectionReadTimeout
number of milliseconds in accepted-connection timeout. |
private static final ExecutorService | connectionThreadPool
thread pool for connection handlers |
pack-priv static final RMISocketFactory | |
private final LinkedList | epList
endpoints for this transport |
private int | exportCount
number of objects exported on this transport |
private static final int | maxConnectionThreads
maximum number of connection handler threads |
private static final AccessControlContext | NOPERMS_ACC
References Deprecated
an AccessControlContext with no permissions
AccessControlContext is deprecated or references (maybe indirectly) at least one deprecated element.
|
private ServerSocket | server
server socket for this transport |
pack-priv static final Log | |
private static final ThreadLocal | threadConnectionHandler
client host for the current thread's connection |
private static final long | threadKeepAliveTime
keep alive time for idle connection handler threads |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
protected void | checkAcceptPermission(AccessControlContext acc)
Implements abstract sun.
References Deprecated
AccessControlContext is deprecated or references (maybe indirectly) at least one deprecated element.
Verify that the current access control context has permission to accept the connection being dispatched by the current thread. |
private static void | |
private static AccessControlContext | createNopermsAcc()
References Deprecated
AccessControlContext is deprecated or references (maybe indirectly) at least one deprecated element.
|
private void | decrementExportCount()
Decrements the count of exported objects, closing the current server socket if the count reaches zero. |
public void | exportObject(Target target)
Overrides sun. Export the object so that it can accept incoming calls. |
public void | free(Endpoint ep)
Implements abstract sun. Removes the Channel that generates connections to the endpoint ep. |
public TCPChannel | Returns: the channel or null if the transport cannot generate connections to this endpointthe endpoint to which connections will be generated. ep)Implements abstract sun. Returns a Channel that generates connections to the endpoint ep. |
public static String | |
private TCPEndpoint | |
pack-priv void | handleMessages(Connection conn, boolean persistent)
handleMessages decodes transport operations and handles messages appropriately. |
private void | |
public void | shedConnectionCaches()
Closes all cached connections in every channel subordinated to this transport. |
protected synchronized void | targetUnexported()
Overrides sun. Invoked when an object that was exported on this transport has become unexported, either by being garbage collected or by being explicitly unexported. |
channelTable | back to summary |
---|---|
private final Map<TCPEndpoint, Reference<TCPChannel>> channelTable table mapping endpoints to channels |
connectionCount | back to summary |
---|---|
private static final AtomicInteger connectionCount total connections handled |
connectionReadTimeout | back to summary |
---|---|
private static final int connectionReadTimeout number of milliseconds in accepted-connection timeout. Warning this should be greater than 15 seconds (the client-side timeout), and defaults to 2 hours. The maximum representable value is slightly more than 24 days and 20 hours.
|
connectionThreadPool | back to summary |
---|---|
private static final ExecutorService connectionThreadPool thread pool for connection handlers |
defaultSocketFactory | back to summary |
---|---|
pack-priv static final RMISocketFactory defaultSocketFactory |
epList | back to summary |
---|---|
private final LinkedList<TCPEndpoint> epList endpoints for this transport |
exportCount | back to summary |
---|---|
private int exportCount number of objects exported on this transport |
maxConnectionThreads | back to summary |
---|---|
private static final int maxConnectionThreads maximum number of connection handler threads
|
NOPERMS_ACC | back to summary |
---|---|
private static final AccessControlContext NOPERMS_ACC
References Deprecated
See corresponding docs for further information. an AccessControlContext with no permissions
|
server | back to summary |
---|---|
private ServerSocket server server socket for this transport |
tcpLog | back to summary |
---|---|
pack-priv static final Log tcpLog
|
threadConnectionHandler | back to summary |
---|---|
private static final ThreadLocal<TCPTransport. client host for the current thread's connection |
threadKeepAliveTime | back to summary |
---|---|
private static final long threadKeepAliveTime keep alive time for idle connection handler threads
|
TCPTransport | back to summary |
---|---|
pack-priv TCPTransport(LinkedList<TCPEndpoint> epList) Constructs a TCPTransport. |
checkAcceptPermission | back to summary |
---|---|
protected void checkAcceptPermission(AccessControlContext acc) Implements abstract sun. References Deprecated
See corresponding docs for further information. Verify that the current access control context has permission to accept the connection being dispatched by the current thread. |
closeSocket | back to summary |
---|---|
private static void closeSocket(Socket sock) close socket and eat exception |
createNopermsAcc | back to summary |
---|---|
private static AccessControlContext createNopermsAcc()
References Deprecated
See corresponding docs for further information.
|
decrementExportCount | back to summary |
---|---|
private void decrementExportCount() Decrements the count of exported objects, closing the current server socket if the count reaches zero. |
exportObject | back to summary |
---|---|
public void exportObject(Target target) throws RemoteException Overrides sun. Export the object so that it can accept incoming calls. |
free | back to summary |
---|---|
public void free(Endpoint ep) Implements abstract sun. Removes the Channel that generates connections to the endpoint ep. |
getChannel | back to summary |
---|---|
public TCPChannel getChannel(Endpoint ep) Implements abstract sun. Returns a Channel that generates connections to the endpoint ep. A Channel is an object that creates and manages connections of a particular type to some particular address space.
|
getClientHost | back to summary |
---|---|
public static String getClientHost() throws ServerNotActiveException Returns the client host for the current thread's connection. Throws ServerNotActiveException if no connection is active for this thread. |
getEndpoint | back to summary |
---|---|
private TCPEndpoint getEndpoint() |
handleMessages | back to summary |
---|---|
pack-priv void handleMessages(Connection conn, boolean persistent) handleMessages decodes transport operations and handles messages appropriately. If an exception occurs during message handling, the socket is closed. |
listen | back to summary |
---|---|
private void listen() throws RemoteException Listen on transport's endpoint. |
shedConnectionCaches | back to summary |
---|---|
public void shedConnectionCaches() Closes all cached connections in every channel subordinated to this transport. Currently, this only closes outgoing connections. |
targetUnexported | back to summary |
---|---|
protected synchronized void targetUnexported() Overrides sun. Doc from sun. Invoked when an object that was exported on this transport has become unexported, either by being garbage collected or by being explicitly unexported. |
Modifier and Type | Field and Description |
---|---|
private long | |
private int | |
private final ServerSocket |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
private boolean | continueAfterAcceptFailure(Throwable t)
Returns true if the accept loop should continue after the specified exception has been caught, or false if the accept loop should terminate (closing the server socket). |
private void | executeAcceptLoop()
Accepts connections from the server socket and executes handlers for them in the thread pool. |
public void | |
private void | throttleLoopOnException()
Throttles the accept loop after an exception has been caught: if a burst of 10 exceptions in 5 seconds occurs, then wait for 10 seconds to curb busy CPU usage. |
lastExceptionTime | back to summary |
---|---|
private long lastExceptionTime |
recentExceptionCount | back to summary |
---|---|
private int recentExceptionCount |
serverSocket | back to summary |
---|---|
private final ServerSocket serverSocket |
AcceptLoop | back to summary |
---|---|
pack-priv AcceptLoop(ServerSocket serverSocket) |
continueAfterAcceptFailure | back to summary |
---|---|
private boolean continueAfterAcceptFailure(Throwable t) Returns true if the accept loop should continue after the specified exception has been caught, or false if the accept loop should terminate (closing the server socket). If there is an RMIFailureHandler, this method returns the result of passing the specified exception to it; otherwise, this method always returns true, after sleeping to throttle the accept loop if necessary. |
executeAcceptLoop | back to summary |
---|---|
private void executeAcceptLoop() Accepts connections from the server socket and executes handlers for them in the thread pool. |
run | back to summary |
---|---|
public void run() Implements java. Doc from java. Runs this operation. |
throttleLoopOnException | back to summary |
---|---|
private void throttleLoopOnException() Throttles the accept loop after an exception has been caught: if a burst of 10 exceptions in 5 seconds occurs, then wait for 10 seconds to curb busy CPU usage. |
Modifier and Type | Field and Description |
---|---|
private Map | authCache
cache of accept-authorized AccessControlContexts |
private SecurityManager | cacheSecurityManager
References Deprecated
security manager which authorized contexts in authCache
SecurityManager is deprecated or references (maybe indirectly) at least one deprecated element.
|
private AccessControlContext | okContext
References Deprecated
most recently accept-authorized AccessControlContext
AccessControlContext is deprecated or references (maybe indirectly) at least one deprecated element.
|
private static final int | POST
int value of "POST" in ASCII (Java's specified data formats make this once-reviled tactic again socially acceptable) |
private String | |
private Socket |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
pack-priv void | checkAcceptPermission(SecurityManager sm, AccessControlContext acc)
References Deprecated
SecurityManager and AccessControlContext are deprecated or reference (maybe indirectly) at least one deprecated element.
Verify that the given AccessControlContext has permission to accept this connection. |
pack-priv String | |
public void | |
private void |
authCache | back to summary |
---|---|
private Map<AccessControlContext, Reference<AccessControlContext>> authCache cache of accept-authorized AccessControlContexts
|
cacheSecurityManager | back to summary |
---|---|
private SecurityManager cacheSecurityManager
References Deprecated
See corresponding docs for further information. security manager which authorized contexts in authCache
|
okContext | back to summary |
---|---|
private AccessControlContext okContext
References Deprecated
See corresponding docs for further information. most recently accept-authorized AccessControlContext
|
POST | back to summary |
---|---|
private static final int POST int value of "POST" in ASCII (Java's specified data formats make this once-reviled tactic again socially acceptable) |
remoteHost | back to summary |
---|---|
private String remoteHost |
socket | back to summary |
---|---|
private Socket socket |
ConnectionHandler | back to summary |
---|---|
pack-priv ConnectionHandler(Socket socket, String remoteHost) |
checkAcceptPermission | back to summary |
---|---|
pack-priv void checkAcceptPermission(SecurityManager sm, AccessControlContext acc)
References Deprecated
See corresponding docs for further information. Verify that the given AccessControlContext has permission to accept this connection.
|
getClientHost | back to summary |
---|---|
pack-priv String getClientHost() |
run | back to summary |
---|---|
public void run() Implements java. Doc from java. Runs this operation.
|
run0 | back to summary |
---|---|
private void run0()
|