Package com.unboundid.ldap.listener

Examples of com.unboundid.ldap.listener.InMemoryListenerConfig


    public static InMemoryDirectoryServer startServer(final int port,
                                                      final String baseDN,
                                                      final String authDN,
                                                      final String authPassword,
                                                      final String ldifFile) throws LDAPException, IOException {
        final InMemoryListenerConfig listenerConfig = InMemoryListenerConfig.createLDAPConfig("default", port);
        final InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(new DN(baseDN));
        config.setListenerConfigs(listenerConfig);
        config.addAdditionalBindCredentials(authDN, authPassword);
        final InMemoryDirectoryServer server = new InMemoryDirectoryServer(config);
        server.add(new Entry(baseDN, new Attribute("objectclass", "domain", "top")));
View Full Code Here


     * @return The {@link InMemoryDirectoryServer} object.
     * @throws LDAPException If there was a problem configuring or starting the embedded LDAP directory server.
     * @throws IOException   If there was a problem reading the LDIF data.
     */
    private InMemoryDirectoryServer startServer() throws LDAPException, IOException {
        final InMemoryListenerConfig listenerConfig = InMemoryListenerConfig.createLDAPConfig("default", annotation.port());
        final InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(new DN(annotation.baseDN()));
        config.setListenerConfigs(listenerConfig);
        config.addAdditionalBindCredentials(annotation.authDN(), annotation.authPassword());
        final InMemoryDirectoryServer server = new InMemoryDirectoryServer(config);
        server.add(new Entry(annotation.baseDN(), new Attribute("objectclass", "domain", "top")));
View Full Code Here

                                                      final String baseDN,
                                                      final String authDN,
                                                      final String authPassword,
                                                      final String[] ldifFiles)
            throws LDIFException, LDAPException, IOException {
        final InMemoryListenerConfig listenerConfig = InMemoryListenerConfig.createLDAPConfig("default", port);
        final InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(new DN(baseDN));
        config.setListenerConfigs(listenerConfig);
        config.addAdditionalBindCredentials(authDN, authPassword);
        final InMemoryDirectoryServer server = new InMemoryDirectoryServer(config);
        server.add(new Entry(baseDN, new Attribute("objectclass", "domain", "top")));
View Full Code Here

     */
    @Override
    public void start(final Logger logger) {
        try {
            logger.logInfo("Starting UnboundID server");
            final InMemoryListenerConfig listenerConfig = InMemoryListenerConfig.createLDAPConfig("default", getServerPort());
            final InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(new DN(getRoot()));
            config.setListenerConfigs(listenerConfig);
            if (getAuthDn() != null) {
                config.addAdditionalBindCredentials(getAuthDn(), getPasswd());
            }
View Full Code Here

TOP

Related Classes of com.unboundid.ldap.listener.InMemoryListenerConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.