Package io.rong.imlib

## Class IRongCoreCallback.ConnectCallback

- All Implemented Interfaces:

      public abstract class IRongCoreCallback.ConnectCallback

  连接服务器回调类。

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `IRongCoreCallback.ConnectCallback()` |

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract void` | `onSuccess(String t)` | 成功时回调。
    `abstract void` | `onError(IRongCoreEnum.ConnectionErrorCode e)` | 错误时回调。
    `abstract void` | `onDatabaseOpened(IRongCoreEnum.DatabaseOpenStatus code)` | 两个 onDatabaseOpened 二选一即可。
    `void` | `onDatabaseOpened(IRongCoreEnum.DatabaseOpenStatus code, boolean recreate)` | 两个 onDatabaseOpened 二选一即可。

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### IRongCoreCallback.ConnectCallback

          IRongCoreCallback.ConnectCallback()

  - ### Method Detail

    - #### onSuccess

           abstract void onSuccess(String t)

      成功时回调。

      Parameters:
        `t` - 已声明的类型。

    - #### onError

           abstract void onError(IRongCoreEnum.ConnectionErrorCode e)

      错误时回调。

      Parameters:
        `e` - 连接建立失败的回调，触发该回调代表 SDK 无法继续重连 [e: 连接失败的错误码]。

    - #### onDatabaseOpened

           abstract void onDatabaseOpened(IRongCoreEnum.DatabaseOpenStatus code)

      两个 onDatabaseOpened 二选一即可。

    - #### onDatabaseOpened

           void onDatabaseOpened(IRongCoreEnum.DatabaseOpenStatus code, boolean recreate)

      两个 onDatabaseOpened 二选一即可。