NAME
Hessian::Translator - Base class for Hessian serialization/deserialization.
SYNOPSIS
my $translator = Hessian::Translator->new( version => 1 );
my $hessian_string = "S\x00\x05hello";
$translator->input_string($hessian_string);
my $output = $translator->deserialize_message();
# Apply serialization methods to the object.
Hessian::Serializer->meta()->apply($translator);
DESCRIPTION
Hessian::Translator is made to act as the base class (or whatever this is called in Moose terminology) for serialization/deserialization methods.
On its own, this class really only provides some of the more basic functions required for Hessian processing such as the type list for datatypes, the reference list for maps, objects and arrays; and the object class definition list. Integration of the respective serialization and deserialization behaviours only takes place when needed. Depending on how the translator is initialized and which methods are called on the object, it is possibly to specialize the object for either Hessian 1.0 or Hessian 2.0 processing and to selectively include methods for serialization and or deserialization.
INTERFACE
BUILD
Not to be called directly.
new
- version
-
Allowed values are 1 or 2 and correspond to the respective Hessian protocol version.
input_string
- string
-
The Hessian encoded string to be decoded. This may represent an entire message or a simple scalar or datastructure. Note that the first application of this method causes the Hessian::Deserializer role to be applied to this class.
version
Retrieves the current version for which this client was initialized. See "new".
append_input_buffer
Appends the string parameter to the filehandle.
class_definitions
Provides access to the internal class definition list.
type_list
Provides access to the internal type list.
reference_list
Provides access to the internal list of references.
serializer
Causes the Hessian::Serializer methods to be applied to the current object.