public class MongoPlugin extends ExtendedJavaPlugin implements MongoProvider
| Constructor and Description |
|---|
MongoPlugin() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
enable() |
HelperMongo |
getDataSource()
Gets the global datasource.
|
HelperMongo |
getDataSource(MongoDatabaseCredentials credentials)
Constructs a new datasource using the given credentials.
|
MongoDatabaseCredentials |
getGlobalCredentials()
Gets the global database credentials being used for the global datasource.
|
bind, bindComposite, bindRunnable, disable, getBundledFile, getClassloader, getPlugin, getService, load, loadConfig, loadConfigNode, onDisable, onEnable, onLoad, provideService, provideService, registerCommand, registerListenergetClassLoader, getCommand, getConfig, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitprotected void enable()
enable in class ExtendedJavaPlugin@Nonnull public HelperMongo getDataSource()
MongoProvidergetDataSource in interface MongoProvider@Nonnull public HelperMongo getDataSource(@Nonnull MongoDatabaseCredentials credentials)
MongoProviderThese instances are not cached, and a new datasource is created each time this method is called.
getDataSource in interface MongoProvidercredentials - the credentials for the database@Nonnull public MongoDatabaseCredentials getGlobalCredentials()
MongoProvidergetGlobalCredentials in interface MongoProviderCopyright © 2017. All rights reserved.