Search in sources :

Example 1 with MessageHandler

use of com.baidu.hugegraph.computer.core.network.MessageHandler in project hugegraph-computer by hugegraph.

the class ConnectionManagerTest method setup.

@Before
public void setup() {
    Config config = UnitTestBase.updateWithRequiredOptions(ComputerOptions.TRANSPORT_SERVER_HOST, "127.0.0.1", ComputerOptions.TRANSPORT_IO_MODE, "NIO");
    MessageHandler serverHandler = new MockMessageHandler();
    ClientHandler clientHandler = new MockClientHandler();
    connectionManager = new TransportConnectionManager();
    port = connectionManager.startServer(config, serverHandler);
    connectionManager.initClientManager(config, clientHandler);
}
Also used : MockMessageHandler(com.baidu.hugegraph.computer.core.network.MockMessageHandler) MockMessageHandler(com.baidu.hugegraph.computer.core.network.MockMessageHandler) MessageHandler(com.baidu.hugegraph.computer.core.network.MessageHandler) Config(com.baidu.hugegraph.computer.core.config.Config) MockClientHandler(com.baidu.hugegraph.computer.core.network.MockClientHandler) ClientHandler(com.baidu.hugegraph.computer.core.network.ClientHandler) MockClientHandler(com.baidu.hugegraph.computer.core.network.MockClientHandler) Before(org.junit.Before)

Aggregations

Config (com.baidu.hugegraph.computer.core.config.Config)1 ClientHandler (com.baidu.hugegraph.computer.core.network.ClientHandler)1 MessageHandler (com.baidu.hugegraph.computer.core.network.MessageHandler)1 MockClientHandler (com.baidu.hugegraph.computer.core.network.MockClientHandler)1 MockMessageHandler (com.baidu.hugegraph.computer.core.network.MockMessageHandler)1 Before (org.junit.Before)1