cooperative protocol. For detailed information, see Protocol and
Communications Library on page 81.
Use of the Perl Library is accomplished with registered command
handlers, protocol commands, methods, and internal functions, which
are described in the following subsections. At the end of this section
is a simple example, which pulls it all together.
Command Handlers
At the heart of the UaTk module are command handlers, which act
as the interface between the module and the application you are
managing with the Application Management Toolkit.
Command handlers are simple Perl subroutines that are invoked as
needed. Each handler is associated with a command defined in the
Application Management Toolkit protocol. When the endpoint sends
a command to the application, the associated handler is invoked. It is
passed a Perl reference to a hash (associative array) containing its
list of parameters, usually an attribute/value list.
Any command can have a handler, although none are required.
Handlers cannot be invoked conditionally. If a command is received
and no handler is found, then an error is logged and processing
continues. If a command handler detects an error condition, it calls
one of the UaTk modules error methods: DataError( ), IOError( ),
or FatalError( ). These methods are described in the Primary
Methods table beginning on page 63.
Depending on the application, at least one handler needs to be
registered with the Application Management Toolkit by the
application. Handlers are registered using the RegisterCmdHandler
method described in the Primary Methods table beginning on page
63.
For convenience, several handlers are implemented by default. These
pre-defined handlers, coupled with at least one additional handler,
probably will suffice for you to begin working with the module. The
Developing Your Application in Perl
56
User Administration Version 3.8