8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The contents of this file are subject to the terms
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * of the Common Development and Distribution License
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * (the License). You may not use this file except in
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * compliance with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * You can obtain a copy of the License at
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * See the License for the specific language governing
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * permission and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * When distributing Covered Code, include this CDDL
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Header Notice in each file and include the License file
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * If applicable, add the following below the CDDL Header,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * with the fields enclosed by brackets [] replaced by
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * your own identifying information:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * $Id: Server.java,v 1.3 2008/06/25 05:41:36 qcheng Exp $
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Portions Copyrighted [2011] [ForgeRock AS]
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * This class represents a server. This class holds the server name and the port
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * information.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The constructor to instantiate the server object. The creation interface
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * is only exposed to this package.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Get the server's port.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return The port number.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The server name, as defined in the xml. The package does not do any fqdn
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * conversion or reverse address lookup.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return the server name.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Get the type of the connection to the server.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return Server.Type The connection type to the server.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The server id that's defined in the configuration file. It is good to
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * keep this server id unique within one service. If the same server
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * configuration repeats in another section, use the same server id.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return the server id
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * This method is an implementation of the interface and must be called only
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * by the <code>XMLParser</code> object. This is my final plea. I'm a
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * process not process which can load information from xml file for you. So
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * stop calling me.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster DSConfigMgr.debugger.message("in Server.process()");
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster serverID = (String) atts.get(DSConfigMgr.NAME);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster serverName = (String) atts.get(DSConfigMgr.HOST);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String connTypeStr = (String) atts.get(DSConfigMgr.AUTH_TYPE);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String serverPortStr = (String) atts.get(DSConfigMgr.PORT);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster if (connTypeStr.equalsIgnoreCase(DSConfigMgr.VAL_STYPE_SSL)) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster .getString(IUMSConstants.DSCFG_DIRSERVER_NODE_EXPECTED));
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Set the servers status
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param boolean
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * True if the server is active, false if otherwise.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Get the server's active Status
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return boolean True, if the server is active; false if otherwise.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Some toString functions for dump purposes.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return String the string rep.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster str.append(" Server Port=").append(serverPort);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster // Connection pool parameters
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The user has anonyomous rights.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public static final Type CONN_SIMPLE = new Type(0);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The user is authenticated with a rootdn and password.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public static final Type CONN_SSL = new Type(1);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster return "SIMPLE";
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster return "SSL";
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster return "SIMPLE";