Package org.apache.cassandra.transport
Class Message
- java.lang.Object
-
- org.apache.cassandra.transport.Message
-
- Direct Known Subclasses:
Message.Request
,Message.Response
public abstract class Message extends java.lang.Object
A message from the CQL binary protocol.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Message.Codec<M extends Message>
static class
Message.Direction
static class
Message.Request
static class
Message.Response
static class
Message.Type
-
Field Summary
Fields Modifier and Type Field Description protected Connection
connection
protected ProtocolVersion
forcedProtocolVersion
protected static org.slf4j.Logger
logger
Message.Type
type
-
Constructor Summary
Constructors Modifier Constructor Description protected
Message(Message.Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attach(Connection connection)
Connection
connection()
Envelope
encode(ProtocolVersion version)
java.util.Map<java.lang.String,java.nio.ByteBuffer>
getCustomPayload()
Envelope
getSource()
int
getStreamId()
void
setCustomPayload(java.util.Map<java.lang.String,java.nio.ByteBuffer> customPayload)
void
setSource(Envelope source)
Message
setStreamId(int streamId)
java.lang.String
toString()
-
-
-
Field Detail
-
logger
protected static final org.slf4j.Logger logger
-
type
public final Message.Type type
-
connection
protected Connection connection
-
forcedProtocolVersion
protected ProtocolVersion forcedProtocolVersion
-
-
Constructor Detail
-
Message
protected Message(Message.Type type)
-
-
Method Detail
-
attach
public void attach(Connection connection)
-
connection
public Connection connection()
-
setStreamId
public Message setStreamId(int streamId)
-
getStreamId
public int getStreamId()
-
setSource
public void setSource(Envelope source)
-
getSource
public Envelope getSource()
-
getCustomPayload
public java.util.Map<java.lang.String,java.nio.ByteBuffer> getCustomPayload()
-
setCustomPayload
public void setCustomPayload(java.util.Map<java.lang.String,java.nio.ByteBuffer> customPayload)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
encode
public Envelope encode(ProtocolVersion version)
-
-