Class OServer
java.lang.Object
com.orientechnologies.orient.server.OServer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected OContextConfigurationprotected ODistributedServerManagerprotected OConfigurableHooksManagerprotected List<OServerLifecycleListener>protected ReentrantLockprotected List<OServerNetworkListener>protected Map<String,Class<? extends ONetworkProtocol>> protected Map<String,OServerSocketFactory> protected OServerPluginManagerprotected booleanprotected booleanprotected OServerConfigurationManagerprotected OServerShutdownHookprotected Date -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivate()voidaddTemporaryUser(String iName, String iPassword, String iPermissions) booleanauthenticate(String iUserName, String iPassword, String iResourceToCheck) Authenticate a server user.authenticateUser(String iUserName, String iPassword, String iResourceToCheck) voidcreateDatabase(String databaseName, ODatabaseType type, OrientDBConfig config) protected voidprotected voidprotected booleandeinit()voiddropDatabase(String databaseName) booleanexistsDatabase(String databaseName) booleanexistsStoragePath(String iURL) Get the preferredClassLoaderused to load extensions.<RET extends OServerNetworkListener>
RETgetListenerByProtocol(Class<? extends ONetworkProtocol> iProtocolClass) Map<String,Class<? extends ONetworkProtocol>> <RET extends OServerPlugin>
RET<RET extends OServerPlugin>
RETgetPluginByClass(Class<RET> iPluginClass) getVariable(String iName) protected voidbooleanisActive()protected voidOpens all the available server's databases.protected voidLoad configured storages.protected voidopenDatabase(String database) openDatabase(String iDbUrl, OParsedToken iToken) openDatabase(String iDbUrl, String user, String password) openDatabase(String iDbUrl, String user, String password, ONetworkProtocolData data) protected voidbooleanvoidvoidrestart()voidvoidvoidsetExtensionClassLoader(ClassLoader extensionClassLoader) Set the preferredClassLoaderused to load extensions.voidsetServerRootDirectory(String rootDirectory) setVariable(String iName, Object iValue) booleanshutdown()static OServerstartFromClasspathConfig(String config) static OServerstartFromFileConfig(String config) static OServerstartFromStreamConfig(InputStream config) startup()startup(OServerConfiguration iConfiguration) startup(InputStream iInputStream) void
-
Field Details
-
lock
-
running
protected volatile boolean running -
rejectRequests
protected volatile boolean rejectRequests -
serverCfg
-
contextConfiguration
-
shutdownHook
-
networkProtocols
-
networkSocketFactories
-
networkListeners
-
lifecycleListeners
-
pluginManager
-
hookManager
-
distributedManager
-
startedOn
-
-
Constructor Details
-
OServer
public OServer() -
OServer
public OServer(boolean shutdownEngineOnExit)
-
-
Method Details
-
startFromFileConfig
public static OServer startFromFileConfig(String config) throws ClassNotFoundException, InstantiationException, IOException, IllegalAccessException -
startFromClasspathConfig
public static OServer startFromClasspathConfig(String config) throws ClassNotFoundException, InstantiationException, IOException, IllegalAccessException -
startFromStreamConfig
public static OServer startFromStreamConfig(InputStream config) throws ClassNotFoundException, InstantiationException, IOException, IllegalAccessException -
setExtensionClassLoader
Set the preferredClassLoaderused to load extensions.- Since:
- 2.1
-
getExtensionClassLoader
Get the preferredClassLoaderused to load extensions.- Since:
- 2.1
-
getSecurity
-
isActive
public boolean isActive() -
getClientConnectionManager
-
getHttpSessionManager
-
getPushManager
-
saveConfiguration
- Throws:
IOException
-
restart
public void restart() throws ClassNotFoundException, InvocationTargetException, InstantiationException, NoSuchMethodException, IllegalAccessException, IOException -
getSystemDatabase
-
getServerId
-
startup
- Throws:
OConfigurationException
-
startup
- Throws:
OConfigurationException
-
startup
- Throws:
IOException
-
startup
- Throws:
IOException
-
startup
public OServer startup(OServerConfiguration iConfiguration) throws IllegalArgumentException, SecurityException, IOException -
startupFromConfiguration
- Throws:
IOException
-
activate
public OServer activate() throws ClassNotFoundException, InstantiationException, IllegalAccessException -
removeShutdownHook
public void removeShutdownHook() -
shutdown
public boolean shutdown() -
deinit
protected boolean deinit() -
rejectRequests
public boolean rejectRequests() -
waitForShutdown
public void waitForShutdown() -
getAvailableStorageNames
-
loadDatabases
protected void loadDatabases()Opens all the available server's databases. -
getDatabaseDirectory
-
getServerThreadGroup
-
authenticate
Authenticate a server user.- Parameters:
iUserName- Username to authenticateiPassword- Password in clear- Returns:
- true if authentication is ok, otherwise false
-
authenticateUser
-
existsStoragePath
-
getConfiguration
-
getNetworkProtocols
-
getNetworkListeners
-
getListenerByProtocol
public <RET extends OServerNetworkListener> RET getListenerByProtocol(Class<? extends ONetworkProtocol> iProtocolClass) -
getPlugins
-
getContextConfiguration
-
getPluginByClass
-
getPlugin
-
getVariable
-
setVariable
-
addTemporaryUser
-
registerLifecycleListener
-
unregisterLifecycleListener
-
openDatabase
-
openDatabase
-
openDatabase
public ODatabaseDocumentInternal openDatabase(String iDbUrl, String user, String password, ONetworkProtocolData data) -
openDatabase
-
getDistributedManager
-
setServerRootDirectory
-
initFromConfiguration
protected void initFromConfiguration() -
getHookManager
-
loadUsers
- Throws:
IOException
-
loadStorages
protected void loadStorages()Load configured storages. -
createDefaultServerUsers
- Throws:
IOException
-
getPluginManager
-
registerPlugins
protected void registerPlugins() throws InstantiationException, IllegalAccessException, ClassNotFoundException -
defaultSettings
protected void defaultSettings() -
getTokenHandler
-
getThreadGroup
-
getDatabases
-
getContext
-
dropDatabase
-
existsDatabase
-
createDatabase
-
listDatabases
-
restore
-
getStartedOn
-