Example #1
0
 @ManagedOperation
 public void startGui() {
   if (discard_dialog == null) {
     discard_dialog = new DiscardDialog();
     discard_dialog.init();
     discard_dialog.setTitle(localAddress() != null ? localAddress().toString() : "n/a");
     discard_dialog.handleView(members);
   }
 }
Example #2
0
  public Object down(Event evt) {
    switch (evt.getType()) {
      case Event.VIEW_CHANGE:
        View view = evt.getArg();
        List<Address> mbrs = view.getMembers();
        members.clear();
        members.addAll(mbrs);
        //                ignoredMembers.retainAll(mbrs); // remove all non members
        if (discard_dialog != null) discard_dialog.handleView(mbrs);
        break;

      case Event.SET_LOCAL_ADDRESS:
        localAddress = evt.getArg();
        if (discard_dialog != null)
          discard_dialog.setTitle("Discard dialog (" + localAddress + ")");
        break;
      case Event.GET_PING_DATA:
        if (discard_all) return null;
        break;
    }
    return down_prot.down(evt);
  }