com.h3c.dist.bus

## Interface BusFactory

- All Known Subinterfaces:
    HAService

      public interface BusFactory

  `BusFactory` provides mechanism to access a bus of specific type

  To access a `Bus`, user must first obtain a handle to the `Bus` using getBus. Accessing `Bus` features is via the handle obtained.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `maxBusMsgPayloadSize` Maximum size of payload in a `BusMessage` (in bytes)
    `static int` | `maxBusMsgSize` Maximum size of a `BusMessage` (in bytes)

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<E extends Enum<E>> Bus` | `getBus(Class<E> messageTypeClass)` Get handle to the bus of specified busType.

- - ### Field Detail

    - #### maxBusMsgSize

          static final int maxBusMsgSize

      Maximum size of a `BusMessage` (in bytes)
      See Also:
        Constant Field Values

    - #### maxBusMsgPayloadSize

          static final int maxBusMsgPayloadSize

      Maximum size of payload in a `BusMessage` (in bytes)
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getBus

          <E extends Enum<E>> Bus getBus(Class<E> messageTypeClass)
                     throws ServiceNotAvailableException,
                            InterruptedException

      Get handle to the bus of specified busType. A new bus is created in the distributed store if one doesn't exist.
      Parameters:
        `messageTypeClass` - type of messages in this Bus
      Returns:
        Bus of requested type on success
      Throws:
        `ServiceNotAvailableException` - Bus service is not available
        `InterruptedException` - Operation interrupted exception
        `CreateException` - Runtime exception if create fails

Copyright © 2014. All Rights Reserved.