View Javadoc

1   package org.lsst.ccs.bus;
2   
3   
4   /**
5    * This can be used to send commands to a Modular Subsystem. We are assuming that
6    * all subsystems which receive commands are modular subsystems, so this can be 
7    * used to send commands to any (non-passive) subsystem.
8    * 
9    * TODO: Check if this is really a true statement. What about things like the
10   * status persister -- should we be able to send it commands like shutdown? (LSSTCCS-285)
11   * 
12   * @author aubourg
13   */
14  public class ModuleInvokerCommand extends Command {
15  
16      private static final long serialVersionUID = -2013279992668203936L;
17  
18      /**
19       * Create a instance of this class. Some functionality of this class is not fully 
20       * implemented yet (keys, levels).
21       * @param key The lock manager key owned by the sender. Can be <code>""</code>.
22       * @param level The level at which the sender is currently authorized. Can be 0 (the default).
23       * @param destination The destination subsystem and module path within the subsystem. E.g.
24       * <code>single-filter-test/module-1/sub-module</code>. 
25       * @param command The command to be sent. 
26       * @param parameterz The parameters to be sent with the command. This can be omitted if
27       * there are no arguments.
28       * 
29       * Note: There is no need to call {@link #setDestination} explicitly when using this constructor. 
30       * Note, the interpretation of command and parameterz depends on the setting of {@link #unParsed}.
31       */
32      public ModuleInvokerCommand(String key, int level, String destination, String command, Object... parameterz) {
33          super(key, level, destination, command, parameterz);
34          //unparsed = false
35      }
36  
37      /**
38       * This method is deprecated because of ambiguity problems, and lack of support for keys. level.
39       * @deprecated Please use other constructor.
40       */
41      @Deprecated
42      public ModuleInvokerCommand(String destination, String command, Object... parameterz) {
43          this("",0, destination, command, parameterz) ;
44      }
45      /**
46       * This method is deprecated because of ambiguity problems, and lack of support for keys. level.
47       * @deprecated Please use other constructor.
48       */
49      @Deprecated
50      public ModuleInvokerCommand(String command, Object... parameterz) {
51          this("",0, (String) null, command, parameterz) ;
52      }
53  }