接口 ClientManager

    • 方法详细资料

      • clientConnected

        boolean clientConnected​(java.lang.String clientId,
                                ClientAttributes attributes)
        New client connected.
        参数:
        clientId - new client id
        attributes - client attributes, which can help create client
        返回:
        true if add successfully, otherwise false
      • clientConnected

        boolean clientConnected​(Client client)
        New client connected.
        参数:
        client - new client
        返回:
        true if add successfully, otherwise false
      • syncClientConnected

        boolean syncClientConnected​(java.lang.String clientId,
                                    ClientAttributes attributes)
        New sync client connected.
        参数:
        clientId - synced client id
        attributes - client sync attributes, which can help create sync client
        返回:
        true if add successfully, otherwise false
      • clientDisconnected

        boolean clientDisconnected​(java.lang.String clientId)
        Client disconnected.
        参数:
        clientId - client id
        返回:
        true if remove successfully, otherwise false
      • getClient

        Client getClient​(java.lang.String clientId)
        Get client by id.
        参数:
        clientId - client id
        返回:
        client
      • contains

        boolean contains​(java.lang.String clientId)
        Whether the client id exists.
        参数:
        clientId - client id
        返回:
        client
      • allClientId

        java.util.Collection<java.lang.String> allClientId()
        All client id.
        返回:
        collection of client id
      • isResponsibleClient

        boolean isResponsibleClient​(Client client)
        Whether the client is responsible by current server.
        参数:
        client - client
        返回:
        true if responsible, otherwise false
      • verifyClient

        boolean verifyClient​(DistroClientVerifyInfo verifyData)
        verify client.
        参数:
        verifyData - verify data from remote responsible server
        返回:
        true if client is valid, otherwise is false.