tigase.jaxmpp.core.client.xmpp.modules.adhoc
Class AdHocCommansModule

java.lang.Object
  extended by tigase.jaxmpp.core.client.xmpp.modules.AbstractIQModule
      extended by tigase.jaxmpp.core.client.xmpp.modules.adhoc.AdHocCommansModule
All Implemented Interfaces:
XmppModule

public class AdHocCommansModule
extends AbstractIQModule

Module to handle ad-hoc commands.

Author:
bmalkow

Nested Class Summary
static class AdHocCommansModule.AdHocCommansAsyncCallback
          Callback to handle result of ad-hoc command.
 
Field Summary
static Criteria CRIT
           
 
Fields inherited from class tigase.jaxmpp.core.client.xmpp.modules.AbstractIQModule
log, observable, sessionObject, writer
 
Constructor Summary
AdHocCommansModule(Observable parent, SessionObject sessionObject, PacketWriter packetWriter, DiscoItemsModule discoItemsModule, DiscoInfoModule discoInfoModule)
           
 
Method Summary
 void execute(JID toJID, String node, Action action, JabberDataElement data, AsyncCallback asyncCallback)
          Calls ad-hoc command on remote resource.
 Criteria getCriteria()
          Criteria
 String[] getFeatures()
           Returns features what are implemented by Module.
protected  void processDiscoInfoEvent(DiscoInfoModule.DiscoInfoEvent be)
           
protected  void processDiscoItemEvent(DiscoItemsModule.DiscoItemEvent be)
           
protected  void processGet(IQ element)
          Method for processing stanza <iq type='get'>.
protected  void processSet(IQ element)
          Method for processing stanza <iq type='set'>.
 void register(AdHocCommand command)
          Registers new ad-hoc command.
 
Methods inherited from class tigase.jaxmpp.core.client.xmpp.modules.AbstractIQModule
addListener, addListener, process, removeAllListeners, removeListener, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CRIT

public static final Criteria CRIT
Constructor Detail

AdHocCommansModule

public AdHocCommansModule(Observable parent,
                          SessionObject sessionObject,
                          PacketWriter packetWriter,
                          DiscoItemsModule discoItemsModule,
                          DiscoInfoModule discoInfoModule)
Method Detail

execute

public void execute(JID toJID,
                    String node,
                    Action action,
                    JabberDataElement data,
                    AsyncCallback asyncCallback)
             throws JaxmppException
Calls ad-hoc command on remote resource.

Parameters:
toJID - remote ad-hoc command executor.
node - node
action - action
data - Data Form
asyncCallback - callback
Throws:
JaxmppException

getCriteria

public Criteria getCriteria()
Description copied from interface: XmppModule
Criteria

Returns:

getFeatures

public String[] getFeatures()
Description copied from interface: XmppModule

Returns features what are implemented by Module.

See Service Discovery Features

Returns:
array of features

processDiscoInfoEvent

protected void processDiscoInfoEvent(DiscoInfoModule.DiscoInfoEvent be)
                              throws XMLException,
                                     XMPPException
Throws:
XMLException
XMPPException

processDiscoItemEvent

protected void processDiscoItemEvent(DiscoItemsModule.DiscoItemEvent be)
                              throws XMLException
Throws:
XMLException

processGet

protected void processGet(IQ element)
                   throws XMPPException,
                          XMLException,
                          JaxmppException
Description copied from class: AbstractIQModule
Method for processing stanza <iq type='get'>.

Specified by:
processGet in class AbstractIQModule
Parameters:
element - incoming XMPP stanza
Throws:
XMPPException
XMLException
JaxmppException

processSet

protected void processSet(IQ element)
                   throws XMPPException,
                          XMLException,
                          JaxmppException
Description copied from class: AbstractIQModule
Method for processing stanza <iq type='set'>.

Specified by:
processSet in class AbstractIQModule
Parameters:
element - incoming XMPP stanza
Throws:
XMPPException
XMLException
JaxmppException

register

public void register(AdHocCommand command)
Registers new ad-hoc command.

Parameters:
command - command to register


Copyright © 2006-2012 Tigase. All Rights Reserved.