Search in sources :

Example 1 with OServerNetworkListenerConfiguration

use of com.orientechnologies.orient.server.config.OServerNetworkListenerConfiguration in project orientdb by orientechnologies.

the class OServerShutdownMainTest method startupOServer.

@Before
public void startupOServer() throws Exception {
    OLogManager.instance().setConsoleLevel(Level.OFF.getName());
    prevPassword = System.setProperty("ORIENTDB_ROOT_PASSWORD", "rootPassword");
    prevOrientHome = System.setProperty("ORIENTDB_HOME", "./target/testhome");
    allowJvmShutdownPrev = OGlobalConfiguration.ENVIRONMENT_ALLOW_JVM_SHUTDOWN.getValueAsBoolean();
    OGlobalConfiguration.ENVIRONMENT_ALLOW_JVM_SHUTDOWN.setValue(false);
    OServerConfiguration conf = new OServerConfiguration();
    conf.network = new OServerNetworkConfiguration();
    conf.network.protocols = new ArrayList<OServerNetworkProtocolConfiguration>();
    conf.network.protocols.add(new OServerNetworkProtocolConfiguration("binary", ONetworkProtocolBinary.class.getName()));
    conf.network.protocols.add(new OServerNetworkProtocolConfiguration("http", ONetworkProtocolHttpDb.class.getName()));
    conf.network.listeners = new ArrayList<OServerNetworkListenerConfiguration>();
    conf.network.listeners.add(new OServerNetworkListenerConfiguration());
    server = new OServer(false);
    server.startup(conf);
    server.activate();
    assertThat(server.isActive()).isTrue();
}
Also used : OServerConfiguration(com.orientechnologies.orient.server.config.OServerConfiguration) OServerNetworkConfiguration(com.orientechnologies.orient.server.config.OServerNetworkConfiguration) OServerNetworkListenerConfiguration(com.orientechnologies.orient.server.config.OServerNetworkListenerConfiguration) OServerNetworkProtocolConfiguration(com.orientechnologies.orient.server.config.OServerNetworkProtocolConfiguration) Before(org.junit.Before)

Aggregations

OServerConfiguration (com.orientechnologies.orient.server.config.OServerConfiguration)1 OServerNetworkConfiguration (com.orientechnologies.orient.server.config.OServerNetworkConfiguration)1 OServerNetworkListenerConfiguration (com.orientechnologies.orient.server.config.OServerNetworkListenerConfiguration)1 OServerNetworkProtocolConfiguration (com.orientechnologies.orient.server.config.OServerNetworkProtocolConfiguration)1 Before (org.junit.Before)1