Package omero.gateway
Class LoginCredentials
- java.lang.Object
-
- omero.gateway.LoginCredentials
-
- Direct Known Subclasses:
JoinSessionCredentials
public class LoginCredentials extends java.lang.ObjectHolds all necessary information needed for connecting to an OMERO server- Since:
- 5.1
-
-
Constructor Summary
Constructors Constructor Description LoginCredentials()Creates a new instanceLoginCredentials(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 portLoginCredentials(java.lang.String username, java.lang.String password, java.lang.String host, int port)Creates a new instance with the given credentials
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetApplicationName()java.util.List<java.lang.String>getArguments()Returns the arguments if set as a read-only list.booleangetCheckVersion()Returns whether the version check is enabledfloatgetCompression()Returns the compression level.longgetGroupID()Returns the OMERO group identifier.ServerInformationgetServer()Returns the server information.UserCredentialsgetUser()Returns the credentials.booleanisCheckNetwork()booleanisEncryption()voidsetApplicationName(java.lang.String applicationName)Set the application namevoidsetCheckNetwork(boolean checkNetwork)Enable/Disable network checksvoidsetCheckVersion(boolean checkVersion)Enable/Disable version checkvoidsetCompression(float compression)Sets the compression levelvoidsetEncryption(boolean encryption)Enable/Disable encryptionvoidsetGroupID(long groupID)Sets the groupID to use for the connection
-
-
-
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 passwordhost- 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 passwordhost- The server hostname or websocket URLport- 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
-
getUser
public UserCredentials getUser()
Returns the credentials.- Returns:
- The
UserCredentials
-
getServer
public ServerInformation getServer()
Returns the server information.- Returns:
- The
ServerInformation
-
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
-
-