Class DeframedMessage
java.lang.Object
com.linecorp.armeria.common.grpc.protocol.DeframedMessage
- All Implemented Interfaces:
com.linecorp.armeria.common.util.SafeCloseable,AutoCloseable
@UnstableApi
public final class DeframedMessage
extends Object
implements com.linecorp.armeria.common.util.SafeCloseable
A deframed message. For uncompressed messages, we have the entire buffer available and return it
as is in
buf to optimize parsing. For compressed messages, we will parse incrementally
and thus return an InputStream in stream.-
Constructor Summary
ConstructorsConstructorDescriptionDeframedMessage(ByteBuf buf, int type) Creates a new instance with the specifiedByteBufandtype.DeframedMessage(InputStream stream, int type) Creates a new instance with the specifiedInputStreamandtype. -
Method Summary
-
Constructor Details
-
DeframedMessage
Creates a new instance with the specifiedByteBufandtype. -
DeframedMessage
Creates a new instance with the specifiedInputStreamandtype.
-
-
Method Details
-
buf
Returns theByteBuf.- Returns:
- the
ByteBuf, ornullif not created withDeframedMessage(ByteBuf, int).
-
stream
Returns theInputStream.- Returns:
- the
InputStream, ornullif not created withDeframedMessage(InputStream, int).
-
isTrailer
public boolean isTrailer()Returnstrueif this message is trailer. -
equals
-
hashCode
public int hashCode() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacecom.linecorp.armeria.common.util.SafeCloseable
-