Interface PekkoPduCodec
-
- All Known Implementing Classes:
PekkoPduProtobufCodec$
public interface PekkoPduCodec
INTERNAL APIA Codec that is able to convert Pekko PDUs (Protocol Data Units) from and to
pekko.util.ByteString
s.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PekkoPduCodec.Associate
static class
PekkoPduCodec.Associate$
static class
PekkoPduCodec.Disassociate
static class
PekkoPduCodec.Disassociate$
static class
PekkoPduCodec.Heartbeat$
static class
PekkoPduCodec.Message
static class
PekkoPduCodec.Message$
static class
PekkoPduCodec.Payload
static class
PekkoPduCodec.Payload$
static interface
PekkoPduCodec.PekkoPdu
Trait that represents decoded Pekko PDUs (Protocol Data Units)
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ByteString
constructAssociate(HandshakeInfo info)
ByteString
constructDisassociate(AssociationHandle.DisassociateInfo reason)
ByteString
constructHeartbeat()
ByteString
constructMessage(Address localAddress, ActorRef recipient, WireFormats.SerializedMessage serializedMessage, <any> senderOption, scala.Option<SeqNo> seqOption, scala.Option<Ack> ackOption)
scala.Option<SeqNo>
constructMessage$default$5()
scala.Option<Ack>
constructMessage$default$6()
ByteString
constructPayload(ByteString payload)
ByteString
constructPureAck(Ack ack)
scala.Tuple2<scala.Option<Ack>,scala.Option<PekkoPduCodec.Message>>
decodeMessage(ByteString raw, org.apache.pekko.remote.RemoteActorRefProvider provider, Address localAddress)
PekkoPduCodec.PekkoPdu
decodePdu(ByteString raw)
Returns anpekko.remote.transport.PekkoPduCodec.PekkoPdu
instance that represents the PDU contained in the raw ByteString.ByteString
encodePdu(PekkoPduCodec.PekkoPdu pdu)
Takes anpekko.remote.transport.PekkoPduCodec.PekkoPdu
representation of a Pekko PDU and returns its encoded form as apekko.util.ByteString
.
-
-
-
Method Detail
-
decodePdu
PekkoPduCodec.PekkoPdu decodePdu(ByteString raw)
Returns anpekko.remote.transport.PekkoPduCodec.PekkoPdu
instance that represents the PDU contained in the raw ByteString.- Parameters:
raw
- Encoded raw byte representation of a Pekko PDU- Returns:
- Case class representation of the decoded PDU that can be used in a match statement
-
encodePdu
ByteString encodePdu(PekkoPduCodec.PekkoPdu pdu)
Takes anpekko.remote.transport.PekkoPduCodec.PekkoPdu
representation of a Pekko PDU and returns its encoded form as apekko.util.ByteString
.For the same effect the constructXXX methods might be called directly, taking method parameters instead of the
pekko.remote.transport.PekkoPduCodec.PekkoPdu
final case classes.- Parameters:
pdu
- The Pekko Protocol Data Unit to be encoded- Returns:
- Encoded form as raw bytes
-
constructPayload
ByteString constructPayload(ByteString payload)
-
constructAssociate
ByteString constructAssociate(HandshakeInfo info)
-
constructDisassociate
ByteString constructDisassociate(AssociationHandle.DisassociateInfo reason)
-
constructHeartbeat
ByteString constructHeartbeat()
-
decodeMessage
scala.Tuple2<scala.Option<Ack>,scala.Option<PekkoPduCodec.Message>> decodeMessage(ByteString raw, org.apache.pekko.remote.RemoteActorRefProvider provider, Address localAddress)
-
constructMessage
ByteString constructMessage(Address localAddress, ActorRef recipient, WireFormats.SerializedMessage serializedMessage, <any> senderOption, scala.Option<SeqNo> seqOption, scala.Option<Ack> ackOption)
-
constructMessage$default$5
scala.Option<SeqNo> constructMessage$default$5()
-
constructMessage$default$6
scala.Option<Ack> constructMessage$default$6()
-
constructPureAck
ByteString constructPureAck(Ack ack)
-
-