Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.7.1 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire.commands
Class AdHocCommandManager

    java.lang.Object
      org.jivesoftware.openfire.commands.AdHocCommandManager

    public class AdHocCommandManager

extends Object

An AdHocCommandManager is responsible for keeping the list of available commands offered by a service and for processing commands requests. Typically, instances of this class are private to the service offering ad-hoc commands.

Author:
  Gaston Dombiak

Constructor Summary
`AdHocCommandManager()`

Method Summary
`void` | `addCommand(AdHocCommand command)` Adds a new command to the list of supported ad-hoc commands by this server.
`AdHocCommand` | `getCommand(String code)` Returns the command whose code matches the specified code or `null` if none was found.
`Collection<AdHocCommand>` | `getCommands()` Returns a list with the available commands in this command manager.
`org.xmpp.packet.IQ` | `process(org.xmpp.packet.IQ packet)`
`boolean` | `removeCommand(AdHocCommand command)` Removes the command from the list of ad-hoc commands supported by this server.
`void` | `stop()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AdHocCommandManager

    public AdHocCommandManager()

Method Detail

### addCommand

    public void addCommand(AdHocCommand command)

  Adds a new command to the list of supported ad-hoc commands by this server. The new command will appear in the discoverable items list and will be executed for those users with enough permission.

  Parameters:
    `command` - the new ad-hoc command to add.

### removeCommand

    public boolean removeCommand(AdHocCommand command)

  Removes the command from the list of ad-hoc commands supported by this server. The command will no longer appear in the discoverable items list.

  Parameters:
    `command` - the ad-hoc command to remove.
  Returns:
    true if the requested command was removed from the list of available commands.

### getCommands

    public Collection<AdHocCommand> getCommands()

  Returns a list with the available commands in this command manager.

  Returns:
    a list with the available commands in this command manager.

### getCommand

    public AdHocCommand getCommand(String code)

  Returns the command whose code matches the specified code or `null` if none was found.

  Parameters:
    `code` - the code of the command to find.
  Returns:
    the command whose code matches the specified code or null if none was found.

### process

    public org.xmpp.packet.IQ process(org.xmpp.packet.IQ packet)

### stop

    public void stop()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.7.1 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.