Package omero.gateway

Class LoginCredentials

  • Direct Known Subclasses:
    JoinSessionCredentials

    public class LoginCredentials
    extends java.lang.Object
    Holds all necessary information needed for connecting to an OMERO server
    Since:
    5.1
    • Constructor Summary

      Constructors 
      Constructor Description
      LoginCredentials()
      Creates a new instance
      LoginCredentials​(java.lang.String[] args)
      Creates a new instance.
      LoginCredentials​(java.lang.String username, java.lang.String password, java.lang.String host)
      Creates a new instance with the given credentials and default port
      LoginCredentials​(java.lang.String username, java.lang.String password, java.lang.String host, int port)
      Creates a new instance with the given credentials
    • Constructor Detail

      • LoginCredentials

        public LoginCredentials()
        Creates a new instance
      • LoginCredentials

        public LoginCredentials​(java.lang.String[] args)
        Creates a new instance.
        Parameters:
        args - The connection arguments. Note: When using this constructor the '#' character has to be escaped with a backslash!
      • LoginCredentials

        public LoginCredentials​(java.lang.String username,
                                java.lang.String password,
                                java.lang.String host)
        Creates a new instance with the given credentials and default port
        Parameters:
        username - The username or alternatively a session ID (in which case the password will be ignored)
        password - The password
        host - The server hostname or websocket URL
      • LoginCredentials

        public LoginCredentials​(java.lang.String username,
                                java.lang.String password,
                                java.lang.String host,
                                int port)
        Creates a new instance with the given credentials
        Parameters:
        username - The username or alternatively a session ID (in which case the password will be ignored)
        password - The password
        host - The server hostname or websocket URL
        port - The server port
    • Method Detail

      • getArguments

        public java.util.List<java.lang.String> getArguments()
        Returns the arguments if set as a read-only list.
        Returns:
        See above.
      • isEncryption

        public boolean isEncryption()
        Returns:
        If encryption is enabled
      • setEncryption

        public void setEncryption​(boolean encryption)
        Enable/Disable encryption
        Parameters:
        encryption - See above
      • isCheckNetwork

        public boolean isCheckNetwork()
        Returns:
        If network checks should be performed
      • setCheckNetwork

        public void setCheckNetwork​(boolean checkNetwork)
        Enable/Disable network checks
        Parameters:
        checkNetwork - See above
      • getCompression

        public float getCompression()
        Returns the compression level.
        Returns:
        The compression level
      • setCompression

        public void setCompression​(float compression)
        Sets the compression level
        Parameters:
        compression - See above
      • getApplicationName

        public java.lang.String getApplicationName()
        Returns:
        The application name
      • setApplicationName

        public void setApplicationName​(java.lang.String applicationName)
        Set the application name
        Parameters:
        applicationName - See above
      • getGroupID

        public long getGroupID()
        Returns the OMERO group identifier.
        Returns:
        The groupID to use for the connection
      • setGroupID

        public void setGroupID​(long groupID)
        Sets the groupID to use for the connection
        Parameters:
        groupID - The group id
      • getCheckVersion

        public boolean getCheckVersion()
        Returns whether the version check is enabled
        Returns:
        whether the version check is enabled
      • setCheckVersion

        public void setCheckVersion​(boolean checkVersion)
        Enable/Disable version check
        Parameters:
        checkVersion - Whether to check the client and server versions are compatible