com.aispeech.dui

## 类 BusClient

- java.lang.Object
- - com.aispeech.dui.BusClient

-     public class BusClient
      extends java.lang.Object

- - ### 嵌套类概要

    嵌套类
    限定符和类型 | 类和说明
    --- | ---
    `static class` | `BusClient.BusClientImplementException`
    `static class` | `BusClient.BusClientRuntimeException`
    `static interface` | `BusClient.Handler`
    `static class` | `BusClient.Multipart`
    `static class` | `BusClient.RPCResult`
    `static class` | `BusClient.XSocket`

  - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static java.lang.String` | `DEFAULT_BUS_SERVER`
    `static int` | `DEFAULT_LOGLEVEL`
    `static java.lang.String` | `TAG`
    `static java.lang.String` | `TAG_HIGHFREQ`

  - ### 构造器概要

    构造器
    构造器和说明
    `BusClient()`
    `BusClient(java.lang.String names)`
    `BusClient(java.lang.String names, int size)`
    `BusClient(java.lang.String names, java.lang.String addr, int sockBufferSize)`

  - ### 方法概要

    所有方法 静态方法 实例方法 具体方法 已过时的方法
    限定符和类型 | 方法和说明
    --- | ---
    `java.util.concurrent.Future<BusClient.RPCResult>` | `acall(java.lang.String url, java.lang.String... args)` 已过时。
    `BusClient.RPCResult` | `call(java.lang.String url)`
    `BusClient.RPCResult` | `call(java.lang.String url, byte[]... args)`
    `BusClient.RPCResult` | `call(java.lang.String url, java.util.List<java.lang.String> args)`
    `BusClient.RPCResult` | `call(java.lang.String url, java.lang.String... args)`
    `static BusClient.Multipart` | `createRemoveStickyTopic(java.lang.String topic)` create a multipart contains a removesticky topic
    `static BusClient.Multipart` | `createStickyTopic(java.lang.String topic, java.lang.String... parts)` create a multipart contains a sticky topic
    `void` | `delete()`
    `void` | `dump(java.io.PrintWriter pw)`
    `void` | `interrupt()`
    `boolean` | `isReady()`
    `void` | `killTimer(long id)`
    `boolean` | `publish(BusClient.Multipart multipart)`
    `void` | `publish(java.lang.String topic)`
    `void` | `publish(java.lang.String topic, byte[]... parts)`
    `void` | `publish(java.lang.String topic, java.lang.String... parts)`
    `boolean` | `publishSticky(java.lang.String topic, java.lang.String... parts)` The topic will always be delivered to subscribers 1. no matter aios has ready or not. 2. no matter subscriber invokes bc.subscribe earlier or later.
    `boolean` | `removeSticky(java.lang.String topic)` The topic will be not sticky anymore Remove the recent sticky topic kept in memory
    `long` | `setTimer(java.lang.Runnable runnable, long timeout)`
    `void` | `spin(BusClient.Handler handler)`
    `void` | `subscribe(java.lang.String... topics)`
    `void` | `unsubscribe(java.lang.String... topics)`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 字段详细资料

    - #### TAG

          public static java.lang.String TAG

    - #### TAG_HIGHFREQ

          public static java.lang.String TAG_HIGHFREQ

    - #### DEFAULT_LOGLEVEL

          public static int DEFAULT_LOGLEVEL

    - #### DEFAULT_BUS_SERVER

          public static java.lang.String DEFAULT_BUS_SERVER

  - ### 构造器详细资料

    - #### BusClient

          public BusClient()

    - #### BusClient

          public BusClient(java.lang.String names)

    - #### BusClient

          public BusClient(java.lang.String names,
                           int size)

    - #### BusClient

          public BusClient(java.lang.String names,
                           java.lang.String addr,
                           int sockBufferSize)

  - ### 方法详细资料

    - #### createStickyTopic

          public static BusClient.Multipart createStickyTopic(java.lang.String topic,
                                                              java.lang.String... parts)

      create a multipart contains a sticky topic

    - #### createRemoveStickyTopic

          public static BusClient.Multipart createRemoveStickyTopic(java.lang.String topic)

      create a multipart contains a removesticky topic

    - #### isReady

          public boolean isReady()

    - #### delete

          public void delete()

    - #### subscribe

          public void subscribe(java.lang.String... topics)

    - #### unsubscribe

          public void unsubscribe(java.lang.String... topics)

    - #### publish

          public void publish(java.lang.String topic)

    - #### publish

          public void publish(java.lang.String topic,
                              java.lang.String... parts)

    - #### publish

          public void publish(java.lang.String topic,
                              byte[]... parts)

    - #### publishSticky

          public boolean publishSticky(java.lang.String topic,
                                       java.lang.String... parts)

      The topic will always be delivered to subscribers 1. no matter aios has ready or not. 2. no matter subscriber invokes bc.subscribe earlier or later. The most recent sticky topic is kept in memory for future access by subscribers
      参数:
        `topic` - sticky topic to publish
        `parts` - content

    - #### removeSticky

          public boolean removeSticky(java.lang.String topic)

      The topic will be not sticky anymore Remove the recent sticky topic kept in memory
      参数:
        `topic` - sticky topic to remove

    - #### publish

          public boolean publish(BusClient.Multipart multipart)

    - #### call

          public BusClient.RPCResult call(java.lang.String url)

    - #### call

          public BusClient.RPCResult call(java.lang.String url,
                                          java.util.List<java.lang.String> args)

    - #### call

          public BusClient.RPCResult call(java.lang.String url,
                                          java.lang.String... args)

    - #### call

          public BusClient.RPCResult call(java.lang.String url,
                                          byte[]... args)

    - #### dump

          public void dump(java.io.PrintWriter pw)

    - #### spin

          public void spin(BusClient.Handler handler)

    - #### setTimer

          public long setTimer(java.lang.Runnable runnable,
                               long timeout)

    - #### killTimer

          public void killTimer(long id)

    - #### interrupt

          public void interrupt()

    - #### acall

          public java.util.concurrent.Future<BusClient.RPCResult> acall(java.lang.String url,
                                                                        java.lang.String... args)

      已过时。
      only for instrumentation test