@Override public ServerGroupsDocument parse(InputStream in2) throws Exception { return ServerGroupsDocument.Factory.parse(in2); } });
@Override public GroupnameIdMapDocument parse(InputStream in2) throws Exception { return GroupnameIdMapDocument.Factory .parse(in2); } });
private int getGroupCount() throws ConfigurationSetupException { return getServerGroupsFromL2().getServerGroups().getServerGroupArray().length; }
protected void addServerGroup(ServerGroups serverGroups, ActiveServerGroupConfig activeServerGroupConfig) { ServerGroup group = serverGroups.addNewServerGroup(); group.setGroupName(activeServerGroupConfig.getGroupName()); String[] members = activeServerGroupConfig.getMembers(); for (String member : members) { ServerInfo serverInfo = group.addNewServerInfo(); serverInfo.setTsaPort(new BigInteger(serverNameToTsaPort.get(member).intValue() + "")); serverInfo.setName(serverNameToHostName.get(member)); } }
@Override protected synchronized void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { L2ConfigurationSetupManager configSetupManager = (L2ConfigurationSetupManager) getServletContext() .getAttribute(GROUPID_MAP_ATTRIBUTE); List<ActiveServerGroupConfig> activeServerGroupConfigs = configSetupManager.activeServerGroupsConfig() .getActiveServerGroups(); GroupnameIdMapDocument groupnameIdMapDocument = GroupnameIdMapDocument.Factory.newInstance(); GroupnameIdMap groupnameIdMap = groupnameIdMapDocument.addNewGroupnameIdMap(); for (ActiveServerGroupConfig group : activeServerGroupConfigs) { GroupnameId groupnameId = groupnameIdMap.addNewGroupnameId(); groupnameId.setName(group.getGroupName()); groupnameId.setGid(new BigInteger(String.valueOf(group.getGroupId().toInt()))); } OutputStream out = response.getOutputStream(); IOUtils.copy(groupnameIdMapDocument.newInputStream(), out); response.flushBuffer(); } }
private void createDocumentToSend() { configSetupManager = getConfigurationManager(); serverGroupsDocument = ServerGroupsDocument.Factory.newInstance(); createServerNameToTsaPortAndHostname(); ServerGroups serverGroups = serverGroupsDocument.addNewServerGroups(); List<ActiveServerGroupConfig> activeServerGroupConfigs = configSetupManager.activeServerGroupsConfig() .getActiveServerGroups(); for (ActiveServerGroupConfig activeServerGroupConfig : activeServerGroupConfigs) { addServerGroup(serverGroups, activeServerGroupConfig); } }
@Override protected synchronized void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { createDocumentToSend(); OutputStream out = getOutPutStream(response); IOUtils.copy(this.serverGroupsDocument.newInputStream(), out); response.flushBuffer(); }
protected void addServerGroup(ServerGroups serverGroups, ActiveServerGroupConfig activeServerGroupConfig) { ServerGroup group = serverGroups.addNewServerGroup(); group.setGroupName(activeServerGroupConfig.getGroupName()); String[] members = activeServerGroupConfig.getMembers(); for (String member : members) { ServerInfo serverInfo = group.addNewServerInfo(); serverInfo.setTsaPort(new BigInteger(serverNameToTsaPort.get(member).intValue() + "")); serverInfo.setName(serverNameToHostName.get(member)); } }
@Override protected synchronized void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { L2ConfigurationSetupManager configSetupManager = (L2ConfigurationSetupManager) getServletContext() .getAttribute(GROUPID_MAP_ATTRIBUTE); List<ActiveServerGroupConfig> activeServerGroupConfigs = configSetupManager.activeServerGroupsConfig() .getActiveServerGroups(); GroupnameIdMapDocument groupnameIdMapDocument = GroupnameIdMapDocument.Factory.newInstance(); GroupnameIdMap groupnameIdMap = groupnameIdMapDocument.addNewGroupnameIdMap(); for (ActiveServerGroupConfig group : activeServerGroupConfigs) { GroupnameId groupnameId = groupnameIdMap.addNewGroupnameId(); groupnameId.setName(group.getGroupName()); groupnameId.setGid(new BigInteger(String.valueOf(group.getGroupId().toInt()))); } OutputStream out = response.getOutputStream(); IOUtils.copy(groupnameIdMapDocument.newInputStream(), out); response.flushBuffer(); } }
private int getGroupCount() throws ConfigurationSetupException { return getServerGroupsFromL2().getServerGroups().getServerGroupArray().length; }
private void createDocumentToSend() { configSetupManager = getConfigurationManager(); serverGroupsDocument = ServerGroupsDocument.Factory.newInstance(); createServerNameToTsaPortAndHostname(); ServerGroups serverGroups = serverGroupsDocument.addNewServerGroups(); List<ActiveServerGroupConfig> activeServerGroupConfigs = configSetupManager.activeServerGroupsConfig() .getActiveServerGroups(); for (ActiveServerGroupConfig activeServerGroupConfig : activeServerGroupConfigs) { addServerGroup(serverGroups, activeServerGroupConfig); } }
@Override public ServerGroupsDocument parse(InputStream in2) throws Exception { return ServerGroupsDocument.Factory.parse(in2); } });
@Override public GroupnameIdMapDocument parse(InputStream in2) throws Exception { return GroupnameIdMapDocument.Factory .parse(in2); } });
@Override protected synchronized void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { createDocumentToSend(); OutputStream out = getOutPutStream(response); IOUtils.copy(this.serverGroupsDocument.newInputStream(), out); response.flushBuffer(); }
protected void addServerGroup(ServerGroups serverGroups, ActiveServerGroupConfig activeServerGroupConfig) { ServerGroup group = serverGroups.addNewServerGroup(); group.setGroupName(activeServerGroupConfig.getGroupName()); String[] members = activeServerGroupConfig.getMembers(); for (String member : members) { ServerInfo serverInfo = group.addNewServerInfo(); serverInfo.setTsaPort(new BigInteger(serverNameToTsaPort.get(member).intValue() + "")); serverInfo.setName(serverNameToHostName.get(member)); } }
private int getGroupCount() throws ConfigurationSetupException { return getServerGroupsFromL2().getServerGroups().getServerGroupArray().length; }
private void createDocumentToSend() { configSetupManager = getConfigurationManager(); serverGroupsDocument = ServerGroupsDocument.Factory.newInstance(); createServerNameToTsaPortAndHostname(); ServerGroups serverGroups = serverGroupsDocument.addNewServerGroups(); List<ActiveServerGroupConfig> activeServerGroupConfigs = configSetupManager.activeServerGroupsConfig() .getActiveServerGroups(); for (ActiveServerGroupConfig activeServerGroupConfig : activeServerGroupConfigs) { addServerGroup(serverGroups, activeServerGroupConfig); } }
@Override public ServerGroupsDocument parse(InputStream in2) throws Exception { return ServerGroupsDocument.Factory.parse(in2); } });
@Override public GroupnameIdMapDocument parse(InputStream in2) throws Exception { return GroupnameIdMapDocument.Factory .parse(in2); } });
@Override protected synchronized void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { createDocumentToSend(); OutputStream out = getOutPutStream(response); IOUtils.copy(this.serverGroupsDocument.newInputStream(), out); response.flushBuffer(); }