private String[] mungeArguments(String originalArgs[]) { if (originalArgs == null) return new String[0]; final List l = new ArrayList(); for (int i = 0; i < originalArgs.length; i++) if (!originalArgs[i].equals("-pdelaunch")) // $NON-NLS-1$ l.add(originalArgs[i]); return (String[]) l.toArray(new String[] {}); }
protected void setupServerFromConfig(List connectors) throws IOException, IDCreateException { for (final Iterator i = connectors.iterator(); i.hasNext(); ) { final Connector connector = (Connector) i.next(); final String hostname = connector.getHostname(); final int port = connector.getPort(); final String hostnamePort = hostname + ":" + port; // $NON-NLS-1$ SSLServerSOContainerGroup serverGroup = null; synchronized (serverGroups) { serverGroup = (SSLServerSOContainerGroup) serverGroups.get(hostnamePort); if (serverGroup == null) { System.out.println( "Putting server " + hostnamePort + " on the air..."); // $NON-NLS-1$ //$NON-NLS-2$ serverGroup = new SSLServerSOContainerGroup(hostname, port); final List groups = connector.getGroups(); for (final Iterator g = groups.iterator(); g.hasNext(); ) { final NamedGroup group = (NamedGroup) g.next(); // Create final SSLServerSOContainer container = createServerContainer( group.getIDForGroup(), serverGroup, group.getName(), connector.getTimeout()); // Configure configureServerContainer(container); } serverGroup.putOnTheAir(); serverGroups.put(hostnamePort, serverGroup); System.out.println( "GenericServerContainer " + hostnamePort //$NON-NLS-1$ + " on the air."); //$NON-NLS-1$ } else { System.out.println( "GenericServerContainer " + hostnamePort //$NON-NLS-1$ + " already on the air. No changes made."); //$NON-NLS-1$ } } } }