MCPcopy Create free account
hub / github.com/apache/tomcat / AbstractEndpoint

Class AbstractEndpoint

java/org/apache/tomcat/util/net/AbstractEndpoint.java:76–2529  ·  view source on GitHub ↗

Abstract endpoint implementation. @param The type used by the socket wrapper associated with this endpoint. Might be the same as U. @param The type of the underlying socket used by this endpoint. Might be the same as S.

Source from the content-addressed store, hash-verified

74 * @param <U> The type of the underlying socket used by this endpoint. Might be the same as S.
75 */
76public abstract class AbstractEndpoint<S, U> {
77
78 /**
79 * Construct and return an endpoint.
80 */
81 public AbstractEndpoint() {
82 }
83
84 // -------------------------------------------------------------- Constants
85
86 /**
87 * String manager for this package.
88 */
89 protected static final StringManager sm = StringManager.getManager(AbstractEndpoint.class);
90
91 /**
92 * Interface for handlers used by an endpoint.
93 *
94 * @param <S> The type of the socket wrapper
95 */
96 public interface Handler<S> {
97
98 /**
99 * Different types of socket states to react upon.
100 */
101 enum SocketState {
102 // TODO Add a new state to the AsyncStateMachine and remove
103 // ASYNC_END (if possible)
104 /**
105 * The socket is open and ready for processing.
106 */
107 OPEN,
108 /**
109 * The socket has been closed.
110 */
111 CLOSED,
112 /**
113 * The connection is long-running (e.g., keep-alive).
114 */
115 LONG,
116 /**
117 * The asynchronous processing phase has ended.
118 */
119 ASYNC_END,
120 /**
121 * Send file processing is in progress.
122 */
123 SENDFILE,
124 /**
125 * The connection is being upgraded (e.g., WebSocket upgrade).
126 */
127 UPGRADING,
128 /**
129 * The connection has been upgraded.
130 */
131 UPGRADED,
132 /**
133 * Asynchronous I/O is in progress.

Callers

nothing calls this directly

Calls 1

getManagerMethod · 0.95

Tested by

no test coverage detected