Paul Evans > Tangence-0.19 > Tangence::Registry

Download:
Tangence-0.19.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  3
Open  0
View/Report Bugs
Module Version: 0.19   Source  

NAME ^

Tangence::Registry - object manager for a Tangence server

DESCRIPTION ^

This subclass of Tangence::Object acts as a container for all the exposed objects in a Tangence server. The registry is used to create exposed objects, and manages their lifetime. It maintains a reference to all the objects it creates, so it can dispatch incoming messages from clients to them.

CONSTRUCTOR ^

$registry = Tangence::Registry->new

Returns a new instance of a Tangence::Registry object. An entire server requires one registry object; it will be shared among all the client connections to that server.

METHODS ^

$obj = $registry->get_by_id( $id )

Returns the object with the given object ID.

This method is exposed to clients.

$obj = $registry->construct( $type, @args )

Constructs a new exposed object of the given type, and returns it. Any additional arguments are passed to the object's constructor.

AUTHOR ^

Paul Evans <leonerd@leonerd.org.uk>

syntax highlighting: