public class DefaultStompFrame extends DefaultStompHeadersSubframe implements StompFrame
StompFrame
.command, decoderResult, headers
EMPTY_LAST_CONTENT
Constructor and Description |
---|
DefaultStompFrame(StompCommand command) |
DefaultStompFrame(StompCommand command,
ByteBuf content) |
Modifier and Type | Method and Description |
---|---|
ByteBuf |
content()
Return the data which is held by this
ByteBufHolder . |
StompFrame |
copy()
Creates a deep copy of this
ByteBufHolder . |
StompFrame |
duplicate()
Duplicates this
ByteBufHolder . |
int |
refCnt()
Returns the reference count of this object.
|
boolean |
release()
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 . |
StompFrame |
replace(ByteBuf content)
Returns a new
ByteBufHolder which contains the specified content . |
StompFrame |
retain()
Increases the reference count by
1 . |
StompFrame |
retain(int increment)
Increases the reference count by the specified
increment . |
StompFrame |
retainedDuplicate()
Duplicates this
ByteBufHolder . |
String |
toString() |
StompFrame |
touch()
Records the current access location of this object for debugging purposes.
|
StompFrame |
touch(Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
command, decoderResult, headers, setDecoderResult
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
command, headers
decoderResult, setDecoderResult
public DefaultStompFrame(StompCommand command)
public DefaultStompFrame(StompCommand command, ByteBuf content)
public ByteBuf content()
ByteBufHolder
ByteBufHolder
.content
in interface ByteBufHolder
public StompFrame copy()
ByteBufHolder
ByteBufHolder
.copy
in interface ByteBufHolder
copy
in interface LastStompContentSubframe
copy
in interface StompContentSubframe
copy
in interface StompFrame
public StompFrame duplicate()
ByteBufHolder
ByteBufHolder
. Be aware that this will not automatically call ByteBufHolder.retain()
.duplicate
in interface ByteBufHolder
duplicate
in interface LastStompContentSubframe
duplicate
in interface StompContentSubframe
duplicate
in interface StompFrame
public StompFrame retainedDuplicate()
ByteBufHolder
ByteBufHolder
. This method returns a retained duplicate unlike ByteBufHolder.duplicate()
.retainedDuplicate
in interface ByteBufHolder
retainedDuplicate
in interface LastStompContentSubframe
retainedDuplicate
in interface StompContentSubframe
retainedDuplicate
in interface StompFrame
ByteBuf.retainedDuplicate()
public StompFrame replace(ByteBuf content)
ByteBufHolder
ByteBufHolder
which contains the specified content
.replace
in interface ByteBufHolder
replace
in interface LastStompContentSubframe
replace
in interface StompContentSubframe
replace
in interface StompFrame
public int refCnt()
ReferenceCounted
0
, it means this object has been deallocated.refCnt
in interface ReferenceCounted
public StompFrame retain()
ReferenceCounted
1
.retain
in interface ByteBufHolder
retain
in interface LastStompContentSubframe
retain
in interface StompContentSubframe
retain
in interface StompFrame
retain
in interface ReferenceCounted
public StompFrame retain(int increment)
ReferenceCounted
increment
.retain
in interface ByteBufHolder
retain
in interface LastStompContentSubframe
retain
in interface StompContentSubframe
retain
in interface StompFrame
retain
in interface ReferenceCounted
public StompFrame touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
in interface ByteBufHolder
touch
in interface LastStompContentSubframe
touch
in interface StompContentSubframe
touch
in interface StompFrame
touch
in interface ReferenceCounted
public StompFrame touch(Object hint)
ReferenceCounted
ResourceLeakDetector
.touch
in interface ByteBufHolder
touch
in interface LastStompContentSubframe
touch
in interface StompContentSubframe
touch
in interface StompFrame
touch
in interface ReferenceCounted
public boolean release()
ReferenceCounted
1
and deallocates this object if the reference count reaches at
0
.release
in interface ReferenceCounted
true
if and only if the reference count became 0
and this object has been deallocatedpublic boolean release(int decrement)
ReferenceCounted
decrement
and deallocates this object if the reference
count reaches at 0
.release
in interface ReferenceCounted
true
if and only if the reference count became 0
and this object has been deallocatedpublic String toString()
toString
in class DefaultStompHeadersSubframe
Copyright © 2008–2017 The Netty Project. All rights reserved.