AprEndpoint.AprSocketWrapper (Apache Tomcat 8.5.20 API Documentation)

org.apache.tomcat.util.net

## Class AprEndpoint.AprSocketWrapper

- java.lang.Object
- - org.apache.tomcat.util.net.SocketWrapperBase<Long>
  - - org.apache.tomcat.util.net.AprEndpoint.AprSocketWrapper

- Enclosing class:
    AprEndpoint

      public static class AprEndpoint.AprSocketWrapper
      extends SocketWrapperBase<Long>

- - ### Nested Class Summary

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

      `SocketWrapperBase.CompletionCheck, SocketWrapperBase.CompletionHandlerCall, SocketWrapperBase.CompletionState`

  - ### Field Summary

    - ### Fields inherited from class org.apache.tomcat.util.net.SocketWrapperBase

      `bufferedWrites, bufferedWriteSize, COMPLETE_WRITE, localAddr, localName, localPort, READ_DATA, remoteAddr, remoteHost, remotePort, sm, socketBufferHandler`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AprEndpoint.AprSocketWrapper(Long socket, AprEndpoint endpoint)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `SendfileDataBase` | `createSendfileData(String filename, long pos, long length)`
    `void` | `doClientAuth(SSLSupport sslSupport)` Require the client to perform CLIENT-CERT authentication if it hasn't already done so.
    `protected void` | `doWrite(boolean block, ByteBuffer from)` Write the contents of the ByteBuffer to the socket.
    `SSLSupport` | `getSslSupport(String clientCertProvider)`
    `boolean` | `isClosed()`
    `boolean` | `isReadyForRead()`
    `protected void` | `populateLocalAddr()`
    `protected void` | `populateLocalName()`
    `protected void` | `populateLocalPort()`
    `protected void` | `populateRemoteAddr()`
    `protected void` | `populateRemoteHost()`
    `protected void` | `populateRemotePort()`
    `SendfileState` | `processSendfile(SendfileDataBase sendfileData)` Starts the sendfile process.
    `int` | `read(boolean block, byte[] b, int off, int len)`
    `int` | `read(boolean block, ByteBuffer to)`
    `void` | `registerReadInterest()`
    `void` | `registerWriteInterest()`
    `void` | `setAppReadBufHandler(ApplicationBufferHandler handler)`
    `protected void` | `writeByteBufferBlocking(ByteBuffer from)`
    `protected boolean` | `writeByteBufferNonBlocking(ByteBuffer from)`

    - ### Methods inherited from class org.apache.tomcat.util.net.SocketWrapperBase

      `addToBuffers, addToBuffers, awaitReadComplete, awaitWriteComplete, canWrite, checkError, decrementKeepAlive, doWrite, flush, flushBlocking, flushNonBlocking, getBlockingStatus, getBlockingStatusReadLock, getBlockingStatusWriteLock, getEndpoint, getError, getLocalAddr, getLocalName, getLocalPort, getNegotiatedProtocol, getReadTimeout, getRemoteAddr, getRemoteHost, getRemotePort, getSocket, getSocketBufferHandler, getWriteTimeout, hasAsyncIO, hasDataToWrite, isReadPending, isReadyForWrite, isSecure, isUpgraded, isWritePending, populateReadBuffer, populateReadBuffer, processSocket, read, read, setBlockingStatus, setError, setKeepAliveLeft, setNegotiatedProtocol, setReadTimeout, setSecure, setUpgraded, setWriteTimeout, toString, transfer, transfer, unRead, write, write, write, write, writeBlocking, writeBlocking, writeNonBlocking, writeNonBlocking`

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

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

