use of com.alibaba.otter.canal.server.embedded.CanalServerWithEmbedded in project canal by alibaba.
the class CanalServerTest method setUp.
@Before
public void setUp() {
CanalServerWithEmbedded embeddedServer = new CanalServerWithEmbedded();
embeddedServer.setCanalInstanceGenerator(destination -> {
Canal canal = buildCanal();
return new CanalInstanceWithManager(canal, FILTER);
});
nettyServer = CanalServerWithNetty.instance();
nettyServer.setEmbeddedServer(embeddedServer);
nettyServer.setPort(1088);
nettyServer.start();
}
use of com.alibaba.otter.canal.server.embedded.CanalServerWithEmbedded in project canal by alibaba.
the class CanalServerWithNettyTest method setUp.
@Before
public void setUp() {
CanalServerWithEmbedded embeddedServer = new CanalServerWithEmbedded();
embeddedServer.setCanalInstanceGenerator(new CanalInstanceGenerator() {
public CanalInstance generate(String destination) {
Canal canal = buildCanal();
return new CanalInstanceWithManager(canal, FILTER);
}
});
nettyServer = CanalServerWithNetty.instance();
nettyServer.setEmbeddedServer(embeddedServer);
nettyServer.setPort(1088);
nettyServer.start();
}
Aggregations