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
FieldsModifier and TypeFieldDescriptionprivate final java.lang.CharSequenceprivate final FullHttpRequest -
Constructor Summary
ConstructorsConstructorDescriptionUpgradeEvent(java.lang.CharSequence protocol, FullHttpRequest upgradeRequest) -
Method Summary
Modifier and TypeMethodDescriptionjava.lang.CharSequenceprotocol()The protocol that the channel has been upgraded to.intrefCnt()Returns the reference count of this object.booleanrelease()Decreases the reference count by1and deallocates this object if the reference count reaches at0.booleanrelease(int decrement) Decreases the reference count by the specifieddecrementand 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.java.lang.StringtoString()touch()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
-
-
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
Gets the request that triggered the protocol upgrade. -
refCnt
public int refCnt()Description copied from interface:ReferenceCountedReturns the reference count of this object. If0, it means this object has been deallocated.- Specified by:
refCntin interfaceReferenceCounted
-
retain
Description copied from interface:ReferenceCountedIncreases the reference count by1.- Specified by:
retainin interfaceReferenceCounted
-
retain
Description copied from interface:ReferenceCountedIncreases the reference count by the specifiedincrement.- Specified by:
retainin interfaceReferenceCounted
-
touch
Description copied from interface:ReferenceCountedRecords 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:
touchin interfaceReferenceCounted
-
touch
Description copied from interface:ReferenceCountedRecords 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:
touchin interfaceReferenceCounted
-
release
public boolean release()Description copied from interface:ReferenceCountedDecreases the reference count by1and deallocates this object if the reference count reaches at0.- Specified by:
releasein interfaceReferenceCounted- Returns:
trueif and only if the reference count became0and this object has been deallocated
-
release
public boolean release(int decrement) Description copied from interface:ReferenceCountedDecreases the reference count by the specifieddecrementand deallocates this object if the reference count reaches at0.- Specified by:
releasein interfaceReferenceCounted- Returns:
trueif and only if the reference count became0and this object has been deallocated
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-