com.h3c.dist.bus

## Interface BusListener

-     public interface BusListener

  `BusListener` is implemented by listeners of `Bus`. `Bus` notifies listeners using `processBusMsg(BusMessage)`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `BusListenerId` | `getInstanceId()` Get listeners instance id
    `int` | `getListenerPriority()` Get priority of listener
    `void` | `processBusMsg(BusMessage msg)` Process message posted to the `Bus`.
    `void` | `processBusMsgAck(long msgId, List<BusListenerId> ackedList, List<BusListenerId> nonAckedList, boolean result)` Process ack posted to the `Bus`.

- - ### Method Detail

    - #### getListenerPriority

          int getListenerPriority()

      Get priority of listener
      Returns:
        integer priority

    - #### getInstanceId

          BusListenerId getInstanceId()

      Get listeners instance id
      Returns:
        BusListenerId object is returned

    - #### processBusMsg

          void processBusMsg(BusMessage msg)

      Process message posted to the `Bus`. Bus invokes `processBusMsg` for message types registered for this listener
      Parameters:
        `msg` - message to process

    - #### processBusMsgAck

          void processBusMsgAck(long msgId,
                              List<BusListenerId> ackedList,
                              List<BusListenerId> nonAckedList,
                              boolean result)

      Process ack posted to the `Bus`. Bus invokes `processBusMsgAck` for message types registered for this listener
      Parameters:
        `msgId` - message id for which ack was requested
        `ackedList` - list of listeners who acked for the message
        `nonAckedList` - list of listeners who did not acked for the message
        `result` - overall ack result based on ack the policy

Copyright © 2014. All Rights Reserved.