Class ConnectionInfos
java.lang.Object
br.net.dd.netherwingcore.database.common.ConnectionInfos
The
ConnectionInfos class is responsible for parsing and storing
database connection information from a formatted string.
The connection information string should be formatted as follows:
host;portOrSocket;user;password;database[;ssl]
where the SSL parameter is optional.
This class provides getter methods to access individual components of the connection information.
-
Constructor Summary
ConstructorsConstructorDescriptionConnectionInfos(String infoString) Constructs aConnectionInfosobject by parsing the provided connection information string. -
Method Summary
Modifier and TypeMethodDescriptionReturns the database name for the connection.getHost()Returns the host for the database connection.Returns the password for the database connection.Returns the port or socket for the database connection.getSsl()Returns the SSL configuration for the database connection, if provided.getUser()Returns the username for the database connection.toString()
-
Constructor Details
-
ConnectionInfos
Constructs aConnectionInfosobject by parsing the provided connection information string.- Parameters:
infoString- the connection information string to parse
-
-
Method Details
-
getUser
-
getPassword
-
getDatabase
Returns the database name for the connection.- Returns:
- the database name
-
getHost
-
getPortOrSocket
Returns the port or socket for the database connection.- Returns:
- the port or socket
-
getSsl
Returns the SSL configuration for the database connection, if provided.- Returns:
- the SSL configuration, or
nullif not provided
-
toString
-