private void executeService(Context ctx, SERVICE service) { String ns = service.getNs(); NSHandler handler = registry.lookup(ns); if (handler == null) { LOGGER.error("NS[" + ns + "] not found."); return; } handler.service(ctx, service); }
public synchronized void startup() { if (hydra != null) { return; } if (registry.isEmpty()) { LOGGER.error("Not found NS handler was be registered"); return; } HydraBuilder builder = new HydraBuilder(); builder.bind(host).port(port).messageReceivedListener(this).threads(option.getThreads()); hydra = builder.build(); hydra.startup(); }
public void mappingNS(String packageName) throws Exception { option.setMappingNSPackage(packageName); registry.mappingPackage(packageName); }