|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.smackx.commands.AdHocCommandManager
public class AdHocCommandManager
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.
Field Summary | |
---|---|
static int |
SESSION_TIMEOUT
The session time out in seconds. |
Method Summary | |
---|---|
DiscoverItems |
discoverCommands(String jid)
Discover the commands of an specific JID. |
static AdHocCommandManager |
getAddHocCommandsManager(XMPPConnection connection)
Returns the AdHocCommandManager related to the
connection . |
RemoteCommand |
getRemoteCommand(String jid,
String node)
Returns a command that represents an instance of a command in a remote host. |
void |
publishCommands(String jid)
Publish the commands to an specific JID. |
void |
registerCommand(String node,
String name,
Class clazz)
Register a new command to this command manager, which is related to a connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int SESSION_TIMEOUT
Method Detail |
---|
public static AdHocCommandManager getAddHocCommandsManager(XMPPConnection connection)
AdHocCommandManager
related to the
connection
.
connection
- the XMPP connection.
public void registerCommand(String node, String name, Class clazz)
node
is an unique identifier of that
command for the connection related to this command manager. The
name is the human readable name of the command.
The class
is the class of the command
- Parameters:
node
- the unique identifier of the command.name
- the human readable name of the command.clazz
- the class of the command.
public DiscoverItems discoverCommands(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(String jid) throws XMPPException
jid
- the full JID to publish the commands to.
XMPPException
- if the operation failed for some reason.public RemoteCommand getRemoteCommand(String jid, String node)
jid
- the full JID of the host of the remote commandnode
- the identifier of the command
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |