All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.backendless.rt.RTClientFactory Maven / Gradle / Ivy

The newest version!
package com.backendless.rt;


@Deprecated
public class RTClientFactory
{
  private static final RTClientFactory instance = new RTClientFactory();

  public static RTClientFactory getInstance()
  {
    return instance;
  }

  private final RTClient rtClient;

  private RTClientFactory()
  {
    boolean socketIoPresent;
    try
    {
      RTClientFactory.class.getClassLoader().loadClass( "io.socket.emitter.Emitter" );
      socketIoPresent = true;
    }
    catch( ClassNotFoundException e )
    {
      socketIoPresent = false;
    }

    if( socketIoPresent )
      rtClient = new AsynRTClient();
    else
      rtClient = new RTClientWithoutSocketIO();
  }

  public RTClient get()
  {
    return rtClient;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy