fulmine.rpc
Interface IRpcCodec

All Known Implementing Classes:
RpcCodec

public interface IRpcCodec

A codec for RPC invocations. The coded encodes an RPC key and its arguments into a byte[] and decodes byte[] into an RPC key and arguments.

Author:
Ramon Servadei

Method Summary
 QuadValue<IRpcMarker,String,String,IField[]> decode(byte[] rpcData)
          Decode the byte[] into the RPC marker, key, identity of the remote context invoking this RPC and arguments.
 byte[] encode(IRpcMarker rpcMarker, String rpcKey, String contextIdentity, IField[] args)
          Encode the RPC marker, key and arguments into a byte[]
 

Method Detail

decode

QuadValue<IRpcMarker,String,String,IField[]> decode(byte[] rpcData)
Decode the byte[] into the RPC marker, key, identity of the remote context invoking this RPC and arguments. The name of the remote context is important for updating the correct RPC result record.

Parameters:
rpcData - the byte[] to decode
Returns:
a QuasValue holding the RPC marker, key, identity of the remote context invoking this RPC and the arguments for the invocation, null if it cannot be decoded.

encode

byte[] encode(IRpcMarker rpcMarker,
              String rpcKey,
              String contextIdentity,
              IField[] args)
Encode the RPC marker, key and arguments into a byte[]

Parameters:
rpcMarker - the RPC marker to encode
rpcKey - the RPC key to encode
contextIdentity - the identity of the context invoking the RPC
args - the arguments to encode
Returns:
a byte[] with the encoded RPC marker, key and arguments.


Copyright © 2007-2009. All Rights Reserved.