Proxy.java revision 16bdb19cdda5201d272cd6ca5bf876c88493327c
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2009-2010 Sun Microsystems, Inc.
* Portions Copyright 2011-2015 ForgeRock AS.
*/
/**
* An LDAP load balancing proxy which forwards requests to one or more remote
* Directory Servers. This is implementation is very simple and is only intended
* as an example:
* <ul>
* <li>It does not support SSL connections
* <li>It does not support StartTLS
* <li>It does not support Abandon or Cancel requests
* <li>Very basic authentication and authorization support.
* </ul>
* This example takes the following command line parameters:
*
* <pre>
* {@code <listenAddress> <listenPort> <proxyDN> <proxyPassword> <remoteAddress1> <remotePort1>
* [<remoteAddress2> <remotePort2> ...]}
* </pre>
*/
public final class Proxy {
/**
* Main method.
*
* @param args
* The command line arguments: listen address, listen port,
* remote address1, remote port1, remote address2, remote port2,
* ...
*/
+ "proxyDN proxyPassword remoteAddress1 remotePort1 "
+ "remoteAddress2 remotePort2 ...");
}
// Parse command line arguments.
// Create load balancer.
// --- JCite pools ---
proxyPassword.toCharArray()))));
remotePort))));
}
// --- JCite pools ---
// --- JCite load balancer ---
// --- JCite load balancer ---
// --- JCite backend ---
/*
* Create a server connection adapter which will create a new proxy
* backend for each inbound client connection. This is required because
* we need to maintain authorization state between client requests.
*/
throws LdapException {
}
};
// --- JCite backend ---
// --- JCite listener ---
// Create listener.
try {
} catch (final IOException e) {
e.printStackTrace();
} finally {
}
}
// --- JCite listener ---
}
private Proxy() {
// Not used.
}
}