ServerGroup.java revision bee2440354b4bc8796e1de0b6cbd60e1f68deba0
/*
* 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: ServerGroup.java,v 1.5 2009/01/28 05:34:49 ww203982 Exp $
*
* Portions Copyrighted 2011-2015 ForgeRock AS.
*/
public class ServerGroup implements ParseOutput {
/**
* Not to be called. This is a method to be called by the parser to read the
* xml information.
*/
public void process(
) throws XMLException {
}
// get the group ID.
// Get the Servers
}
.message("Initializing servers list.");
}
}
}
} else if (obj instanceof GenericNode) {
// if it is generic node, its probably the base dn.
throw new XMLException(
+ x._pcdata);
}
}
if (miscConfig == null) {
miscConfig = new HashMap();
}
}
}
}
}
errorMsg = "No server object found in the server group:"
+ groupName;
}
errorMsg = "No base DN string defined in the server group:"
+ groupName;
}
throw new XMLException(errorMsg);
}
// Get the rest of the attributes
if (maxConnPoolStr == null)
if (minConnPoolStr == null)
try {
} catch (NumberFormatException ex) {
maxConnPool = 10;
}
try {
} catch (NumberFormatException ex) {
minConnPool = 1;
}
if (ldapHeartbeatStr == null)
try {
} catch (NumberFormatException ex) {
ldapHeartbeat = 10;
}
} else {
throw new XMLException(DSConfigMgr
}
// Put it in the list of groups.
}
/**
* Get the server instance that's currently active.
*
* @param authType
* Defined in LDAPUser.java there are four types of users.
* @return ServerInstance The active instance is returned. If no instance is
* active, null is returned.
* @see LDAPUser.Type
*/
break;
}
}
break;
}
}
}
return null;
}
public String serverGroupName() {
return groupName;
}
}
}
}
/**
* The list of servers that are defined in this server group.
*/
return servers;
}
public int getLdapHeartbeat() {
return ldapHeartbeat;
}
int maxConnPool = -1;
int minConnPool = -1;
private int ldapHeartbeat;
}