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