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 OServerPluginManagerprotected booleanprotected booleanprotected OServerConfigurationManagerprotected OServerShutdownHookprotected Date -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivate()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 booleandeinit()voiddropDatabase(String databaseName) booleanexistsDatabase(String databaseName) Get the preferredClassLoaderused to load extensions.<RET extends OServerNetworkListener>
RETgetListenerByProtocol(Class<? extends ONetworkProtocol> iProtocolClass) <RET extends OServerPlugin>
RET<RET extends OServerPlugin>
RETgetPluginByClass(Class<RET> iPluginClass) getVariable(String iName) protected voidprotected List<OServerNetworkListener> initListeners(OServerNetworkConfiguration networkConf) booleanisActive()protected voidOpens all the available server's databases.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
-
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 -
initListeners
protected List<OServerNetworkListener> initListeners(OServerNetworkConfiguration networkConf) 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
-
getConfiguration
-
getNetworkListeners
-
getListenerByProtocol
public <RET extends OServerNetworkListener> RET getListenerByProtocol(Class<? extends ONetworkProtocol> iProtocolClass) -
getPlugins
-
getContextConfiguration
-
getPluginByClass
-
getPlugin
-
getVariable
-
setVariable
-
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
-
createDefaultServerUsers
- Throws:
IOException
-
getPluginManager
-
registerPlugins
protected void registerPlugins() throws InstantiationException, IllegalAccessException, ClassNotFoundException -
getTokenHandler
-
getThreadGroup
-
getDatabases
-
getContext
-
dropDatabase
-
existsDatabase
-
createDatabase
-
listDatabases
-
restore
-
getNodeId
-
getStartedOn
-