org.rhq.enterprise.communications.command.server
Interface CommandServiceDirectoryMBean

All Known Implementing Classes:
CommandServiceDirectory

public interface CommandServiceDirectoryMBean

The public interface to the directory that provides information on what command types a particular command service supports.

If a command type is supported by a command service, it is said that the command service is a provider of that command type.

Each command service belongs to a particular subsystem - a subsystem is made up of one or more command services. Subsystems are identified by simple String names - with the unnamed, anonymous subsystem being identified by the null subsystem name.

Author:
John Mazzitelli

Method Summary
 CommandServiceDirectoryEntry[] getAllEntries()
          This will return all the entries for all subsystems - in other words, all the supported command types and the command services that provide them in all subsystems.
 boolean getAllowDynamicDiscovery()
          This attribute will indicate if new commands are allowed to be added dynamically at runtime.
 CommandServiceDirectoryEntry getCommandTypeProvider(String subsystem, CommandType commandType)
          Given a particular CommandType and subsystem, this method will return an entry that gives you the ObjectName to a command service that provides support for that command type within that subsystem.
 CommandServiceDirectoryEntry[] getSubsystemEntries(String subsystem)
          Given a subsystem, this will return all the entries for that subsystem - in other words, all the supported command types and the command services that provide them.
 void setAllowDynamicDiscovery(boolean flag)
          This attribute will indicate if new commands are allowed to be added dynamically at runtime.
 

Method Detail

getCommandTypeProvider

CommandServiceDirectoryEntry getCommandTypeProvider(String subsystem,
                                                    CommandType commandType)
Given a particular CommandType and subsystem, this method will return an entry that gives you the ObjectName to a command service that provides support for that command type within that subsystem.

If no command service provider exists for the given command type within the given subsystem, null is returned.

subsystem may be null to denote the unnamed, anonymous subsystem.

Parameters:
subsystem - the subsystem to look in (may be null)
commandType - find a provider for this command type
Returns:
the entry that indicates the name of the subsystem's command service that provides support for the given command type, or null if no provider exists

getSubsystemEntries

CommandServiceDirectoryEntry[] getSubsystemEntries(String subsystem)
Given a subsystem, this will return all the entries for that subsystem - in other words, all the supported command types and the command services that provide them.

If no command service providers exists for the given subsystem, an empty array is returned.

subsystem may be null to denote the unnamed, anonymous subsystem.

Parameters:
subsystem - the subsystem to look in (may be null)
Returns:
array of all entries for the given subsystem

getAllEntries

CommandServiceDirectoryEntry[] getAllEntries()
This will return all the entries for all subsystems - in other words, all the supported command types and the command services that provide them in all subsystems.

If no command service providers exists, an empty array is returned.

Returns:
array of all entries in the directory

getAllowDynamicDiscovery

boolean getAllowDynamicDiscovery()
This attribute will indicate if new commands are allowed to be added dynamically at runtime. If false, only those command services currently installed at the time of this directory's registration will be found in the directory. If true, the directory will add new command services to the directory as they come online.

Note that this has no effect on dynamically discovering the removal of command services. The directory will always detect the removal of commands and remove their entries from the directory.

Returns:
true will allow the directory to discovery changes during runtime. false means only those command services already in existence at the time the directory service is registered will be stored in the directory.

setAllowDynamicDiscovery

void setAllowDynamicDiscovery(boolean flag)
This attribute will indicate if new commands are allowed to be added dynamically at runtime. If false, only those command services currently installed at the time of this directory's registration will be found in the directory. If true, the directory will add new command services to the directory as they come online.

Note that this has no effect on dynamically discovering the removal of command services. The directory will always detect the removal of commands and remove their entries from the directory.

Parameters:
flag - true will allow the directory to discovery changes during runtime. false means only those command services already in existence at the time the directory service is registered will be stored in the directory.


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.