1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +02:00

Added method so that timeout can be specified when executing ad-hoc command.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@10946 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2008-12-16 22:33:57 +00:00 committed by matt
parent bc9f0179fa
commit 1bdacfb65e
2 changed files with 33 additions and 13 deletions

View file

@ -170,6 +170,10 @@ public abstract class AdHocCommand {
data.addNote(note);
}
public String getRaw() {
return data.getChildElementXML();
}
/**
* Returns the form of the current stage. Usually it is the form that must
* be answered to execute the next action. If that is the case it should be
@ -206,10 +210,21 @@ public abstract class AdHocCommand {
* command. It is invoked on every command. If there is a problem executing
* the command it throws an XMPPException.
*
* @throws XMPPException if there is a problem executing the command.
* @throws XMPPException if there is an error executing the command.
*/
public abstract void execute() throws XMPPException;
/**
* Executes the command, waiting up to the <tt>timeout</tt> for a reply.
* This is invoked only on the first stage of the
* command. It is invoked on every command. If there is a problem executing
* the command it throws an XMPPException.
*
* @param timeout the length of time in ms to wait for a reply.
* @throws XMPPException if there is an error executing the command.
*/
public abstract void execute(long timeout) throws XMPPException;
/**
* Executes the next action of the command with the information provided in
* the <code>response</code>. This form must be the answer form of the