@Override public Object run(HttpService param) { param.getHttpListener().remove(param.getHttpListenerById(listener.getId())); return null; } }, currentConfig.getHttpService());
@Deprecated public static HttpListener getHttpListenerById(HttpService target, String id) { for (HttpListener v : target.getHttpListener()) { if (v.getId().equals(id)) { return v; } } return null; } }
private void processHttpListeners() throws TransactionFailure { if (!currentConfig.getHttpService().getHttpListener().isEmpty()) { // all changes in this method must be in their own transactions migrateSettings(); } }
@Override public Object run(Protocols param) throws TransactionFailure { for (final HttpListener httpListener : httpService.getHttpListener()) { final Protocol protocol = param.createChild(Protocol.class); param.getProtocol().add(protocol); protocol.setName(httpListener.getId()); final Http http = protocol.createChild(Http.class); http.setFileCache(http.createChild(FileCache.class)); http.setDefaultVirtualServer( httpListener.getId().equals(ASADMIN_LISTENER) ? ASADMIN_VIRTUAL_SERVER : "server"); protocol.setHttp(http); } return null; } }, protocols);
private void migrateHttpListeners(NetworkConfig config) throws TransactionFailure { for (final HttpListener listener : currentConfig.getHttpService().getHttpListener()) { final Protocol protocol = migrateToProtocols(config, listener); final NetworkListener networkListener = createNetworkListener(currentConfig, listener, protocol); if ("ws/tcp".equals(listener.getPropertyValue("proxiedProtocols"))) { createPortUnification(networkListener); ConfigSupport.apply(new SingleConfigCode<NetworkListener>() { @Override public Object run(NetworkListener param) { param.setProtocol("pu-" + networkListener.getName()); return null; } }, networkListener); } ConfigSupport.apply(new SingleConfigCode<HttpService>() { @Override public Object run(HttpService param) { param.getHttpListener().remove(param.getHttpListenerById(listener.getId())); return null; } }, currentConfig.getHttpService()); } }
List<HttpListener> httpListeners = httpSvc.getHttpListener(); checkDuplicate(httpListeners); List<VirtualServer> virtualServers = httpSvc.getVirtualServer();