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 up(Event evt) {
   if (evt.getType() == Event.SET_LOCAL_ADDRESS) {
     localAddress = evt.getArg();
     if (discard_dialog != null) discard_dialog.setTitle("Discard dialog (" + localAddress + ")");
   }
   return up_prot.up(evt);
 }
Example #3
0
 public void start() throws Exception {
   super.start();
   if (use_gui) {
     discard_dialog = new DiscardDialog();
     discard_dialog.init();
   }
 }
Example #4
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);
  }
Example #5
0
 public DISCARD setLocalAddress(Address localAddress) {
   this.localAddress = localAddress;
   if (discard_dialog != null)
     discard_dialog.setTitle(localAddress != null ? localAddress.toString() : "n/a");
   return this;
 }
Example #6
0
 public void stop() {
   super.stop();
   if (discard_dialog != null) discard_dialog.dispose();
 }
Example #7
0
 @ManagedOperation
 public void stopGui() {
   if (discard_dialog != null) discard_dialog.dispose();
   discard_dialog = null;
 }