SocketWrapper (Apache Tomcat 7.0.104 API Documentation)

org.apache.tomcat.util.net

## Class SocketWrapper<E>

- java.lang.Object
- - org.apache.tomcat.util.net.SocketWrapper<E>

- Direct Known Subclasses:
    NioEndpoint.KeyAttachment

      public class SocketWrapper<E>
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `async`
    `protected boolean` | `error`
    `protected int` | `keepAliveLeft`
    `protected boolean` | `keptAlive`
    `protected long` | `lastAccess`
    `protected long` | `lastRegistered`
    `protected E` | `socket`
    `protected long` | `timeout`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SocketWrapper(E socket)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `access()`
    `void` | `access(long access)`
    `int` | `decrementKeepAlive()`
    `boolean` | `getBlockingStatus()`
    `Lock` | `getBlockingStatusReadLock()`
    `ReentrantReadWriteLock.WriteLock` | `getBlockingStatusWriteLock()`
    `boolean` | `getError()`
    `long` | `getLastAccess()`
    `E` | `getSocket()`
    `long` | `getTimeout()`
    `Object` | `getWriteThreadLock()`
    `boolean` | `isAsync()`
    `boolean` | `isComet()`
    `boolean` | `isKeptAlive()`
    `boolean` | `isSecure()`
    `boolean` | `isUpgraded()`
    `void` | `reset(E socket, long timeout)`
    `void` | `setAsync(boolean async)`
    `void` | `setBlockingStatus(boolean blockingStatus)`
    `void` | `setComet(boolean comet)`
    `void` | `setError(boolean error)`
    `void` | `setKeepAliveLeft(int keepAliveLeft)`
    `void` | `setKeptAlive(boolean keptAlive)`
    `void` | `setSecure(boolean secure)`
    `void` | `setTimeout(long timeout)`
    `void` | `setUpgraded(boolean upgraded)`
    `String` | `toString()` Overridden for debug purposes.

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

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

- - ### Field Detail

    - #### socket

          protected volatile E socket

    - #### lastAccess

          protected volatile long lastAccess

    - #### timeout

          protected volatile long timeout

    - #### error

          protected boolean error

    - #### lastRegistered

          protected long lastRegistered

    - #### keepAliveLeft

          protected volatile int keepAliveLeft

    - #### async

          protected boolean async

    - #### keptAlive

          protected boolean keptAlive

  - ### Constructor Detail

    - #### SocketWrapper

          public SocketWrapper(E socket)

  - ### Method Detail

    - #### getSocket

          public E getSocket()

    - #### isComet

          public boolean isComet()

    - #### setComet

          public void setComet(boolean comet)

    - #### isAsync

          public boolean isAsync()

    - #### setAsync

          public void setAsync(boolean async)

    - #### isUpgraded

          public boolean isUpgraded()

    - #### setUpgraded

          public void setUpgraded(boolean upgraded)

    - #### isSecure

          public boolean isSecure()

    - #### setSecure

          public void setSecure(boolean secure)

    - #### getLastAccess

          public long getLastAccess()

    - #### access

          public void access()

    - #### access

          public void access(long access)

    - #### setTimeout

          public void setTimeout(long timeout)

    - #### getTimeout

          public long getTimeout()

    - #### getError

          public boolean getError()

    - #### setError

          public void setError(boolean error)

    - #### setKeepAliveLeft

          public void setKeepAliveLeft(int keepAliveLeft)

    - #### decrementKeepAlive

          public int decrementKeepAlive()

    - #### isKeptAlive

          public boolean isKeptAlive()

    - #### setKeptAlive

          public void setKeptAlive(boolean keptAlive)

    - #### getBlockingStatus

          public boolean getBlockingStatus()

    - #### setBlockingStatus

          public void setBlockingStatus(boolean blockingStatus)

    - #### getBlockingStatusReadLock

          public Lock getBlockingStatusReadLock()

    - #### getBlockingStatusWriteLock

          public ReentrantReadWriteLock.WriteLock getBlockingStatusWriteLock()

    - #### getWriteThreadLock

          public Object getWriteThreadLock()

    - #### reset

          public void reset(E socket,
                   long timeout)

    - #### toString

          public String toString()

      Overridden for debug purposes. No guarantees are made about the format of this message which may vary significantly between point releases.

      Overrides:
        `toString` in class `Object`

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