Exemplo n.º 1
0
  /**
   * Adds an instant message listener to this chat transport.
   *
   * @param l The message listener to add.
   */
  public void addInstantMessageListener(MessageListener l) {
    // If this chat transport does not support instant messaging we do
    // nothing here.
    if (!allowsInstantMessage()) return;

    OperationSetBasicInstantMessaging imOpSet =
        contact.getProtocolProvider().getOperationSet(OperationSetBasicInstantMessaging.class);

    imOpSet.addMessageListener(l);
  }