Author: elecharny
Date: Mon Mar 30 23:53:39 2009
New Revision: 760261
URL: http://svn.apache.org/viewvc?rev=760261&view=rev
Log:
Added the first drop of the clinet-api
Added:
directory/shared/branches/shared-replication/client-api/ (with props)
directory/shared/branches/shared-replication/client-api/.classpath
directory/shared/branches/shared-replication/client-api/.project
directory/shared/branches/shared-replication/client-api/.settings/
directory/shared/branches/shared-replication/client-api/.settings/org.eclipse.jdt.core.prefs
directory/shared/branches/shared-replication/client-api/pom.xml
directory/shared/branches/shared-replication/client-api/src/
directory/shared/branches/shared-replication/client-api/src/main/
directory/shared/branches/shared-replication/client-api/src/main/java/
directory/shared/branches/shared-replication/client-api/src/main/java/org/
directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/
directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/
directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/
directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/
directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/
directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/
directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java
directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnectionImpl.java
directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/SearchListener.java
directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/
directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolCodecFactory.java
directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolDecoder.java
directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolEncoder.java
directory/shared/branches/shared-replication/client-api/src/test/
directory/shared/branches/shared-replication/client-api/src/test/java/
directory/shared/branches/shared-replication/client-api/target/
directory/shared/branches/shared-replication/client-api/target/.plxarc
directory/shared/branches/shared-replication/client-api/target/classes/
directory/shared/branches/shared-replication/client-api/target/classes/META-INF/
directory/shared/branches/shared-replication/client-api/target/classes/META-INF/DEPENDENCIES
directory/shared/branches/shared-replication/client-api/target/classes/META-INF/LICENSE
directory/shared/branches/shared-replication/client-api/target/classes/META-INF/NOTICE
directory/shared/branches/shared-replication/client-api/target/classes/org/
directory/shared/branches/shared-replication/client-api/target/classes/org/apache/
directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/
directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/
directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/
directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/
directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/
directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/LdapConnection.class (with props)
directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/LdapConnectionImpl.class (with props)
directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/SearchListener.class (with props)
directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/protocol/
directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolCodecFactory.class (with props)
directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolDecoder.class (with props)
directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolEncoder.class (with props)
directory/shared/branches/shared-replication/client-api/target/maven-shared-archive-resources/
directory/shared/branches/shared-replication/client-api/target/maven-shared-archive-resources/META-INF/
directory/shared/branches/shared-replication/client-api/target/maven-shared-archive-resources/META-INF/DEPENDENCIES
directory/shared/branches/shared-replication/client-api/target/maven-shared-archive-resources/META-INF/LICENSE
directory/shared/branches/shared-replication/client-api/target/maven-shared-archive-resources/META-INF/NOTICE
directory/shared/branches/shared-replication/client-api/target/test-classes/
Propchange: directory/shared/branches/shared-replication/client-api/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Mar 30 23:53:39 2009
@@ -0,0 +1,4 @@
+target
+.classpath
+.projet
+.settings
Added: directory/shared/branches/shared-replication/client-api/.classpath
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/.classpath?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/.classpath (added)
+++ directory/shared/branches/shared-replication/client-api/.classpath Mon Mar 30 23:53:39 2009
@@ -0,0 +1,28 @@
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/java" output="target/test-classes"/>
+ <classpathentry kind="src" path="target/maven-shared-archive-resources" excluding="**/*.java"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/elecharny/.m2/repo-repl/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/elecharny/.m2/repo-repl/commons-lang/commons-lang/2.4/commons-lang-2.4-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/elecharny/.m2/repo-repl/junit/junit/4.4/junit-4.4-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+ <classpathentry kind="src" path="/shared-asn1"/>
+ <classpathentry kind="src" path="/shared-ldap-constants"/>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.5.2/slf4j-api-1.5.2.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.5.2/slf4j-api-1.5.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.5.2/slf4j-log4j12-1.5.2.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.5.2/slf4j-log4j12-1.5.2-sources.jar"/>
+</classpath>
\ No newline at end of file
Added: directory/shared/branches/shared-replication/client-api/.project
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/.project?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/.project (added)
+++ directory/shared/branches/shared-replication/client-api/.project Mon Mar 30 23:53:39 2009
@@ -0,0 +1,16 @@
+<projectDescription>
+ <name>shared-client-api</name>
+ <comment>Client LDAP API</comment>
+ <projects>
+ <project>shared-asn1</project>
+ <project>shared-ldap-constants</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Added: directory/shared/branches/shared-replication/client-api/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/.settings/org.eclipse.jdt.core.prefs?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/.settings/org.eclipse.jdt.core.prefs (added)
+++ directory/shared/branches/shared-replication/client-api/.settings/org.eclipse.jdt.core.prefs Mon Mar 30 23:53:39 2009
@@ -0,0 +1,5 @@
+#Sun Mar 29 13:38:09 CEST 2009
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
Added: directory/shared/branches/shared-replication/client-api/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/pom.xml?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/pom.xml (added)
+++ directory/shared/branches/shared-replication/client-api/pom.xml Mon Mar 30 23:53:39 2009
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.directory.shared</groupId>
+ <artifactId>shared-parent</artifactId>
+ <version>0.9.14-SNAPSHOT</version>
+ </parent>
+ <artifactId>shared-client-api</artifactId>
+ <name>Apache Directory Protocol Ldap client API</name>
+ <inceptionYear>2009</inceptionYear>
+
+ <issueManagement>
+ <system>jira</system>
+ <url>http://issues.apache.org/jira/browse/DIRAPI</url>
+ </issueManagement>
+
+ <description>
+ Client LDAP API
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.directory.shared</groupId>
+ <artifactId>shared-asn1</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.directory.shared</groupId>
+ <artifactId>shared-ldap-constants</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>antlr</groupId>
+ <artifactId>antlr</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <configuration />
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antlr-plugin</artifactId>
+ <configuration>
+ <grammars>ACIItem.g ACIItemChecker.g schema-extension.g schema-qdstring.g schema-value.g schema.g subtree-specification.g SubtreeSpecificationChecker.g TriggerSpecification.g</grammars>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin -->
+
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/Abstract*</exclude>
+ <exclude>**/*RegressionTest*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+
Added: directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java (added)
+++ directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java Mon Mar 30 23:53:39 2009
@@ -0,0 +1,609 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.shared.ldap.client.api;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+
+import javax.net.ssl.SSLContext;
+
+import org.apache.directory.shared.asn1.ber.IAsn1Container;
+import org.apache.directory.shared.ldap.client.api.protocol.LdapProtocolCodecFactory;
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
+import org.apache.directory.shared.ldap.codec.LdapResponse;
+import org.apache.directory.shared.ldap.codec.bind.BindRequest;
+import org.apache.directory.shared.ldap.codec.bind.SimpleAuthentication;
+import org.apache.directory.shared.ldap.codec.unbind.UnBindRequest;
+import org.apache.directory.shared.ldap.cursor.Cursor;
+import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.mina.core.filterchain.IoFilter;
+import org.apache.mina.core.future.ConnectFuture;
+import org.apache.mina.core.service.IoConnector;
+import org.apache.mina.core.service.IoHandlerAdapter;
+import org.apache.mina.core.session.IoSession;
+import org.apache.mina.filter.codec.ProtocolCodecFilter;
+import org.apache.mina.filter.ssl.SslFilter;
+import org.apache.mina.transport.socket.nio.NioSocketConnector;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ *
+ * Describe the methods to be implemented by the LdapConnection class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class LdapConnection extends IoHandlerAdapter
+{
+ /** logger for reporting errors that might not be handled properly upstream */
+ private static final Logger LOG = LoggerFactory.getLogger( LdapConnectionImpl.class );
+
+ /** Define the default ports for LDAP and LDAPS */
+ private static final int DEFAULT_LDAP_PORT = 389;
+ private static final int DEFAULT_LDAPS_PORT = 686;
+
+ /** The default host : localhost */
+ private static final String DEFAULT_LDAP_HOST = "127.0.0.1";
+
+ /** The LDAP version */
+ private static int LDAP_V3 = 3;
+
+ private static final String LDAP_RESPONSE = "LdapReponse";
+
+ /** A flag indicating if we are using SSL or not */
+ private boolean useSsl = false;
+
+ /** The default timeout for operation : 30 seconds */
+ private static final long DEFAULT_TIMEOUT = 30000L;
+
+ /** The timeout used for response we are waiting for */
+ private long timeOut = DEFAULT_TIMEOUT;
+
+ /** The selected LDAP port */
+ private int ldapPort;
+
+ /** the remote LDAP host */
+ private String ldapHost;
+
+ /** The connector open with the remote server */
+ private IoConnector connector;
+
+ /** A flag set to true when we used a local connector */
+ private boolean localConnector;
+
+ /** The Ldap codec */
+ private IoFilter ldapProtocolFilter = new ProtocolCodecFilter(
+ new LdapProtocolCodecFactory() );
+
+ /**
+ * The created session, created when we open a connection with
+ * the Ldap server.
+ */
+ private IoSession ldapSession;
+
+ /** A Message ID which is incremented for each operation */
+ private int messageId;
+
+ /** A queue used to store the incoming responses */
+ private BlockingQueue<LdapMessage> responseQueue;
+
+ /** An operation mutex to guarantee the operation order */
+ private Semaphore operationMutex;
+
+ /** The search listener used to get results back */
+ private SearchListener listener;
+
+ //--------------------------- Helper methods ---------------------------//
+ /**
+ * Check if the connection is valid : created and connected
+ *
+ * @return <code>true</code> if the session is valid.
+ */
+ private boolean isSessionValid()
+ {
+ return ( ldapSession != null ) && ldapSession.isConnected();
+ }
+
+
+ /**
+ * Check that a session is valid, ie we can send requests to the
+ * server
+ *
+ * @throws Exception If the session is not valid
+ */
+ private void checkSession() throws Exception
+ {
+ if ( !isSessionValid() )
+ {
+ throw new Exception( "Cannot connect on the server, the connection is invalid" );
+ }
+ }
+
+ /**
+ * Return the response stored into the current session.
+ *
+ * @return The last request response
+ */
+ public LdapMessage getResponse()
+ {
+ return (LdapMessage)ldapSession.getAttribute( LDAP_RESPONSE );
+ }
+
+
+ //------------------------- The constructors --------------------------//
+ /**
+ * Create a new instance of a LdapConnection on localhost,
+ * port 389.
+ */
+ public LdapConnection()
+ {
+ useSsl = false;
+ ldapPort = DEFAULT_LDAP_PORT;
+ ldapHost = DEFAULT_LDAP_HOST;
+ messageId = 1;
+ operationMutex = new Semaphore(1);
+ }
+
+
+ /**
+ * Create a new instance of a LdapConnection on localhost,
+ * port 389 if the SSL flag is off, or 686 otherwise.
+ *
+ * @param useSsl A flag to tell if it's a SSL connection or not.
+ */
+ public LdapConnection( boolean useSsl )
+ {
+ this.useSsl = useSsl;
+ ldapPort = ( useSsl ? DEFAULT_LDAPS_PORT : DEFAULT_LDAP_PORT );
+ ldapHost = DEFAULT_LDAP_HOST;
+ messageId = 1;
+ operationMutex = new Semaphore(1);
+ }
+
+
+ /**
+ * Create a new instance of a LdapConnection on a given
+ * server, using the default port (389).
+ *
+ * @param server The server we want to be connected to
+ */
+ public LdapConnection( String server )
+ {
+ useSsl = false;
+ ldapPort = DEFAULT_LDAP_PORT;
+ ldapHost = server;
+ messageId = 1;
+ operationMutex = new Semaphore(1);
+ }
+
+
+ /**
+ * Create a new instance of a LdapConnection on a given
+ * server, using the default port (389) if the SSL flag
+ * is off, or 686 otherwise.
+ *
+ * @param server The server we want to be connected to
+ * @param useSsl A flag to tell if it's a SSL connection or not.
+ */
+ public LdapConnection( String server, boolean useSsl )
+ {
+ this.useSsl = useSsl;
+ ldapPort = ( useSsl ? DEFAULT_LDAPS_PORT : DEFAULT_LDAP_PORT );
+ ldapHost = DEFAULT_LDAP_HOST;
+ messageId = 1;
+ operationMutex = new Semaphore(1);
+ }
+
+
+ /**
+ * Create a new instance of a LdapConnection on a
+ * given server and a given port. We don't use ssl.
+ *
+ * @param server The server we want to be connected to
+ * @param port The port the server is listening to
+ */
+ public LdapConnection( String server, int port )
+ {
+ useSsl = false;
+ ldapPort = port;
+ ldapHost = server;
+ messageId = 1;
+ operationMutex = new Semaphore(1);
+ }
+
+
+ /**
+ * Create a new instance of a LdapConnection on a given
+ * server, and a give port. We set the SSL flag accordingly
+ * to the last parameter.
+ *
+ * @param server The server we want to be connected to
+ * @param port The port the server is listening to
+ * @param useSsl A flag to tell if it's a SSL connection or not.
+ */
+ public LdapConnection( String server, int port, boolean useSsl )
+ {
+ this.useSsl = useSsl;
+ ldapPort = port;
+ ldapHost = server;
+ messageId = 1;
+ operationMutex = new Semaphore(1);
+ }
+
+
+ //-------------------------- The methods ---------------------------//
+ /**
+ * Connect to the remote LDAP server.
+ *
+ * @return <code>true</code> if the connection is established, false otherwise
+ * @throws IOException if some I/O error occurs
+ */
+ public boolean connect() throws IOException
+ {
+ if ( ( ldapSession != null ) && ldapSession.isConnected() )
+ {
+ throw new IllegalStateException( "Already connected. Disconnect first." );
+ }
+
+ // Create the connector if needed
+ if ( connector == null )
+ {
+ connector = new NioSocketConnector();
+ localConnector = true;
+
+ // Add the codec to the chain
+ connector.getFilterChain().addLast( "ldapCodec", ldapProtocolFilter );
+
+ // If we use SSL, we have to add the SslFilter to the chain
+ if ( useSsl )
+ {
+ SSLContext sslContext = null; // BogusSslContextFactory.getInstance( false );
+ SslFilter sslFilter = new SslFilter( sslContext );
+ sslFilter.setUseClientMode(true);
+ connector.getFilterChain().addLast( "sslFilter", sslFilter );
+ }
+
+ // Inject the protocolHandler
+ connector.setHandler( this );
+ }
+
+ // Build the connection address
+ SocketAddress address = new InetSocketAddress( ldapHost , ldapPort );
+
+ // And create the connection future
+ ConnectFuture connectionFuture = connector.connect( address );
+
+ // Wait until it's established
+ connectionFuture.awaitUninterruptibly();
+
+ if ( !connectionFuture.isConnected() )
+ {
+ return false;
+ }
+
+ // Get back the session
+ ldapSession = connectionFuture.getSession();
+
+ // And inject the current Ldap container into the session
+ IAsn1Container ldapMessageContainer = new LdapMessageContainer();
+
+ // Store the container into the session
+ ldapSession.setAttribute( "LDAP-Container", ldapMessageContainer );
+
+ // Create the responses queue
+ responseQueue = new LinkedBlockingQueue<LdapMessage>();
+
+ // And return
+ return true;
+ }
+
+
+ /**
+ * Disconnect from the remote LDAP server
+ *
+ * @return <code>true</code> if the connection is closed, false otherwise
+ * @throws IOException if some I/O error occurs
+ */
+ public boolean close() throws IOException
+ {
+ // Close the session
+ if ( ( ldapSession != null ) && ldapSession.isConnected() )
+ {
+ ldapSession.close( true );
+ }
+
+ // And close the connector if it has been created locally
+ if ( localConnector )
+ {
+ // Release the connector
+ connector.dispose();
+ }
+
+ return true;
+ }
+
+
+ //------------------------ The LDAP operations ------------------------//
+ // Bind operations //
+ //---------------------------------------------------------------------//
+ /**
+ * Anonymous Bind on a server.
+ *
+ * @return The BindResponse LdapResponse
+ */
+ public LdapResponse bind() throws Exception
+ {
+ LOG.debug( " Unauthenticated Authentication bind" );
+
+ LdapResponse response = bind( (String)null, (byte[])null );
+
+ if (response.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
+ {
+ LOG.debug( " Unauthenticated Authentication bind successfull" );
+ }
+ else
+ {
+ LOG.debug( " Unauthenticated Authentication bind failure {}", response );
+ }
+
+ return response;
+ }
+
+
+ /**
+ * An Unauthenticated Authentication Bind on a server. (cf RFC 4513,
+ * par 5.1.2)
+ *
+ * @param name The name we use to authenticate the user. It must be a
+ * valid DN
+ * @return The BindResponse LdapResponse
+ */
+ public LdapResponse bind( String name ) throws Exception
+ {
+ LOG.debug( "Anonymous bind" );
+
+ LdapResponse response = bind( name, (byte[])null );
+
+ if (response.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
+ {
+ LOG.debug( "Anonymous bind successfull" );
+ }
+ else
+ {
+ LOG.debug( "Anonymous bind failure {}", response );
+ }
+
+ return response;
+ }
+
+
+ /**
+ * Simple Bind on a server.
+ *
+ * @param name The name we use to authenticate the user. It must be a
+ * valid DN
+ * @param credentials The password. It can't be null
+ * @return The BindResponse LdapResponse
+ */
+ public LdapResponse bind( String name, String credentials ) throws Exception
+ {
+ return bind( name, StringTools.getBytesUtf8( credentials ) );
+ }
+
+
+ /**
+ * Simple Bind on a server.
+ *
+ * @param name The name we use to authenticate the user. It must be a
+ * valid DN
+ * @param credentials The password.
+ * @return The BindResponse LdapResponse
+ */
+ public LdapResponse bind( String name, byte[] credentials ) throws Exception
+ {
+ // If the session has not been establish, or is closed, we get out immediately
+ checkSession();
+
+ // Guarantee that for this session, we don't have more than one operation
+ // running at the same time
+ operationMutex.acquire();
+
+ // Create the BindRequest
+ LdapDN dn = new LdapDN( name );
+
+ BindRequest bindRequest = new BindRequest();
+ bindRequest.setName( dn );
+ bindRequest.setVersion( LDAP_V3 );
+
+ // Create the Simple authentication
+ SimpleAuthentication simpleAuth = new SimpleAuthentication();
+ simpleAuth.setSimple( credentials );
+
+ bindRequest.setAuthentication( simpleAuth );
+
+ // Encode the request
+ LdapMessage message = new LdapMessage();
+ message.setMessageId( messageId++ );
+ message.setProtocolOP( bindRequest );
+
+ LOG.debug( "-----------------------------------------------------------------" );
+ LOG.debug( "Sending request \n{}", message );
+
+ // Send the request to the server
+ ldapSession.write( message );
+
+ // Read the response, waiting for it if not available immediately
+ LdapMessage response = responseQueue.poll( timeOut, TimeUnit.MILLISECONDS );
+
+ // Check that we didn't get out because of a timeout
+ if ( response == null )
+ {
+ // We didn't received anything : this is an error
+ LOG.error( "Bind failed : timeout occured" );
+ operationMutex.release();
+ throw new Exception( "TimeOut occured" );
+ }
+
+ operationMutex.release();
+
+ // Everything is fine, return the response
+ LdapResponse resp = response.getBindResponse();
+
+ LOG.debug( "Bind successful : {}", resp );
+
+ return resp;
+ }
+
+
+ //------------------------ The LDAP operations ------------------------//
+ // Search operations //
+ //---------------------------------------------------------------------//
+ /**
+ * Do a search, on the base object, using the given filter. The
+ * SearchRequest parameters default to :
+ * Scope : ONE
+ * DerefAlias : ALWAYS
+ * SizeLimit : none
+ * TimeLimit : none
+ * TypesOnly : false
+ * Attributes : all the user's attributes.
+ * This method is blocking.
+ *
+ * @param baseObject The base for the search. It must be a valid
+ * DN, and can't be emtpy
+ * @param filter The filter to use for this search. It can't be empty
+ * @return A cursor on the result.
+ */
+ public Cursor<Entry> search( String baseObject, String filter ) throws Exception
+ {
+ return null;
+ }
+
+
+ /**
+ * Do a search, on the base object, using the given filter. The
+ * SearchRequest parameters default to :
+ * Scope : ONE
+ * DerefAlias : ALWAYS
+ * SizeLimit : none
+ * TimeLimit : none
+ * TypesOnly : false
+ * Attributes : all the user's attributes.
+ * This method is blocking.
+ *
+ * @param listener a SearchListener used to be informed when a result
+ * has been found, or when the search is done
+ * @param baseObject The base for the search. It must be a valid
+ * DN, and can't be emtpy
+ * @param filter The filter to use for this search. It can't be empty
+ * @return A cursor on the result.
+ */
+ public void search( SearchListener listener, String baseObject, String filter ) throws Exception
+ {
+
+ }
+
+ //------------------------ The LDAP operations ------------------------//
+ // Unbind operations //
+ //---------------------------------------------------------------------//
+ /**
+ * UnBind from a server
+ */
+ public void unBind() throws Exception
+ {
+ // If the session has not been establish, or is closed, we get out immediately
+ checkSession();
+
+ // Guarantee that for this session, we don't have more than one operation
+ // running at the same time
+ operationMutex.acquire();
+
+ // Create the UnBindRequest
+ UnBindRequest unBindRequest = new UnBindRequest();
+
+ // Encode the request
+ LdapMessage message = new LdapMessage();
+ message.setMessageId( messageId );
+ message.setProtocolOP( unBindRequest );
+
+ LOG.debug( "-----------------------------------------------------------------" );
+ LOG.debug( "Sending Unbind request \n{}", message );
+
+ // Send the request to the server
+ ldapSession.write( message );
+
+ // We don't have to wait for a response. Reset the messageId counter to 0
+ messageId = 0;
+
+ // We also have to reset the response queue
+ responseQueue.clear();
+
+ operationMutex.release();
+ LOG.debug( "Unbind successful" );
+ }
+
+
+ /**
+ *
+ * Adds a SearchListener which can handle the results of a search request.
+ *
+ * @param listener an instance of SearchListener implementation.
+ */
+ public void addListener( SearchListener listener )
+ {
+ this.listener = listener;
+ }
+
+
+ /**
+ * Set the connector to use.
+ *
+ * @param connector The connector to use
+ */
+ public void setConnector( IoConnector connector )
+ {
+ this.connector = connector;
+ }
+
+
+ /**
+ * Set the timeOut for the responses. We wont wait longer than this
+ * value.
+ *
+ * @param timeOut The timeout, in milliseconds
+ */
+ public void setTimeOut( long timeOut )
+ {
+ this.timeOut = timeOut;
+ }
+
+
+}
Added: directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnectionImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnectionImpl.java?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnectionImpl.java (added)
+++ directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnectionImpl.java Mon Mar 30 23:53:39 2009
@@ -0,0 +1,360 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.shared.ldap.client.api;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.text.ParseException;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+
+import javax.naming.InvalidNameException;
+import javax.net.ssl.SSLContext;
+
+import org.apache.directory.shared.asn1.ber.IAsn1Container;
+import org.apache.directory.shared.ldap.codec.LdapConstants;
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
+import org.apache.directory.shared.ldap.codec.LdapResponse;
+import org.apache.directory.shared.ldap.codec.TwixTransformer;
+import org.apache.directory.shared.ldap.codec.bind.BindRequest;
+import org.apache.directory.shared.ldap.codec.bind.SimpleAuthentication;
+import org.apache.directory.shared.ldap.codec.search.Filter;
+import org.apache.directory.shared.ldap.codec.search.SearchRequest;
+import org.apache.directory.shared.ldap.codec.search.SearchResultDone;
+import org.apache.directory.shared.ldap.codec.search.SearchResultEntry;
+import org.apache.directory.shared.ldap.codec.search.SearchResultReference;
+import org.apache.directory.shared.ldap.codec.unbind.UnBindRequest;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.filter.ExprNode;
+import org.apache.directory.shared.ldap.filter.FilterParser;
+import org.apache.directory.shared.ldap.filter.SearchScope;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.mina.core.filterchain.IoFilter;
+import org.apache.mina.core.future.ConnectFuture;
+import org.apache.mina.core.service.IoHandlerAdapter;
+import org.apache.mina.core.session.IoSession;
+import org.apache.mina.filter.codec.ProtocolCodecFilter;
+import org.apache.mina.filter.ssl.SslFilter;
+import org.apache.mina.transport.socket.nio.NioSocketConnector;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * An implementation of a Ldap connection
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class LdapConnectionImpl extends IoHandlerAdapter
+{
+ /** logger for reporting errors that might not be handled properly upstream */
+ private static final Logger LOG = LoggerFactory.getLogger( LdapConnectionImpl.class );
+
+ /** Define the default ports for LDAP and LDAPS */
+ private static final int DEFAULT_LDAP_PORT = 389;
+ private static final int DEFAULT_LDAPS_PORT = 686;
+
+ /** The default host : localhost */
+ private static final String DEFAULT_LDAP_HOST = "127.0.0.1";
+
+ /** The LDAP version */
+ private static int LDAP_V3 = 3;
+
+ private static final String LDAP_RESPONSE = "LdapReponse";
+
+ /** A flag indicating if we are using SSL or not */
+ private boolean useSsl = false;
+
+ /** The default timeout for operation : 30 seconds */
+ private static final long DEFAULT_TIMEOUT = 30000L;
+
+ /** The timeout used for response we are waiting for */
+ private long timeOut = DEFAULT_TIMEOUT;
+
+ /** The selected LDAP port */
+ private int ldapPort;
+
+ /** the remote LDAP host */
+ private String ldapHost;
+
+ /** The Ldap codec */
+ private IoFilter ldapProtocolFilter = new ProtocolCodecFilter(
+ new LdapProtocolCodecFactory() );
+
+ /**
+ * The created session, created when we open a connection with
+ * the Ldap server.
+ */
+ private IoSession ldapSession;
+
+ /** A Message ID which is incremented for each operation */
+ private int messageId;
+
+ /** A queue used to store the incoming responses */
+ private BlockingQueue<LdapMessage> responseQueue;
+
+ /** An operation mutex to guarantee the operation order */
+ private Semaphore operationMutex;
+
+ /** the agent which created this connection */
+ private ConsumerCallback consumer;
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void search( String baseObject, String filterString ) throws Exception
+ {
+ // If the session has not been establish, or is closed, we get out immediately
+ checkSession();
+
+ LdapDN baseDN = null;
+ Filter filter = null;
+
+ // Check that the baseObject is not null or empty,
+ // and is a valid DN
+ if ( StringTools.isEmpty( baseObject ) )
+ {
+ throw new Exception( "Cannot search on RootDSE when the scope is not BASE" );
+ }
+
+ try
+ {
+ baseDN = new LdapDN( baseObject );
+ }
+ catch ( InvalidNameException ine )
+ {
+ throw new Exception( "The baseObject is not a valid DN" );
+ }
+
+ // Check that the filter is valid
+ try
+ {
+ ExprNode filterNode = FilterParser.parse( filterString );
+
+ filter = TwixTransformer.transformFilter( filterNode );
+ }
+ catch ( ParseException pe )
+ {
+ throw new Exception( "The filter is invalid" );
+ }
+
+ SearchRequest searchRequest = new SearchRequest();
+ searchRequest.setBaseObject( baseDN );
+ searchRequest.setFilter( filter );
+
+ // Fill the default values
+ searchRequest.setSizeLimit( 0 );
+ searchRequest.setTimeLimit( 0 );
+ searchRequest.setDerefAliases( LdapConstants.DEREF_ALWAYS );
+ searchRequest.setScope( SearchScope.ONELEVEL );
+ searchRequest.setTypesOnly( false );
+ searchRequest.addAttribute( SchemaConstants.ALL_USER_ATTRIBUTES );
+
+ search( searchRequest );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void search( SearchRequest searchRequest ) throws Exception
+ {
+ // First check the session
+ checkSession();
+
+ // Guarantee that for this session, we don't have more than one operation
+ // running at the same time
+ operationMutex.acquire();
+
+ // Encode the request
+ LdapMessage message = new LdapMessage();
+ message.setMessageId( messageId++ );
+ message.setProtocolOP( searchRequest );
+ message.addControl( searchRequest.getCurrentControl() );
+
+ //LOG.debug( "-----------------------------------------------------------------" );
+ //LOG.debug( "Sending request \n{}", message );
+
+ // Loop and get all the responses
+ // Send the request to the server
+ ldapSession.write( message );
+
+ operationMutex.release();
+// int i = 0;
+//
+// List<SearchResultEntry> searchResults = new ArrayList<SearchResultEntry>();
+
+ // Now wait for the responses
+ // Loop until we got all the responses
+
+/* do
+ {
+ // If we get out before the timeout, check that the response
+ // is there, and get it
+ LdapMessage response = responseQueue.poll( timeOut, TimeUnit.MILLISECONDS );
+
+ if ( response == null )
+ {
+ // No response, get out
+ operationMutex.release();
+
+ // We didn't received anything : this is an error
+ throw new Exception( "TimeOut occured" );
+ }
+
+ i++;
+
+ // Print the response
+// System.out.println( "Result[" + i + "]" + response );
+
+ if( response.getMessageType() == LdapConstants.INTERMEDIATE_RESPONSE )
+ {
+ consumer.handleSyncInfo( response.getIntermediateResponse().getResponseValue() );
+ }
+
+ if ( response.getMessageType() == LdapConstants.SEARCH_RESULT_DONE )
+ {
+ SearchResultDone resDone = response.getSearchResultDone();
+ resDone.addControl( response.getCurrentControl() );
+
+ operationMutex.release();
+ consumer.handleSearchDone( resDone );
+
+ return;
+ }
+
+ if( response.getMessageType() == LdapConstants.SEARCH_RESULT_ENTRY )
+ {
+ SearchResultEntry sre = response.getSearchResultEntry();
+ sre.addControl( response.getCurrentControl() );
+ consumer.handleSearchResult( sre );
+ }
+
+ if( response.getMessageType() == LdapConstants.SEARCH_RESULT_REFERENCE )
+ {
+ SearchResultReference searchRef = response.getSearchResultReference();
+ searchRef.addControl( response.getCurrentControl() );
+
+ consumer.handleSearchReference( searchRef );
+ }
+ }
+ while ( true );
+*/ }
+
+
+
+ //----------------- ProtocolHandler implemented methods -----------------//
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void sessionCreated( IoSession session ) throws Exception
+ {
+ LOG.debug( "-------> New session created <-------" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void sessionOpened( IoSession session ) throws Exception
+ {
+ LOG.debug( "-------> Session opened <-------" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void sessionClosed(IoSession session) throws Exception
+ {
+ LOG.debug( "-------> Session Closed <-------" );
+ consumer.handleSessionClosed();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void messageReceived( IoSession session, Object message) throws Exception
+ {
+ // Feed the response and store it into the session
+ LdapMessage response = (LdapMessage)message;
+
+ LOG.debug( "-------> {} Message received <-------", response.getMessageTypeName() );
+
+ switch( response.getMessageType() )
+ {
+ case LdapConstants.BIND_RESPONSE:
+
+ responseQueue.add( response ); // Store the response into the responseQueue
+ break;
+
+ case LdapConstants.INTERMEDIATE_RESPONSE:
+
+ consumer.handleSyncInfo( response.getIntermediateResponse().getResponseValue() );
+ break;
+
+ case LdapConstants.SEARCH_RESULT_DONE:
+
+ SearchResultDone resDone = response.getSearchResultDone();
+ resDone.addControl( response.getCurrentControl() );
+ consumer.handleSearchDone( resDone );
+ break;
+
+ case LdapConstants.SEARCH_RESULT_ENTRY:
+
+ SearchResultEntry sre = response.getSearchResultEntry();
+ sre.addControl( response.getCurrentControl() );
+ consumer.handleSearchResult( sre );
+ break;
+
+ case LdapConstants.SEARCH_RESULT_REFERENCE:
+
+ SearchResultReference searchRef = response.getSearchResultReference();
+ searchRef.addControl( response.getCurrentControl() );
+ consumer.handleSearchReference( searchRef );
+ break;
+
+ default: LOG.error( "~~~~~~~~~~~~~~~~~~~~~ Unknown message type {} ~~~~~~~~~~~~~~~~~~~~~", response.getMessageTypeName() );
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addConsumer( ConsumerCallback consumer )
+ {
+ this.consumer = consumer;
+ }
+}
Added: directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/SearchListener.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/SearchListener.java?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/SearchListener.java (added)
+++ directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/SearchListener.java Mon Mar 30 23:53:39 2009
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.shared.ldap.client.api;
+
+import org.apache.directory.shared.ldap.entry.Entry;
+
+/**
+ * A listener used for asynchronous search handling. When wanting to handle
+ * searches as a non-blocking operation, simply associate a SearchListener
+ * to the search operation : for each entry found, the listener will be
+ * called back, and so will it when the search will be done.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface SearchListener
+{
+ /**
+ * A callback method for each entry returned by a search operation.
+ *
+ * @param entry The found entry
+ */
+ void resultReturned( Entry entry );
+
+ /**
+ * A callback method called when the search is done.
+ */
+ void searchDone();
+}
Added: directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolCodecFactory.java?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolCodecFactory.java (added)
+++ directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolCodecFactory.java Mon Mar 30 23:53:39 2009
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.shared.ldap.client.api.protocol;
+
+import org.apache.mina.core.session.IoSession;
+import org.apache.mina.filter.codec.ProtocolCodecFactory;
+import org.apache.mina.filter.codec.ProtocolDecoder;
+import org.apache.mina.filter.codec.ProtocolEncoder;
+
+/**
+ *
+ * The factory used to create the LDAP encoder and decoder.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class LdapProtocolCodecFactory implements ProtocolCodecFactory
+{
+ /** The Ldap encoder */
+ private ProtocolEncoder ldapEncoder;
+
+ /** The Ldap decoder */
+ private ProtocolDecoder ldapDecoder;
+
+
+ /**
+ *
+ * Creates a new instance of LdapProtocolCodecFactory. It
+ * creates the encoded an decoder instances.
+ *
+ */
+ public LdapProtocolCodecFactory()
+ {
+ // Create the encoder.
+ ldapEncoder = new LdapProtocolEncoder();
+ ldapDecoder = new LdapProtocolDecoder();
+ }
+
+
+ /**
+ * Get the Ldap decoder.
+ */
+ public ProtocolDecoder getDecoder( IoSession session ) throws Exception
+ {
+ return ldapDecoder;
+ }
+
+
+ /**
+ * Get the Ldap encoder.
+ */
+ public ProtocolEncoder getEncoder( IoSession session ) throws Exception
+ {
+ return ldapEncoder;
+ }
+}
Added: directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolDecoder.java?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolDecoder.java (added)
+++ directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolDecoder.java Mon Mar 30 23:53:39 2009
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.shared.ldap.client.api.protocol;
+
+import java.nio.ByteBuffer;
+
+import org.apache.directory.shared.asn1.ber.Asn1Decoder;
+import org.apache.directory.shared.asn1.ber.IAsn1Container;
+import org.apache.directory.shared.asn1.ber.tlv.TLVStateEnum;
+import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.ldap.codec.LdapDecoder;
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
+import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.mina.core.buffer.IoBuffer;
+import org.apache.mina.core.session.IoSession;
+import org.apache.mina.filter.codec.ProtocolDecoder;
+import org.apache.mina.filter.codec.ProtocolDecoderOutput;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * A LDAP message decoder. It is based on shared-ldap decoder.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class LdapProtocolDecoder implements ProtocolDecoder
+{
+ /** The logger */
+ private static final Logger LOG = LoggerFactory.getLogger( LdapProtocolDecoder.class );
+
+ /** A speedup for logger */
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+ /**
+ * Decode a Ldap request and write it to the remote server.
+ *
+ * @param session The session containing the LdapMessageContainer
+ * @param buffer The ByteBuffer containing the incoming bytes to decode
+ * to a LDAP message
+ * @param out The callback we have to invoke when the message has been decoded
+ */
+ public void decode( IoSession session, IoBuffer buffer, ProtocolDecoderOutput out ) throws Exception
+ {
+ // Allocate a LdapMessage Container
+ Asn1Decoder ldapDecoder = new LdapDecoder();
+ IAsn1Container ldapMessageContainer = (LdapMessageContainer)session.getAttribute( "LDAP-Container" );
+ ByteBuffer buf = buffer.buf();
+ int currentPos = 0;
+
+ while ( buf.hasRemaining() )
+ {
+ try
+ {
+ ldapDecoder.decode( buf, ldapMessageContainer );
+
+ if ( IS_DEBUG )
+ {
+ LOG.debug( "Decoding the PDU : " );
+ int pos = buf.position();
+
+ byte[] b = new byte[pos-currentPos];
+
+ System.arraycopy( buf.array(), currentPos, b, 0, pos-currentPos );
+ currentPos = pos;
+ System.out.println( "Received buffer : " + StringTools.dumpBytes( b ) );
+ }
+
+ if ( ldapMessageContainer.getState() == TLVStateEnum.PDU_DECODED )
+ {
+ // get back the decoded message
+ LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+
+ if ( IS_DEBUG )
+ {
+ LOG.debug( "Decoded LdapMessage : " +
+ ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage() );
+ buf.mark();
+ }
+
+ // Clean the container for the next decoding
+ ( ( LdapMessageContainer ) ldapMessageContainer).clean();
+
+ if( IS_DEBUG )
+ {
+// LOG.debug( "######################Decoded message : " + message );
+// LOG.debug( "####################################################" );
+ }
+
+ // Send back the message
+ out.write( message );
+ }
+ }
+ catch ( DecoderException de )
+ {
+ buf.clear();
+ ( ( LdapMessageContainer ) ldapMessageContainer).clean();
+ throw de;
+ }
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void finishDecode( IoSession session, ProtocolDecoderOutput out ) throws Exception
+ {
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void dispose( IoSession session ) throws Exception
+ {
+ }
+}
Added: directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolEncoder.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolEncoder.java?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolEncoder.java (added)
+++ directory/shared/branches/shared-replication/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolEncoder.java Mon Mar 30 23:53:39 2009
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.shared.ldap.client.api.protocol;
+
+import java.nio.ByteBuffer;
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.mina.core.buffer.IoBuffer;
+import org.apache.mina.core.session.IoSession;
+import org.apache.mina.filter.codec.ProtocolEncoder;
+import org.apache.mina.filter.codec.ProtocolEncoderOutput;
+
+/**
+ *
+ * A LDAP encoder.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class LdapProtocolEncoder implements ProtocolEncoder
+{
+ /**
+ * Encode a Ldap request and write it to the remote server.
+ *
+ * @param session The session containing the LdapMessageContainer
+ * @param request The LDAP message we have to encode to a Byte stream
+ * @param out The callback we have to invoke when the message has been encoded
+ */
+ public void encode( IoSession session, Object request, ProtocolEncoderOutput out ) throws Exception
+ {
+ if ( request instanceof LdapMessage )
+ {
+ LdapMessage ldapRequest = (LdapMessage)request;
+ ByteBuffer bb = ldapRequest.encode( null );
+ bb.flip();
+
+ IoBuffer buffer = IoBuffer.allocate( bb.limit(), false );
+ buffer.setAutoExpand( false );
+ buffer.put( bb );
+ buffer.flip();
+
+ out.write( buffer );
+ }
+ else
+ {
+ throw new Exception();
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void dispose( IoSession session ) throws Exception
+ {
+ // Nothing to dispose
+ }
+}
Added: directory/shared/branches/shared-replication/client-api/target/.plxarc
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/target/.plxarc?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/target/.plxarc (added)
+++ directory/shared/branches/shared-replication/client-api/target/.plxarc Mon Mar 30 23:53:39 2009
@@ -0,0 +1 @@
+maven-shared-archive-resources
\ No newline at end of file
Added: directory/shared/branches/shared-replication/client-api/target/classes/META-INF/DEPENDENCIES
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/target/classes/META-INF/DEPENDENCIES?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/target/classes/META-INF/DEPENDENCIES (added)
+++ directory/shared/branches/shared-replication/client-api/target/classes/META-INF/DEPENDENCIES Mon Mar 30 23:53:39 2009
@@ -0,0 +1,29 @@
+// ------------------------------------------------------------------
+// Transitive dependencies of this project determined from the
+// maven pom organized by organization.
+// ------------------------------------------------------------------
+
+ApacheDS-Shared
+
+
+From: 'an unknown organization'
+ - AntLR Parser Generator (http://www.antlr.org/) antlr:antlr:jar:2.7.7
+ License: BSD License (http://www.antlr.org/license.html)
+
+From: 'QOS.ch' (http://www.qos.ch)
+ - SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.5.2
+
+
+From: 'The Apache Software Foundation' (http://www.apache.org/)
+ - Commons Collections (http://commons.apache.org/collections/) commons-collections:commons-collections:jar:3.2.1
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.4
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Apache Directory ASN.1 Shared (http://www.apache.org/project/shared-parent/shared-asn1) org.apache.directory.shared:shared-asn1:jar:0.9.14-SNAPSHOT
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Apache Directory Protocol Ldap Shared Constants (http://www.apache.org/project/shared-parent/shared-ldap-constants) org.apache.directory.shared:shared-ldap-constants:jar:0.9.14-SNAPSHOT
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+
+
+
Added: directory/shared/branches/shared-replication/client-api/target/classes/META-INF/LICENSE
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/target/classes/META-INF/LICENSE?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/target/classes/META-INF/LICENSE (added)
+++ directory/shared/branches/shared-replication/client-api/target/classes/META-INF/LICENSE Mon Mar 30 23:53:39 2009
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
Added: directory/shared/branches/shared-replication/client-api/target/classes/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/target/classes/META-INF/NOTICE?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/target/classes/META-INF/NOTICE (added)
+++ directory/shared/branches/shared-replication/client-api/target/classes/META-INF/NOTICE Mon Mar 30 23:53:39 2009
@@ -0,0 +1,8 @@
+
+ApacheDS-Shared
+Copyright 2009 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+
Added: directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/LdapConnection.class
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/LdapConnection.class?rev=760261&view=auto
==============================================================================
Binary file - no diff available.
Propchange: directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/LdapConnection.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/LdapConnectionImpl.class
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/LdapConnectionImpl.class?rev=760261&view=auto
==============================================================================
Binary file - no diff available.
Propchange: directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/LdapConnectionImpl.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/SearchListener.class
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/SearchListener.class?rev=760261&view=auto
==============================================================================
Binary file - no diff available.
Propchange: directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/SearchListener.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolCodecFactory.class
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolCodecFactory.class?rev=760261&view=auto
==============================================================================
Binary file - no diff available.
Propchange: directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolCodecFactory.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolDecoder.class
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolDecoder.class?rev=760261&view=auto
==============================================================================
Binary file - no diff available.
Propchange: directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolDecoder.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolEncoder.class
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolEncoder.class?rev=760261&view=auto
==============================================================================
Binary file - no diff available.
Propchange: directory/shared/branches/shared-replication/client-api/target/classes/org/apache/directory/shared/ldap/client/api/protocol/LdapProtocolEncoder.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/shared/branches/shared-replication/client-api/target/maven-shared-archive-resources/META-INF/DEPENDENCIES
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/client-api/target/maven-shared-archive-resources/META-INF/DEPENDENCIES?rev=760261&view=auto
==============================================================================
--- directory/shared/branches/shared-replication/client-api/target/maven-shared-archive-resources/META-INF/DEPENDENCIES (added)
+++ directory/shared/branches/shared-replication/client-api/target/maven-shared-archive-resources/META-INF/DEPENDENCIES Mon Mar 30 23:53:39 2009
@@ -0,0 +1,29 @@
+// ------------------------------------------------------------------
+// Transitive dependencies of this project determined from the
+// maven pom organized by organization.
+// ------------------------------------------------------------------
+
+ApacheDS-Shared
+
+
+From: 'an unknown organization'
+ - AntLR Parser Generator (http://www.antlr.org/) antlr:antlr:jar:2.7.7
+ License: BSD License (http://www.antlr.org/license.html)
+
+From: 'QOS.ch' (http://www.qos.ch)
+ - SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.5.2
+
+
+From: 'The Apache Software Foundation' (http://www.apache.org/)
+ - Commons Collections (http://commons.apache.org/collections/) commons-collections:commons-collections:jar:3.2.1
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.4
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Apache Directory ASN.1 Shared (http://www.apache.org/project/shared-parent/shared-asn1) org.apache.directory.shared:shared-asn1:jar:0.9.14-SNAPSHOT
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+ - Apache Directory Protocol Ldap Shared Constants (http://www.apache.org/project/shared-parent/shared-ldap-constants) org.apache.directory.shared:shared-ldap-constants:jar:0.9.14-SNAPSHOT
+ License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+
+
+
|