Esempio n. 1
0
  /**
   * Constructor 1
   *
   * @param props
   * @param no_channel
   * @param jmx
   * @param use_state
   * @param state_timeout
   * @param use_unicasts
   * @param name
   * @param send_own_state_on_merge
   * @param gen
   * @throws Exception
   */
  public JWhiteBoard(
      String props,
      boolean no_channel,
      boolean jmx,
      boolean use_state,
      long state_timeout,
      boolean use_unicasts,
      String name,
      boolean send_own_state_on_merge,
      AddressGenerator gen)
      throws Exception {
    this.noChannel = no_channel;
    this.jmx = jmx;
    this.useState = use_state;
    this.stateTimeout = state_timeout;
    this.use_unicasts = use_unicasts;
    if (no_channel) return;

    channel = new JChannel(props);
    if (gen != null) channel.addAddressGenerator(gen);
    if (name != null) channel.setName(name);
    channel.setReceiver(this);
    channel.addChannelListener(this);
    this.send_own_state_on_merge = send_own_state_on_merge;
  }
Esempio n. 2
0
 /**
  * Constructor 3
  *
  * @param channel
  * @param use_state: Save state of Group
  * @param state_timeout: State time out
  * @throws Exception
  */
 public JWhiteBoard(JChannel channel, boolean use_state, long state_timeout) throws Exception {
   this.channel = channel;
   channel.setReceiver(this);
   channel.addChannelListener(this);
   this.useState = use_state;
   this.stateTimeout = state_timeout;
 }
Esempio n. 3
0
 /**
  * Constructor 2
  *
  * @param channel
  * @throws Exception
  */
 public JWhiteBoard(JChannel channel) throws Exception {
   this.channel = channel;
   channel.setReceiver(this);
   channel.addChannelListener(this);
 }