Package io.netty.handler.codec.http
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 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotocol()
The protocol that the channel has been upgraded to.int
refCnt()
Returns the reference count of this object.boolean
release()
Decreases the reference count by1
and deallocates this object if the reference count reaches at0
.boolean
release
(int decrement) Decreases the reference count by the specifieddecrement
and deallocates this object if the reference count reaches at0
.retain()
Increases the reference count by1
.retain
(int increment) Increases the reference count by the specifiedincrement
.toString()
touch()
Records the current access location of this object for debugging purposes.Records the current access location of this object with an additional arbitrary information for debugging purposes.Gets the request that triggered the protocol upgrade.
-
Field Details
-
protocol
-
upgradeRequest
-
-
Constructor Details
-
UpgradeEvent
UpgradeEvent(CharSequence protocol, FullHttpRequest upgradeRequest)
-
-
Method Details
-
protocol
The protocol that the channel has been upgraded to. -
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. If0
, it means this object has been deallocated.- Specified by:
refCnt
in interfaceReferenceCounted
-
retain
Description copied from interface:ReferenceCounted
Increases the reference count by1
.- Specified by:
retain
in interfaceReferenceCounted
-
retain
Description copied from interface:ReferenceCounted
Increases the reference count by the specifiedincrement
.- Specified by:
retain
in interfaceReferenceCounted
-
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 viaResourceLeakDetector
. This method is a shortcut totouch(null)
.- Specified by:
touch
in interfaceReferenceCounted
-
touch
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 viaResourceLeakDetector
.- Specified by:
touch
in interfaceReferenceCounted
-
release
public boolean release()Description copied from interface:ReferenceCounted
Decreases the reference count by1
and deallocates this object if the reference count reaches at0
.- Specified by:
release
in interfaceReferenceCounted
- Returns:
true
if and only if the reference count became0
and this object has been deallocated
-
release
public boolean release(int decrement) Description copied from interface:ReferenceCounted
Decreases the reference count by the specifieddecrement
and deallocates this object if the reference count reaches at0
.- Specified by:
release
in interfaceReferenceCounted
- Returns:
true
if and only if the reference count became0
and this object has been deallocated
-
toString
-