private static class HttpServerEndpoint.LH extends Object implements ServerEndpoint.ListenHandle
Modifier and Type | Class and Description |
---|---|
private class |
HttpServerEndpoint.LH.Connection
HttpServerConnection subclass.
|
Modifier and Type | Field and Description |
---|---|
private int |
acceptFailureCount |
private long |
acceptFailureTime |
private boolean |
closed |
private Set |
conns |
private SecurityContext |
context |
private ServerEndpoint.ListenCookie |
cookie |
private Object |
lock |
private RequestDispatcher |
requestDispatcher |
private ServerSocket |
serverSocket |
Constructor and Description |
---|
HttpServerEndpoint.LH(RequestDispatcher requestDispatcher,
ServerSocket serverSocket,
SecurityContext context,
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()
Runs the accept loop in the access control context
preserved by LE.listen.
|
private void |
executeAcceptLoop0()
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 context
private final ServerEndpoint.ListenCookie cookie
private long acceptFailureTime
private int acceptFailureCount
private final Object lock
private boolean closed
private final Set conns
HttpServerEndpoint.LH(RequestDispatcher requestDispatcher, ServerSocket serverSocket, SecurityContext context, ServerEndpoint.ListenCookie cookie)
void startAccepting()
private void executeAcceptLoop()
private void executeAcceptLoop0()
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.