if (config.getBoolean("clustering.enable")) {
int port = PortUtil.getPort("clustering.rpc.crawler");
nodeListener = new NodeListener(port, config);
MonitorModule.addModuleListener(nodeListener, new CrawlerMonitoredNode(this));
ControllerModule.addModuleListener(nodeListener, new ControllableImplementation());
nodeListener.addModuleListener("crawlerControl", new CrawlerControllableImplementation());
DeployModule.addModuleListener(nodeListener, new DeployListenerImplementation());
nodeListener.start();
}
}