public class SessionFactory
extends java.lang.Object
SessionFactory xFactory = new SessionFactory();Sessionsession1 = xFactory.getSession("mysqlx://[user1[:pwd1]@]host1[:port1]/db");Sessionsession2 = xFactory.getSession("mysqlx://host2[:port2]/db?user=user2&password=pwd2");Sessionsession3 = xFactory.getSession("mysqlx+srv://[user1[:pwd1]@]service_name/db");
| Constructor and Description |
|---|
SessionFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected Session |
getSession(ConnectionUrl connUrl)
Creates
Session by given URL. |
Session |
getSession(java.util.Properties properties)
Creates a
Session using the information contained in the given properties. |
Session |
getSession(java.lang.String url)
Creates
Session by given URL. |
protected ConnectionUrl |
parseUrl(java.lang.String url)
Parses the connection string URL.
|
protected ConnectionUrl parseUrl(java.lang.String url)
url - the connection string URL.ConnectionUrl instance containing the URL components.protected Session getSession(ConnectionUrl connUrl)
Session by given URL.connUrl - the session ConnectionUrl.Session instance.public Session getSession(java.lang.String url)
Session by given URL.url - the session URL.Session instance.