Lines Matching refs:command

112      * Map a command node with its AdHocCommandInfo. Note: Key=command node,

113 * Value=command. Command node matches the node attribute sent by command
120 * Map a command session ID with the instance LocalCommand. The LocalCommand
122 * the command execution. Note: Key=session ID, Value=LocalCommand. Session
123 * ID matches the sessionid attribute sent by command responders.
134 * Registers a new command with this command manager, which is related to a
135 * connection. The <tt>node</tt> is an unique identifier of that command for
136 * the connection related to this command manager. The <tt>name</tt> is the
137 * human readable name of the command. The <tt>class</tt> is the class of
138 * the command, which must extend {@link LocalCommand} and have a default
141 * @param node the unique identifier of the command.
142 * @param name the human readable name of the command.
143 * @param clazz the class of the command, which must extend {@link LocalCommand}.
154 * Registers a new command with this command manager, which is related to a
156 * command for the connection related to this command manager. The <tt>name</tt>
157 * is the human readeale name of the command. The <tt>factory</tt> generates
158 * new instances of the command.
160 * @param node the unique identifier of the command.
161 * @param name the human readable name of the command.
162 * @param factory a factory to create new instances of the command.
169 // the added command
188 "automation", name, "command-node");
240 * Returns a command that represents an instance of a command in a remote
242 * RMI. Every invocation on this command is equivalent to an invocation in
243 * the remote command.
245 * @param jid the full JID of the host of the remote command
246 * @param node the identifier of the command
247 * @return a local instance equivalent to the remote command.
256 * <li>Registers the ad-hoc command feature to the ServiceDiscoveryManager</li>
354 * action of a command. If this is the first request, this method checks,
355 * before executing the command, if:
357 * <li>The requested command exists</li>
359 * <li>The command has more than one stage, if so, it saves the command and
366 * the command, if:
394 // command exists
396 // Requested command does not exist so return
406 // Create a new instance of the command with the
408 LocalCommand command = newInstanceOfCmd(commandNode, sessionId);
411 command.setData(response);
415 // enough to execute the requested command
416 if (!command.hasPermission(requestData.getFrom())) {
437 // Increase the state number, so the command knows in witch
439 command.incrementStage();
440 // Executes the command
441 command.execute();
443 if (command.isLastStage()) {
444 // If there is only one stage then the command is completed
451 executingCommands.put(sessionId, command);
458 LocalCommand command = executingCommands.get(sessionId);
459 // Since the command could be removed in the meanwhile
463 if (command != null) {
464 long creationStamp = command.getCreationDate();
508 // command be removed from the executing list.
518 LocalCommand command = executingCommands.get(sessionId);
520 // Check that a command exists for the specified sessionID
521 // This also handles if the command was removed in the meanwhile
523 if (command == null) {
530 long creationStamp = command.getCreationDate();
543 * executing command i.e. the same session id, all the execution of
546 synchronized (command) {
559 action = command.getExecuteAction();
564 if (!command.isValidAction(action)) {
579 // Set the new data to the command.
580 command.setData(response);
583 command.incrementStage();
584 command.next(new Form(requestData.getForm()));
585 if (command.isLastStage()) {
586 // If it is the last stage then the command is
596 command.incrementStage();
597 command.complete(new Form(requestData.getForm()));
603 command.decrementStage();
604 command.prev();
607 command.cancel();
623 // command be removed from the executing list.
652 * @param specificCondition the adhoc command error condition.
675 * Creates a new instance of a command to be used by a new execution request
677 * @param commandNode the command node that identifies it.
679 * @return the command instance to execute.
686 LocalCommand command;
688 command = (LocalCommand) commandInfo.getCommandInstance();
689 command.setSessionID(sessionID);
690 command.setName(commandInfo.getName());
691 command.setNode(commandInfo.getNode());
703 return command;
707 * Returns the registered commands of this command manager, which is related
717 * Stores ad-hoc command information.