AbstractNetworkChannelEndpoint (Apache Tomcat 11.0.8 API Documentation)
Description: declaration: package: org.apache.tomcat.util.net, class: AbstractNetworkChannelEndpoint

# Class AbstractNetworkChannelEndpoint<S extends Channel,U extends NetworkChannel>

java.lang.Object
org.apache.tomcat.util.net.AbstractEndpoint<S,U>
org.apache.tomcat.util.net.AbstractNetworkChannelEndpoint<S,U>

Direct Known Subclasses:
  `Nio2Endpoint`, `NioEndpoint`

public abstract class AbstractNetworkChannelEndpoint<S extends Channel,U extends NetworkChannel> extends AbstractEndpoint<S,U>

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class org.apache.tomcat.util.net.AbstractEndpoint

  `AbstractEndpoint.BindState, AbstractEndpoint.Handler<S>`

- ## Field Summary

  ### Fields inherited from class org.apache.tomcat.util.net.AbstractEndpoint

  `acceptor, acceptorThreadPriority, attributes, connections, internalExecutor, negotiableProtocols, paused, processorCache, running, sm, socketProperties, sslHostConfigs, threadPriority`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractNetworkChannelEndpoint()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected abstract S`
  `createChannel(SocketBufferHandler buffer)`
  `protected final InetSocketAddress`
  `getLocalAddress()`
  Obtain the network address the server socket is bound to.
  `protected abstract NetworkChannel`
  `getServerSocket()`

  ### Methods inherited from class org.apache.tomcat.util.net.AbstractEndpoint

  `addNegotiatedProtocol, addSslHostConfig, addSslHostConfig, awaitConnectionsClose, bind, closeServerSocketGraceful, closeSocket, countDownConnection, countUpOrAwaitConnection, createExecutor, createSocketProcessor, createSSLContext, createSSLEngine, destroy, destroySocket, destroySsl, doCloseServerSocket, findSslHostConfigs, generateCertificateDebug, getAcceptCount, getAcceptorThreadPriority, getAddress, getAttribute, getBindOnInit, getBindState, getConnectionCount, getConnectionLinger, getConnections, getConnectionTimeout, getCurrentThreadCount, getCurrentThreadsBusy, getDaemon, getDefaultSSLHostConfigName, getDomain, getExecutor, getExecutorTerminationTimeoutMillis, getHandler, getId, getKeepAliveTimeout, getLocalPort, getLog, getLogCertificate, getMaxConnections, getMaxKeepAliveRequests, getMaxQueueSize, getMaxThreads, getMinSpareThreads, getName, getPort, getPortOffset, getPortWithOffset, getProperty, getSniParseLimit, getSocketProperties, getSSLHostConfig, getSslImplementation, getSslImplementationName, getTcpNoDelay, getThreadPriority, getThreadsMaxIdleTime, getUseAsyncIO, getUseSendfile, getUseVirtualThreads, getUtilityExecutor, hasNegotiableProtocols, init, initialiseSsl, initializeConnectionLatch, isPaused, isRunning, isSSLEnabled, logCertificate, pause, processSocket, releaseSSLContext, reloadSslHostConfig, reloadSslHostConfigs, removeSslHostConfig, resume, serverSocketAccept, setAcceptCount, setAcceptorThreadPriority, setAddress, setAttribute, setBindOnInit, setConnectionLinger, setConnectionTimeout, setDaemon, setDefaultSSLHostConfigName, setDomain, setExecutor, setExecutorTerminationTimeoutMillis, setHandler, setKeepAliveTimeout, setMaxConnections, setMaxKeepAliveRequests, setMaxQueueSize, setMaxThreads, setMinSpareThreads, setName, setPort, setPortOffset, setProperty, setSniParseLimit, setSocketOptions, setSSLEnabled, setSslImplementationName, setTcpNoDelay, setThreadPriority, setThreadsMaxIdleTime, setUseAsyncIO, setUseSendfile, setUseVirtualThreads, setUtilityExecutor, shutdownExecutor, start, startAcceptorThread, startInternal, stop, stopInternal, toTimeout, unbind, unlockAccept`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AbstractNetworkChannelEndpoint

    public AbstractNetworkChannelEndpoint()

- ## Method Details

  - ### getServerSocket

    protected abstract NetworkChannel getServerSocket()

  - ### createChannel

    protected abstract S createChannel(SocketBufferHandler buffer)

  - ### getLocalAddress

    protected final InetSocketAddress getLocalAddress() throws IOException
    Description copied from class: `AbstractEndpoint`
    Obtain the network address the server socket is bound to. This primarily exists to enable the correct address to be used when unlocking the server socket since it removes the guess-work involved if no address is specifically set.
    Specified by:
      `getLocalAddress` in class `AbstractEndpoint<S extends Channel,U extends NetworkChannel>`
    Returns:
      The network address that the server socket is listening on or null if the server socket is not currently bound.
    Throws:
      `IOException` - If there is a problem determining the currently bound socket