Class RTTComms

java.lang.Object
com.bitheads.braincloud.comms.RTTComms
All Implemented Interfaces:
IServerCallback

public class RTTComms
extends Object
implements IServerCallback
  • Constructor Details

  • Method Details

    • enableRTT

      public void enableRTT​(IRTTConnectCallback callback, boolean useWebSocket)
    • disableRTT

      public void disableRTT()
    • isRTTEnabled

      public boolean isRTTEnabled()
      Returns true if RTT is enabled
      Returns:
      True if RTT is enabled
    • getConnectionStatus

      public RTTComms.RttConnectionStatus getConnectionStatus()
    • getLoggingEnabled

      public boolean getLoggingEnabled()
    • getConnectionId

      public String getConnectionId()
    • enableLogging

      public void enableLogging​(boolean isEnabled)
    • runCallbacks

      public void runCallbacks()
    • serverCallback

      public void serverCallback​(ServiceName serviceName, ServiceOperation serviceOperation, org.json.JSONObject jsonData)
      Description copied from interface: IServerCallback
      The serverCallback() method returns server data back to the layer interfacing with the BrainCloud library.
      Specified by:
      serverCallback in interface IServerCallback
      Parameters:
      serviceName - - name of the requested service
      serviceOperation - - requested operation
      jsonData - - returned data from the server
    • serverError

      public void serverError​(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
      Description copied from interface: IServerCallback
      Errors are returned back to the layer which is interfacing with the BrainCloud library through the serverError() callback. A server error might indicate a failure of the client to communicate with the server after N retries.
      Specified by:
      serverError in interface IServerCallback
      Parameters:
      serviceName - - name of the requested service
      serviceOperation - - requested operation
      statusCode - The error status return code (400, 403, 500, etc)
      reasonCode - The brainCloud reason code (see reason codes on apidocs site)
      jsonError - The error json string
    • registerRTTCallback

      public void registerRTTCallback​(String serviceName, IRTTCallback callback)
    • deregisterRTTCallback

      public void deregisterRTTCallback​(String serviceName)
    • deregisterAllCallbacks

      public void deregisterAllCallbacks()