public List<HostAndPort> getAdminAddresses() { if (adminAddresses == null || adminAddresses.isEmpty()) { String[] listenerNames = getListenerNamesForVS(DEFAULT_ADMIN_VS_ID, vsAttributes); if (listenerNames == null || listenerNames.length == 0) { listenerNames = getListenerNamesForVS(DEFAULT_VS_ID, vsAttributes); //plan B } addPortsForListeners(listenerNames); } return adminAddresses; }
public List<HostAndPort> getAdminAddresses() { if (adminAddresses == null || adminAddresses.isEmpty()) { String[] listenerNames = getListenerNamesForVS(DEFAULT_ADMIN_VS_ID, vsAttributes); if (listenerNames == null || listenerNames.length == 0) { listenerNames = getListenerNamesForVS(DEFAULT_VS_ID, vsAttributes); //plan B } addPortsForListeners(listenerNames); } return adminAddresses; }
public List<HostAndPort> getAdminAddresses() { if (adminAddresses == null || adminAddresses.isEmpty()) { String[] listenerNames = getListenerNamesForVS(DEFAULT_ADMIN_VS_ID, vsAttributes); if (listenerNames == null || listenerNames.length == 0) { listenerNames = getListenerNamesForVS(DEFAULT_VS_ID, vsAttributes); //plan B } addPortsForListeners(listenerNames); } return adminAddresses; }
private void parseHttpService() throws XMLStreamException, EndDocumentException { // cursor --> <http-service> in <config> // we are looking for the virtual server: "DEFAULT_ADMIN_VS_ID". // inside it will be a ref. to a listener. We get the port from the listener. // So -- squirrel away a copy of all the listeners and all the virt. servers -- //then post-process. // Load the collections with both kinds of elements' attributes while (true) { skipToButNotPast("http-service", "http-listener", "virtual-server"); String name = parser.getLocalName(); if ("http-listener".equals(name)) { listenerAttributes.add(parseAttributes()); } else if ("virtual-server".equals(name)) { vsAttributes.add(parseAttributes()); } else if ("http-service".equals(name)) { break; } } String[] listenerNames = getListenerNamesForVS(DEFAULT_ADMIN_VS_ID, vsAttributes); if (listenerNames == null || listenerNames.length == 0) { listenerNames = getListenerNamesForVS(DEFAULT_VS_ID, vsAttributes); //plan B } if (listenerNames == null || listenerNames.length <= 0) { return; // can not find ports } addPortsForListeners(listenerNames); }
private void parseHttpService() throws XMLStreamException, EndDocumentException { // cursor --> <http-service> in <config> // we are looking for the virtual server: "DEFAULT_ADMIN_VS_ID". // inside it will be a ref. to a listener. We get the port from the listener. // So -- squirrel away a copy of all the listeners and all the virt. servers -- //then post-process. // Load the collections with both kinds of elements' attributes while (true) { skipToButNotPast("http-service", "http-listener", "virtual-server"); String name = parser.getLocalName(); if ("http-listener".equals(name)) { listenerAttributes.add(parseAttributes()); } else if ("virtual-server".equals(name)) { vsAttributes.add(parseAttributes()); } else if ("http-service".equals(name)) { break; } } String[] listenerNames = getListenerNamesForVS(DEFAULT_ADMIN_VS_ID, vsAttributes); if (listenerNames == null || listenerNames.length == 0) { listenerNames = getListenerNamesForVS(DEFAULT_VS_ID, vsAttributes); //plan B } if (listenerNames == null || listenerNames.length <= 0) { return; // can not find ports } addPortsForListeners(listenerNames); }
private void parseHttpService() throws XMLStreamException, EndDocumentException { // cursor --> <http-service> in <config> // we are looking for the virtual server: "DEFAULT_ADMIN_VS_ID". // inside it will be a ref. to a listener. We get the port from the listener. // So -- squirrel away a copy of all the listeners and all the virt. servers -- //then post-process. // Load the collections with both kinds of elements' attributes while (true) { skipToButNotPast("http-service", "http-listener", "virtual-server"); String name = parser.getLocalName(); if ("http-listener".equals(name)) { listenerAttributes.add(parseAttributes()); } else if ("virtual-server".equals(name)) { vsAttributes.add(parseAttributes()); } else if ("http-service".equals(name)) { break; } } String[] listenerNames = getListenerNamesForVS(DEFAULT_ADMIN_VS_ID, vsAttributes); if (listenerNames == null || listenerNames.length == 0) { listenerNames = getListenerNamesForVS(DEFAULT_VS_ID, vsAttributes); //plan B } if (listenerNames == null || listenerNames.length <= 0) { return; // can not find ports } addPortsForListeners(listenerNames); }