akka.remote.transport
Interface AkkaPduCodec

All Known Implementing Classes:
AkkaPduProtobufCodec, AkkaPduProtobufCodec$

public interface AkkaPduCodec

INTERNAL API

A Codec that is able to convert Akka PDUs (Protocol Data Units) from and to ByteStrings.


Nested Class Summary
static interface AkkaPduCodec.AkkaPdu
          Trait that represents decoded Akka PDUs (Protocol Data Units)
static class AkkaPduCodec.Associate
           
static class AkkaPduCodec.Associate$
           
static class AkkaPduCodec.Disassociate
           
static class AkkaPduCodec.Disassociate$
           
static class AkkaPduCodec.Heartbeat$
           
static class AkkaPduCodec.Message
           
static class AkkaPduCodec.Message$
           
static class AkkaPduCodec.Payload
           
static class AkkaPduCodec.Payload$
           
 
Method Summary
 ByteString constructAssociate(HandshakeInfo info)
           
 ByteString constructDisassociate(AssociationHandle.DisassociateInfo reason)
           
 ByteString constructHeartbeat()
           
 ByteString constructMessage(Address localAddress, ActorRef recipient, WireFormats.SerializedMessage serializedMessage, scala.Option<ActorRef> senderOption, scala.Option<SeqNo> seqOption, scala.Option<Ack> ackOption)
           
 ByteString constructPayload(ByteString payload)
           
 ByteString constructPureAck(Ack ack)
           
 scala.Tuple2<scala.Option<Ack>,scala.Option<AkkaPduCodec.Message>> decodeMessage(ByteString raw, RemoteActorRefProvider provider, Address localAddress)
           
 AkkaPduCodec.AkkaPdu decodePdu(ByteString raw)
          Returns an AkkaPduCodec.AkkaPdu instance that represents the PDU contained in the raw ByteString.
 ByteString encodePdu(AkkaPduCodec.AkkaPdu pdu)
          Takes an AkkaPduCodec.AkkaPdu representation of an Akka PDU and returns its encoded form as a ByteString.
 

Method Detail

decodePdu

AkkaPduCodec.AkkaPdu decodePdu(ByteString raw)
Returns an AkkaPduCodec.AkkaPdu instance that represents the PDU contained in the raw ByteString.

Parameters:
raw - Encoded raw byte representation of an Akka PDU
Returns:
Case class representation of the decoded PDU that can be used in a match statement

encodePdu

ByteString encodePdu(AkkaPduCodec.AkkaPdu pdu)
Takes an AkkaPduCodec.AkkaPdu representation of an Akka PDU and returns its encoded form as a ByteString.

For the same effect the constructXXX methods might be called directly, taking method parameters instead of the AkkaPduCodec.AkkaPdu case classes.

Parameters:
pdu - The Akka 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<AkkaPduCodec.Message>> decodeMessage(ByteString raw,
                                                                                 RemoteActorRefProvider provider,
                                                                                 Address localAddress)

constructMessage

ByteString constructMessage(Address localAddress,
                            ActorRef recipient,
                            WireFormats.SerializedMessage serializedMessage,
                            scala.Option<ActorRef> senderOption,
                            scala.Option<SeqNo> seqOption,
                            scala.Option<Ack> ackOption)

constructPureAck

ByteString constructPureAck(Ack ack)