📄 adhoccommand.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_15) on Thu Aug 28 21:12:41 PDT 2008 --><TITLE>AdHocCommand (Openfire 3.6.0a Javadoc)</TITLE><META NAME="keywords" CONTENT="org.jivesoftware.openfire.commands.AdHocCommand class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="AdHocCommand (Openfire 3.6.0a Javadoc)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Openfire 3.6.0a Javadoc</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../../../../org/jivesoftware/openfire/commands/AdHocCommand.Action.html" title="enum in org.jivesoftware.openfire.commands"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/jivesoftware/openfire/commands/AdHocCommand.html" target="_top"><B>FRAMES</B></A> <A HREF="AdHocCommand.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.jivesoftware.openfire.commands</FONT><BR>Class AdHocCommand</H2><PRE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.jivesoftware.openfire.commands.AdHocCommand</B></PRE><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/jivesoftware/openfire/commands/admin/group/AddGroup.html" title="class in org.jivesoftware.openfire.commands.admin.group">AddGroup</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/group/AddGroupUsers.html" title="class in org.jivesoftware.openfire.commands.admin.group">AddGroupUsers</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/user/AddUser.html" title="class in org.jivesoftware.openfire.commands.admin.user">AddUser</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/user/AuthenticateUser.html" title="class in org.jivesoftware.openfire.commands.admin.user">AuthenticateUser</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/clearspace/ChangeSharedSecret.html" title="class in org.jivesoftware.openfire.commands.clearspace">ChangeSharedSecret</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/user/ChangeUserPassword.html" title="class in org.jivesoftware.openfire.commands.admin.user">ChangeUserPassword</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/muc/CreateMUCRoom.html" title="class in org.jivesoftware.openfire.commands.admin.muc">CreateMUCRoom</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/group/DeleteGroup.html" title="class in org.jivesoftware.openfire.commands.admin.group">DeleteGroup</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/group/DeleteGroupUsers.html" title="class in org.jivesoftware.openfire.commands.admin.group">DeleteGroupUsers</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/clearspace/GenerateNonce.html" title="class in org.jivesoftware.openfire.commands.clearspace">GenerateNonce</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/GetAdminConsoleInfo.html" title="class in org.jivesoftware.openfire.commands.admin">GetAdminConsoleInfo</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/GetListActiveUsers.html" title="class in org.jivesoftware.openfire.commands.admin">GetListActiveUsers</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/group/GetListGroups.html" title="class in org.jivesoftware.openfire.commands.admin.group">GetListGroups</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/group/GetListGroupUsers.html" title="class in org.jivesoftware.openfire.commands.admin.group">GetListGroupUsers</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/GetNumberActiveUsers.html" title="class in org.jivesoftware.openfire.commands.admin">GetNumberActiveUsers</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/GetNumberOnlineUsers.html" title="class in org.jivesoftware.openfire.commands.admin">GetNumberOnlineUsers</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/GetNumberUserSessions.html" title="class in org.jivesoftware.openfire.commands.admin">GetNumberUserSessions</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/GetServerStats.html" title="class in org.jivesoftware.openfire.commands.admin">GetServerStats</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/GetUsersPresence.html" title="class in org.jivesoftware.openfire.commands.admin">GetUsersPresence</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/event/GroupAdminAdded.html" title="class in org.jivesoftware.openfire.commands.event">GroupAdminAdded</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/event/GroupAdminRemoved.html" title="class in org.jivesoftware.openfire.commands.event">GroupAdminRemoved</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/event/GroupCreated.html" title="class in org.jivesoftware.openfire.commands.event">GroupCreated</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/event/GroupDeleting.html" title="class in org.jivesoftware.openfire.commands.event">GroupDeleting</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/event/GroupMemberAdded.html" title="class in org.jivesoftware.openfire.commands.event">GroupMemberAdded</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/event/GroupMemberRemoved.html" title="class in org.jivesoftware.openfire.commands.event">GroupMemberRemoved</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/event/GroupModified.html" title="class in org.jivesoftware.openfire.commands.event">GroupModified</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/HttpBindStatus.html" title="class in org.jivesoftware.openfire.commands.admin">HttpBindStatus</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/PacketsNotification.html" title="class in org.jivesoftware.openfire.commands.admin">PacketsNotification</A>, <A HREF="../../../../org/jivesoftware/openfire/pubsub/PendingSubscriptionsCommand.html" title="class in org.jivesoftware.openfire.pubsub">PendingSubscriptionsCommand</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/clearspace/SystemAdminAdded.html" title="class in org.jivesoftware.openfire.commands.clearspace">SystemAdminAdded</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/clearspace/SystemAdminRemoved.html" title="class in org.jivesoftware.openfire.commands.clearspace">SystemAdminRemoved</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/group/UpdateGroup.html" title="class in org.jivesoftware.openfire.commands.admin.group">UpdateGroup</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/event/UserCreated.html" title="class in org.jivesoftware.openfire.commands.event">UserCreated</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/event/UserDeleting.html" title="class in org.jivesoftware.openfire.commands.event">UserDeleting</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/event/UserModified.html" title="class in org.jivesoftware.openfire.commands.event">UserModified</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/admin/user/UserProperties.html" title="class in org.jivesoftware.openfire.commands.admin.user">UserProperties</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/event/VCardCreated.html" title="class in org.jivesoftware.openfire.commands.event">VCardCreated</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/event/VCardDeleting.html" title="class in org.jivesoftware.openfire.commands.event">VCardDeleting</A>, <A HREF="../../../../org/jivesoftware/openfire/commands/event/VCardModified.html" title="class in org.jivesoftware.openfire.commands.event">VCardModified</A></DD></DL><HR><DL><DT><PRE>public abstract class <B>AdHocCommand</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL></PRE><P>An ad-hoc command is a stateless object responsbile for executing the provided service. Each subclass will only have one instance that will be shared across all users sessions. Therefore, it is important to not keep any information related to executions as permanent data (i.e. as instance or static variables). Each command has a <tt>code</tt> that should be unique within a given JID.<p> Commands may have zero or more stages. Each stage is usually used for gathering information required for the command execution. Users are able to move forward or backward across the different stages. Commands may not be cancelled while they are beig executed. However, users may request the "cancel" action when submiting a stage response indicating that the command execution should be aborted. Thus, releasing any collected information. Commands that require user interaction (i.e. have more than one stage) will have to provide the data forms the user must complete in each stage and the allowed actions the user might perform during each stage (e.g. go to the previous stage or go to the next stage).<P><P><DL><DT><B>Author:</B></DT> <DD>Gaston Dombiak</DD></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><A NAME="nested_class_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Nested Class Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/commands/AdHocCommand.Action.html" title="enum in org.jivesoftware.openfire.commands">AdHocCommand.Action</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/commands/AdHocCommand.Status.html" title="enum in org.jivesoftware.openfire.commands">AdHocCommand.Status</A></B></CODE><BR> </TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/commands/AdHocCommand.html#AdHocCommand()">AdHocCommand</A></B>()</CODE><BR> </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/commands/AdHocCommand.html#addNextStageInformation(org.jivesoftware.openfire.commands.SessionData, org.dom4j.Element)">addNextStageInformation</A></B>(<A HREF="../../../../org/jivesoftware/openfire/commands/SessionData.html" title="class in org.jivesoftware.openfire.commands">SessionData</A> data, org.dom4j.Element command)</CODE><BR> Increments the stage number by one and adds to the command element the new data form and new allowed actions that the user might perform.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/commands/AdHocCommand.html#addPreviousStageInformation(org.jivesoftware.openfire.commands.SessionData, org.dom4j.Element)">addPreviousStageInformation</A></B>(<A HREF="../../../../org/jivesoftware/openfire/commands/SessionData.html" title="class in org.jivesoftware.openfire.commands">SessionData</A> data, org.dom4j.Element command)</CODE><BR> Decrements the stage number by one and adds to the command the data form and allowed actions that the user might perform of the previous stage.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/commands/AdHocCommand.html#addStageActions(org.jivesoftware.openfire.commands.SessionData, org.dom4j.Element)">addStageActions</A></B>(<A HREF="../../../../org/jivesoftware/openfire/commands/SessionData.html" title="class in org.jivesoftware.openfire.commands">SessionData</A> data, org.dom4j.Element command)</CODE><BR> Adds the allowed actions to follow from the current stage.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract void</CODE></FONT></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -