Class Proxy


  • public class Proxy
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      Proxy​(java.lang.String type, java.lang.String host, int port)
      This constructor will call Proxy(String, String, int, String, String) specifying null user and null password.
      Proxy​(java.lang.String type, java.lang.String host, int port, java.lang.String user)
      This constructor will call Proxy(String, String, int, String, String) specifying a null null password.
      Proxy​(java.lang.String type, java.lang.String host, int port, java.lang.String user, java.lang.String password)
      Creates a Proxy instance containing all the information required by the LightstreamerClient to connect to a Lightstreamer server passing through a proxy.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Proxy

        public Proxy​(@Nonnull
                     java.lang.String type,
                     @Nonnull
                     java.lang.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
        host - the proxy host
        port - the proxy port
      • Proxy

        public Proxy​(@Nonnull
                     java.lang.String type,
                     @Nonnull
                     java.lang.String host,
                     int port,
                     @Nullable
                     java.lang.String user)
        This constructor will call Proxy(String, String, int, String, String) specifying a null null password.
        Parameters:
        type - the proxy type
        host - the proxy host
        port - the proxy port
        user - the user name to be used to validate against the proxy
      • Proxy

        public Proxy​(@Nonnull
                     java.lang.String type,
                     @Nonnull
                     java.lang.String host,
                     int port,
                     @Nullable
                     java.lang.String user,
                     @Nullable
                     java.lang.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
        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 Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object