Class MySQLConnector
java.lang.Object
dev.esophose.playerparticles.database.MySQLConnector
- All Implemented Interfaces:
- DatabaseConnector
public class MySQLConnector extends java.lang.Object implements DatabaseConnector
- 
Nested Class SummaryNested classes/interfaces inherited from interface dev.esophose.playerparticles.database.DatabaseConnectorDatabaseConnector.ConnectionCallback
- 
Constructor SummaryConstructors Constructor Description MySQLConnector(org.bukkit.plugin.Plugin plugin, java.lang.String hostname, int port, java.lang.String database, java.lang.String username, java.lang.String password, boolean useSSL)
- 
Method SummaryModifier and Type Method Description voidcloseConnection()Closes all open connections to the databasevoidconnect(DatabaseConnector.ConnectionCallback callback)Executes a callback with a Connection passed and automatically closes it when finishedbooleanisInitialized()Checks if the connection to the database has been created
- 
Constructor Details- 
MySQLConnectorpublic MySQLConnector(org.bukkit.plugin.Plugin plugin, java.lang.String hostname, int port, java.lang.String database, java.lang.String username, java.lang.String password, boolean useSSL)
 
- 
- 
Method Details- 
isInitializedpublic boolean isInitialized()Description copied from interface:DatabaseConnectorChecks if the connection to the database has been created- Specified by:
- isInitializedin interface- DatabaseConnector
- Returns:
- true if the connection is created, otherwise false
 
- 
closeConnectionpublic void closeConnection()Description copied from interface:DatabaseConnectorCloses all open connections to the database- Specified by:
- closeConnectionin interface- DatabaseConnector
 
- 
connectDescription copied from interface:DatabaseConnectorExecutes a callback with a Connection passed and automatically closes it when finished- Specified by:
- connectin interface- DatabaseConnector
- Parameters:
- callback- The callback to execute once the connection is retrieved
 
 
-