public class AdHocCommandManager
extends java.lang.Object
getAddHocCommandsManager(org.jivesoftware.smack.Connection)
in order to
get an instance of this class.Modifier and Type | Method and Description |
---|---|
DiscoverItems |
discoverCommands(java.lang.String jid)
Discover the commands of an specific JID.
|
static AdHocCommandManager |
getAddHocCommandsManager(Connection connection)
Returns the
AdHocCommandManager related to the
connection . |
RemoteCommand |
getRemoteCommand(java.lang.String jid,
java.lang.String node)
Returns a command that represents an instance of a command in a remote
host.
|
void |
publishCommands(java.lang.String jid)
Publish the commands to an specific JID.
|
void |
registerCommand(java.lang.String node,
java.lang.String name,
java.lang.Class clazz)
Registers a new command with this command manager, which is related to a
connection.
|
void |
registerCommand(java.lang.String node,
java.lang.String name,
LocalCommandFactory factory)
Registers a new command with this command manager, which is related to a
connection.
|
public static AdHocCommandManager getAddHocCommandsManager(Connection connection)
AdHocCommandManager
related to the
connection
.connection
- the XMPP connection.public void registerCommand(java.lang.String node, java.lang.String name, java.lang.Class clazz)
LocalCommand
and have a default
constructor.node
- the unique identifier of the command.name
- the human readable name of the command.clazz
- the class of the command, which must extend LocalCommand
.public void registerCommand(java.lang.String node, java.lang.String name, LocalCommandFactory factory)
node
- the unique identifier of the command.name
- the human readable name of the command.factory
- a factory to create new instances of the command.public DiscoverItems discoverCommands(java.lang.String jid) throws XMPPException
jid
is a
full JID.jid
- the full JID to retrieve the commands for.XMPPException
- if the operation failed for some reason.public void publishCommands(java.lang.String jid) throws XMPPException
jid
- the full JID to publish the commands to.XMPPException
- if the operation failed for some reason.public RemoteCommand getRemoteCommand(java.lang.String jid, java.lang.String node)
jid
- the full JID of the host of the remote commandnode
- the identifier of the commandCopyright © 2003-2007 Jive Software.