UpgradeToken (Apache Tomcat 11.0.8 API Documentation)
Description: declaration: package: org.apache.coyote, record: UpgradeToken

# Record Class UpgradeToken

java.lang.Object
java.lang.Record
org.apache.coyote.UpgradeToken

Record Components:
  `httpUpgradeHandler` - The handler for the HTTP upgrade
  `contextBind` - The object to use to bind/unbind the current thread to/from the web application class loader
  `instanceManager` - The instance manager to use to create new Servlets, Filters, Listeners etc
  `protocol` - The desired protocol to upgrade to

public record UpgradeToken(HttpUpgradeHandler httpUpgradeHandler, ContextBind contextBind, InstanceManager instanceManager, String protocol) extends Record
Token used during the upgrade process.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UpgradeToken(HttpUpgradeHandler httpUpgradeHandler, ContextBind contextBind, InstanceManager instanceManager, String protocol)`
  Creates an instance of a `UpgradeToken` record class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ContextBind`
  `contextBind()`
  Returns the value of the `contextBind` record component.
  `final boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `ContextBind`
  `getContextBind()`
  `HttpUpgradeHandler`
  `getHttpUpgradeHandler()`
  `InstanceManager`
  `getInstanceManager()`
  `String`
  `getProtocol()`
  `final int`
  `hashCode()`
  Returns a hash code value for this object.
  `HttpUpgradeHandler`
  `httpUpgradeHandler()`
  Returns the value of the `httpUpgradeHandler` record component.
  `InstanceManager`
  `instanceManager()`
  Returns the value of the `instanceManager` record component.
  `String`
  `protocol()`
  Returns the value of the `protocol` record component.
  `final String`
  `toString()`
  Returns a string representation of this record class.

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

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

- ## Constructor Details

  - ### UpgradeToken

    public UpgradeToken(HttpUpgradeHandler httpUpgradeHandler, ContextBind contextBind, InstanceManager instanceManager, String protocol)
    Creates an instance of a `UpgradeToken` record class.
    Parameters:
      `httpUpgradeHandler` - the value for the `httpUpgradeHandler` record component
      `contextBind` - the value for the `contextBind` record component
      `instanceManager` - the value for the `instanceManager` record component
      `protocol` - the value for the `protocol` record component

- ## Method Details

  - ### getContextBind

    public ContextBind getContextBind()

  - ### getHttpUpgradeHandler

    public HttpUpgradeHandler getHttpUpgradeHandler()

  - ### getInstanceManager

    public InstanceManager getInstanceManager()

  - ### getProtocol

    public String getProtocol()

  - ### toString

    public final String toString()
    Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
    Specified by:
      `toString` in class `Record`
    Returns:
      a string representation of this object

  - ### hashCode

    public final int hashCode()
    Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
    Specified by:
      `hashCode` in class `Record`
    Returns:
      a hash code value for this object

  - ### equals

    public final boolean equals(Object o)
    Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with `Objects::equals(Object,Object)`.
    Specified by:
      `equals` in class `Record`
    Parameters:
      `o` - the object with which to compare
    Returns:
      `true` if this object is the same as the `o` argument; `false` otherwise.

  - ### httpUpgradeHandler

    public HttpUpgradeHandler httpUpgradeHandler()
    Returns the value of the `httpUpgradeHandler` record component.
    Returns:
      the value of the `httpUpgradeHandler` record component

  - ### contextBind

    public ContextBind contextBind()
    Returns the value of the `contextBind` record component.
    Returns:
      the value of the `contextBind` record component

  - ### instanceManager

    public InstanceManager instanceManager()
    Returns the value of the `instanceManager` record component.
    Returns:
      the value of the `instanceManager` record component

  - ### protocol

    public String protocol()
    Returns the value of the `protocol` record component.
    Returns:
      the value of the `protocol` record component