Class HttpServerUpgradeHandler.UpgradeEvent

java.lang.Object
io.netty.handler.codec.http.HttpServerUpgradeHandler.UpgradeEvent
All Implemented Interfaces:
ReferenceCounted
Enclosing class:
HttpServerUpgradeHandler

public static final class HttpServerUpgradeHandler.UpgradeEvent extends java.lang.Object implements ReferenceCounted
User event that is fired to notify about the completion of an HTTP upgrade to another protocol. Contains the original upgrade request so that the response (if required) can be sent using the new protocol.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final java.lang.CharSequence
     
    private final FullHttpRequest
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    UpgradeEvent(java.lang.CharSequence protocol, FullHttpRequest upgradeRequest)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    java.lang.CharSequence
    The protocol that the channel has been upgraded to.
    int
    Returns the reference count of this object.
    boolean
    Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.
    boolean
    release(int decrement)
    Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.
    Increases the reference count by 1.
    retain(int increment)
    Increases the reference count by the specified increment.
    java.lang.String
     
    Records the current access location of this object for debugging purposes.
    touch(java.lang.Object hint)
    Records the current access location of this object with an additional arbitrary information for debugging purposes.
    Gets the request that triggered the protocol upgrade.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • protocol

      private final java.lang.CharSequence protocol
    • upgradeRequest

      private final FullHttpRequest upgradeRequest
  • Constructor Details

    • UpgradeEvent

      UpgradeEvent(java.lang.CharSequence protocol, FullHttpRequest upgradeRequest)
  • Method Details

    • protocol

      public java.lang.CharSequence protocol()
      The protocol that the channel has been upgraded to.
    • upgradeRequest

      public FullHttpRequest upgradeRequest()
      Gets the request that triggered the protocol upgrade.
    • refCnt

      public int refCnt()
      Description copied from interface: ReferenceCounted
      Returns the reference count of this object. If 0, it means this object has been deallocated.
      Specified by:
      refCnt in interface ReferenceCounted
    • retain

      Description copied from interface: ReferenceCounted
      Increases the reference count by 1.
      Specified by:
      retain in interface ReferenceCounted
    • retain

      public HttpServerUpgradeHandler.UpgradeEvent retain(int increment)
      Description copied from interface: ReferenceCounted
      Increases the reference count by the specified increment.
      Specified by:
      retain in interface ReferenceCounted
    • touch

      Description copied from interface: ReferenceCounted
      Records the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector. This method is a shortcut to touch(null).
      Specified by:
      touch in interface ReferenceCounted
    • touch

      public HttpServerUpgradeHandler.UpgradeEvent touch(java.lang.Object hint)
      Description copied from interface: ReferenceCounted
      Records the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector.
      Specified by:
      touch in interface ReferenceCounted
    • release

      public boolean release()
      Description copied from interface: ReferenceCounted
      Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.
      Specified by:
      release in interface ReferenceCounted
      Returns:
      true if and only if the reference count became 0 and this object has been deallocated
    • release

      public boolean release(int decrement)
      Description copied from interface: ReferenceCounted
      Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.
      Specified by:
      release in interface ReferenceCounted
      Returns:
      true if and only if the reference count became 0 and this object has been deallocated
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object