private void _deleteListener(MessageListenerWrapper listener) {
    Iterator<MessageListener> itr = _listeners.iterator();

    while (itr.hasNext()) {
      MessageListenerWrapper curListener = (MessageListenerWrapper) itr.next();

      if (curListener.equals(listener)) {
        itr.remove();
      }
    }
  }
Пример #2
0
  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }

    if (!(obj instanceof MessageListenerWrapper)) {
      return false;
    }

    MessageListenerWrapper listener = (MessageListenerWrapper) obj;

    String id = listener.getId();

    return getId().equals(id);
  }