Class Proxy

java.lang.Object
com.lightstreamer.client.Proxy

public class Proxy extends Object
Simple class representing a Proxy configuration.
An instance of this class can be used through ConnectionOptions.setProxy(Proxy) to instruct a LightstreamerClient to connect to the Lightstreamer Server passing through a proxy.
  • Constructor Details

    • Proxy

      public Proxy(@Nonnull String type, @Nonnull String host, int port)
      This constructor will call Proxy(String, String, int, String, String) specifying null user and null password.
      Parameters:
      type - the proxy type. Supported values are HTTP, SOCKS4 and SOCKS5.
      host - the proxy host
      port - the proxy port
    • Proxy

      public Proxy(@Nonnull String type, @Nonnull String host, int port, @Nullable String user)
      This constructor will call Proxy(String, String, int, String, String) specifying a null null password.
      Parameters:
      type - the proxy type. Supported values are HTTP, SOCKS4 and SOCKS5.
      host - the proxy host
      port - the proxy port
      user - the user name to be used to validate against the proxy
    • Proxy

      public Proxy(@Nonnull String type, @Nonnull String host, int port, @Nullable String user, @Nullable String password)
      Creates a Proxy instance containing all the information required by the LightstreamerClient to connect to a Lightstreamer server passing through a proxy.
      Once created the Proxy instance has to be passed to the LightstreamerClient.connectionOptions instance using the ConnectionOptions.setProxy(Proxy) method.

      Note: user and password are ignored. If authentication is required by the proxy in use it is necessary to replace the default java Authenticator with a custom one containing the necessary logic to authenticate the user against the proxy.
      Parameters:
      type - the proxy type. Supported values are HTTP, SOCKS4 and SOCKS5.
      host - the proxy host
      port - the proxy port
      user - the user name to be used to validate against the proxy
      password - the password to be used to validate against the proxy
  • Method Details