private static class TcpServerEndpoint.LH extends Object implements ServerEndpoint.ListenHandle
Modifier and Type | Class and Description |
---|---|
private class |
TcpServerEndpoint.LH.ServerConnectionImpl
ServerConnection implementation.
|
Modifier and Type | Field and Description |
---|---|
private int |
acceptFailureCount |
private long |
acceptFailureTime |
private boolean |
closed |
private Set |
connections |
private ServerEndpoint.ListenCookie |
cookie |
private Object |
lock |
private RequestDispatcher |
requestDispatcher |
private SecurityContext |
securityContext |
private ServerSocket |
serverSocket |
Constructor and Description |
---|
TcpServerEndpoint.LH(RequestDispatcher requestDispatcher,
ServerSocket serverSocket,
SecurityContext securityContext,
ServerEndpoint.ListenCookie cookie) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Stops this listen operation.
|
private boolean |
continueAfterAcceptFailure(Throwable t)
Throttles the accept loop after ServerSocket.accept throws
an exception, and decides whether to continue at all.
|
private void |
executeAcceptLoop()
Executes the accept loop.
|
ServerEndpoint.ListenCookie |
getCookie()
Returns a cookie to identify this listen operation.
|
(package private) void |
startAccepting()
Starts the accept loop.
|
String |
toString() |
private final RequestDispatcher requestDispatcher
private final ServerSocket serverSocket
private final SecurityContext securityContext
private final ServerEndpoint.ListenCookie cookie
private long acceptFailureTime
private int acceptFailureCount
private final Object lock
private boolean closed
private final Set connections
TcpServerEndpoint.LH(RequestDispatcher requestDispatcher, ServerSocket serverSocket, SecurityContext securityContext, ServerEndpoint.ListenCookie cookie)
void startAccepting()
private void executeAcceptLoop()
public void close()
close
in interface ServerEndpoint.ListenHandle
public ServerEndpoint.ListenCookie getCookie()
getCookie
in interface ServerEndpoint.ListenHandle
ListenCookie
to identify the listen
operationprivate boolean continueAfterAcceptFailure(Throwable t)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.