Ejemplo n.º 1
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);
 }
Ejemplo n.º 2
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);
   }
 }
Ejemplo n.º 3
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);
  }
Ejemplo n.º 4
0
 public DISCARD setLocalAddress(Address localAddress) {
   this.localAddress = localAddress;
   if (discard_dialog != null)
     discard_dialog.setTitle(localAddress != null ? localAddress.toString() : "n/a");
   return this;
 }