NAME
Hessian::Translator::Envelope - Translate envelope level Hessian syntax
SYNOPSIS
These methods are meant for internal use only.
DESCRIPTION
This module implements methods necessary for processing the packaging of Hessian messages. This includes components of Hessian messages like envelopes and packets (mainly relevant for Hessian 2.0) as well as call and reply elements.
INTERFACE
read_message_chunk_data
Read Hessian wrapper level message components. For version 1.0 of the protocol this mainly applies to reply, call and fault objects. For version 2.0 this applies to the envelope and any nested call, reply or fault entities.
next_token
read_rpc
Read a remote procedure call from the input stream.
read_envelope
This method is starting point for processing Hessian version 2.0 messages. An enveloped message is passed to this subroutine to be broken down in to its components.
read_header_or_footer
Read the contents of a header or footer for a message chunk.
read_message_chunk
read_version
Reads the version of the message.
write_hessian_message
Writes a datastructure as a hessian message.
write_hessian_packet
Write a subset of hessian data out as a packet.
write_hessian_envelope
Write a datastructure into a Hessian serialized message.
This method is called internally if the datastructure passed to Hessian::Serializer contains hash with the key envelope pointing to a nested hash datastructure. The nested datastructure may vary.
Here are two examples of datastructures that will be passed to the write_hessian_envelope method:
In this case, the envelope points to a RPC for the method hello and a signle argument "hello, world".
my $datastructure = {
envelope => {
call => {
method => 'hello',
arguments => ['hello, world']
},
meta => 'Identity',
headers => [],
footers => []
}
};
In the second example, the envelope wraps some basic data which could represent any datastructure.
my $datastructure2 = {
envelope => {
data => "Lorem ipsum dolor sit amet, consectetur adipisicing",
meta => 'Identity',
headers => [],
footers => []
}
};
read_body
Read the binary wrapped body of a Hessian envelope.