- - ### Constructor Detail

    - #### AprEndpoint.AprSocketWrapper

          public AprEndpoint.AprSocketWrapper(Long socket,
                                      AprEndpoint endpoint)

  - ### Method Detail

    - #### read

          public int read(boolean block,
                 byte[] b,
                 int off,
                 int len)
                   throws IOException

      Specified by:
        `read` in class `SocketWrapperBase<Long>`
      Throws:
        `IOException`

    - #### read

          public int read(boolean block,
                 ByteBuffer to)
                   throws IOException

      Specified by:
        `read` in class `SocketWrapperBase<Long>`
      Throws:
        `IOException`

    - #### isReadyForRead

          public boolean isReadyForRead()
                                 throws IOException

      Specified by:
        `isReadyForRead` in class `SocketWrapperBase<Long>`
      Throws:
        `IOException`

    - #### close

          public void close()

      Specified by:
        `close` in class `SocketWrapperBase<Long>`

    - #### isClosed

          public boolean isClosed()

      Specified by:
        `isClosed` in class `SocketWrapperBase<Long>`

    - #### writeByteBufferBlocking

          protected void writeByteBufferBlocking(ByteBuffer from)
                                          throws IOException

      Overrides:
        `writeByteBufferBlocking` in class `SocketWrapperBase<Long>`
      Throws:
        `IOException`

    - #### writeByteBufferNonBlocking

          protected boolean writeByteBufferNonBlocking(ByteBuffer from)
                                                throws IOException

      Overrides:
        `writeByteBufferNonBlocking` in class `SocketWrapperBase<Long>`
      Throws:
        `IOException`

    - #### doWrite

          protected void doWrite(boolean block,
                     ByteBuffer from)
                          throws IOException

      Description copied from class: `SocketWrapperBase`
      Write the contents of the ByteBuffer to the socket. For blocking writes either then entire contents of the buffer will be written or an IOException will be thrown. Partial blocking writes will not occur.
      Specified by:
        `doWrite` in class `SocketWrapperBase<Long>`
      Parameters:
        `block` - Should the write be blocking or not?
        `from` - the ByteBuffer containing the data to be written
      Throws:
        `IOException` - If an I/O error such as a timeout occurs during the write

    - #### registerReadInterest

          public void registerReadInterest()

      Specified by:
        `registerReadInterest` in class `SocketWrapperBase<Long>`

    - #### registerWriteInterest

          public void registerWriteInterest()

      Specified by:
        `registerWriteInterest` in class `SocketWrapperBase<Long>`

    - #### createSendfileData

          public SendfileDataBase createSendfileData(String filename,
                                            long pos,
                                            long length)

      Specified by:
        `createSendfileData` in class `SocketWrapperBase<Long>`

    - #### processSendfile

          public SendfileState processSendfile(SendfileDataBase sendfileData)

      Description copied from class: `SocketWrapperBase`
      Starts the sendfile process. It is expected that if the sendfile process does not complete during this call and does not report an error, that the caller will not add the socket to the poller (or equivalent). That is the responsibility of this method.
      Specified by:
        `processSendfile` in class `SocketWrapperBase<Long>`
      Parameters:
        `sendfileData` - Data representing the file to send
      Returns:
        The state of the sendfile process after the first write.

    - #### populateRemoteAddr

          protected void populateRemoteAddr()

      Specified by:
        `populateRemoteAddr` in class `SocketWrapperBase<Long>`

    - #### populateRemoteHost

          protected void populateRemoteHost()

      Specified by:
        `populateRemoteHost` in class `SocketWrapperBase<Long>`

    - #### populateRemotePort

          protected void populateRemotePort()

      Specified by:
        `populateRemotePort` in class `SocketWrapperBase<Long>`

    - #### populateLocalName

          protected void populateLocalName()

      Specified by:
        `populateLocalName` in class `SocketWrapperBase<Long>`

    - #### populateLocalAddr

          protected void populateLocalAddr()

      Specified by:
        `populateLocalAddr` in class `SocketWrapperBase<Long>`

    - #### populateLocalPort

          protected void populateLocalPort()

      Specified by:
        `populateLocalPort` in class `SocketWrapperBase<Long>`

    - #### getSslSupport

          public SSLSupport getSslSupport(String clientCertProvider)

      Specified by:
        `getSslSupport` in class `SocketWrapperBase<Long>`

    - #### doClientAuth

          public void doClientAuth(SSLSupport sslSupport)

      Description copied from class: `SocketWrapperBase`
      Require the client to perform CLIENT-CERT authentication if it hasn't already done so.
      Specified by:
        `doClientAuth` in class `SocketWrapperBase<Long>`
      Parameters:
        `sslSupport` - The SSL/TLS support instance currently being used by the connection that may need updating after the client authentication

    - #### setAppReadBufHandler

          public void setAppReadBufHandler(ApplicationBufferHandler handler)

      Specified by:
        `setAppReadBufHandler` in class `SocketWrapperBase<Long>`

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.