directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1075124 - in /directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina: LdapProtocolCodecFactory.java LdapProtocolDecoder.java
Date Sun, 27 Feb 2011 19:44:05 GMT
Author: akarasulu
Date: Sun Feb 27 19:44:05 2011
New Revision: 1075124

URL: http://svn.apache.org/viewvc?rev=1075124&view=rev
Log:
LdapProtocolDecorator does not need to take a codec argument

Modified:
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolCodecFactory.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolDecoder.java

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolCodecFactory.java?rev=1075124&r1=1075123&r2=1075124&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolCodecFactory.java
(original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolCodecFactory.java
Sun Feb 27 19:44:05 2011
@@ -34,6 +34,9 @@ import org.apache.mina.filter.codec.Prot
  */
 public class LdapProtocolCodecFactory implements ProtocolCodecFactory
 {
+    /** The tag stored into the session if we want to set a max PDU size */
+    public final static String MAX_PDU_SIZE = "MAX_PDU_SIZE";
+
     /** The LdapDecoder key */
     public static final String LDAP_DECODER = "LDAP_DECODER";
 
@@ -64,7 +67,7 @@ public class LdapProtocolCodecFactory im
      */
     public ProtocolDecoder getDecoder( IoSession session )
     {
-        return new LdapProtocolDecoder( codec );
+        return new LdapProtocolDecoder();
     }
 
 

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolDecoder.java?rev=1075124&r1=1075123&r2=1075124&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolDecoder.java
(original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolDecoder.java
Sun Feb 27 19:44:05 2011
@@ -25,7 +25,6 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.directory.shared.ldap.codec.LdapDecoder;
-import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.api.MessageDecorator;
 import org.apache.directory.shared.ldap.model.message.Message;
@@ -51,7 +50,7 @@ public class LdapProtocolDecoder impleme
      *
      * @param codec The LDAP codec service associated with this encoder.
      */
-    public LdapProtocolDecoder( LdapCodecService codec )
+    public LdapProtocolDecoder()
     {
         this.decoder = new LdapDecoder();
     }
@@ -62,8 +61,10 @@ public class LdapProtocolDecoder impleme
      */
     public void decode( IoSession session, IoBuffer in, ProtocolDecoderOutput out ) throws
Exception
     {
+        @SuppressWarnings("unchecked")
         LdapMessageContainer<MessageDecorator<? extends Message>> messageContainer
=
-            (org.apache.directory.shared.ldap.codec.api.LdapMessageContainer<MessageDecorator<?
extends Message>> ) session.getAttribute( "messageContainer" );
+            (org.apache.directory.shared.ldap.codec.api.LdapMessageContainer<MessageDecorator<?
extends Message>> ) 
+            session.getAttribute( "messageContainer" );
 
         if ( session.containsAttribute( "maxPDUSize" ) )
         {



Mime
View raw message