Command Listeners

A command listener is an instance of any class that implements the CommandListener interface; however, for practical purposes, all plug-in command listeners should extend one of these classes:

The framework uses command listeners as the mechanism to properly route commands to be handled.

When the Administration Services servlet starts up, it builds a table of command listeners, the commands that each command listener can handle, and the method in the command listener for that command. As client applications send commands (http requests), theAdministration Services servlet uses the command's operation parameter to determine the command listener and method to route the request to.

For example, a typical command might be to log in to the Administration Services servlet. When expressed as an http request, this command will look something like this:

http://LocalHost/EAS?op=login&name=user1&password=hello

The Administration Services servlet parses the following parameters:

The framework uses the “op” parameter to route the command to the correct command listener. If the command listener has been registered correctly, the framework will also collect the “name=” and “password=” parameters and pass them as arguments to the method in the command listener.