You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ji...@apache.org on 2006/05/05 14:52:54 UTC
svn commit: r400067 [1/7] - in /directory/trunks:
apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/
clients/ldap/ mina/core/src/main/java/org/apache/mina/filter/
mina/core/src/main/java/org/apache/mina/handler/mult...
Author: jim
Date: Fri May 5 05:52:49 2006
New Revision: 400067
URL: http://svn.apache.org/viewcvs?rev=400067&view=rev
Log:
Change to Unix linefeeds
Modified:
directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LanguageSpecificStoredProceureExtendedOperationHandler.java
directory/trunks/clients/ldap/project.properties (props changed)
directory/trunks/clients/ldap/project.xml (props changed)
directory/trunks/mina/core/src/main/java/org/apache/mina/filter/StreamWriteFilter.java
directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandler.java
directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerAdapter.java
directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java
directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerFactory.java
directory/trunks/mina/core/src/test/java/org/apache/mina/filter/StreamWriteFilterTest.java
directory/trunks/mina/filter-codec-asn1/src/main/java/org/apache/mina/filter/codec/asn1/Asn1CodecDecoder.java
directory/trunks/mina/filter-codec-asn1/src/main/java/org/apache/mina/filter/codec/asn1/Asn1CodecEncoder.java
directory/trunks/mina/filter-compression/src/main/java/org/apache/mina/filter/CompressionFilter.java
directory/trunks/mina/filter-compression/src/main/java/org/apache/mina/filter/support/Zlib.java
directory/trunks/mina/filter-compression/src/test/java/org/apache/mina/filter/CompressionFilterTest.java
directory/trunks/mina/filter-compression/src/test/java/org/apache/mina/filter/support/ZlibTest.java
directory/trunks/naming/naming-config/src/java/org/apache/naming/config/Config.java
directory/trunks/naming/naming-config/src/test/org/apache/naming/config/XmlConfiguratorTest.java
directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/NotImplementedException.java
directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedure.java
directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureContainer.java
directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureDecoder.java
directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureGrammar.java
directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureStatesEnum.java
directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequest.java
directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureTest.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/BaseProtocolTest.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/AllTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/add/AllTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/add/BasicAddTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/add/BinaryDataAddTest.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/add/SpecialCharacterAddTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/compare/AllTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/compare/BasicCompareTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/compare/CompareOperationalAttributesTest.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/compare/MatchingRuleCompareTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/delete/AllTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/delete/BasicDeleteTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/delete/TreeDeleteControlTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/extended/AllTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/extended/UnknownExtendedOperationTest.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/modify/AllTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/modify/BasicModifyAddTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/modify/BasicModifyRemoveTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/modify/BasicModifyReplaceTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/modify/MixedModifyFailureTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/modifydn/AllTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/modifydn/BasicModifyDnTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/modifydn/ModifyDnSameAttributeTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/search/AllTests.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/search/IllegalSearchFilterTest.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/search/SearchFilterAttributeNamesTest.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/search/SearchFilterSimpleTest.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/ops/search/SearchScopeTest.java
directory/trunks/testsuites/src/main/java/org/apache/ldap/testsuite/ldaptests/jndi/util/AttributesFactory.java
Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LanguageSpecificStoredProceureExtendedOperationHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LanguageSpecificStoredProceureExtendedOperationHandler.java?rev=400067&r1=400066&r2=400067&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LanguageSpecificStoredProceureExtendedOperationHandler.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LanguageSpecificStoredProceureExtendedOperationHandler.java Fri May 5 05:52:49 2006
@@ -1,35 +1,35 @@
-/*
- * Copyright 2006 The Apache Software Foundation
- *
- * 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.
- *
- */
-
-
-package org.apache.directory.server.ldap.support.extended;
-
-import org.apache.directory.server.core.jndi.ServerLdapContext;
-import org.apache.directory.shared.ldap.codec.extended.operations.StoredProcedure;
-
-
-/**
- * An extension (hook) point that enables an implementor to provide his or her
- * own Language Specific Stored Procedure Extended Operation handler.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$ $Date$
- */
-public interface LanguageSpecificStoredProceureExtendedOperationHandler
-{
- void handleStoredProcedureExtendedOperation( ServerLdapContext ctx, StoredProcedure spBean ) throws Exception;
-}
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * 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.
+ *
+ */
+
+
+package org.apache.directory.server.ldap.support.extended;
+
+import org.apache.directory.server.core.jndi.ServerLdapContext;
+import org.apache.directory.shared.ldap.codec.extended.operations.StoredProcedure;
+
+
+/**
+ * An extension (hook) point that enables an implementor to provide his or her
+ * own Language Specific Stored Procedure Extended Operation handler.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$ $Date$
+ */
+public interface LanguageSpecificStoredProceureExtendedOperationHandler
+{
+ void handleStoredProcedureExtendedOperation( ServerLdapContext ctx, StoredProcedure spBean ) throws Exception;
+}
Propchange: directory/trunks/clients/ldap/project.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: directory/trunks/clients/ldap/project.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/filter/StreamWriteFilter.java
URL: http://svn.apache.org/viewcvs/directory/trunks/mina/core/src/main/java/org/apache/mina/filter/StreamWriteFilter.java?rev=400067&r1=400066&r2=400067&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/filter/StreamWriteFilter.java (original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/filter/StreamWriteFilter.java Fri May 5 05:52:49 2006
@@ -1,206 +1,206 @@
-/*
- * @(#) $Id$
- *
- * Copyright 2004 The Apache Software Foundation
- *
- * 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.
- *
- */
-package org.apache.mina.filter;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IoFilterAdapter;
-import org.apache.mina.common.IoSession;
-import org.apache.mina.common.WriteFuture;
-import org.apache.mina.util.Queue;
-
-/**
- * Filter implementation which makes it possible to write {@link InputStream}
- * objects directly using {@link IoSession#write(Object)}. When an
- * {@link InputStream} is written to a session this filter will read the bytes
- * from the stream into {@link ByteBuffer} objects and write those buffers
- * to the next filter. When end of stream has been reached this filter will
- * call {@link NextFilter#messageSent(IoSession, Object)} using the original
- * {@link InputStream} written to the session and call
- * {@link org.apache.mina.common.WriteFuture#setWritten(boolean)} on the
- * original {@link org.apache.mina.common.IoFilter.WriteRequest}.
- * <p>
- * This filter will ignore written messages which aren't {@link InputStream}
- * instances. Such messages will be passed to the next filter directly.
- * </p>
- * <p>
- * NOTE: this filter does not close the stream after all data from stream
- * has been written. The {@link org.apache.mina.common.IoHandler} should take
- * care of that in its
- * {@link org.apache.mina.common.IoHandler#messageSent(IoSession, Object)}
- * callback.
- * </p>
- *
- * @author The Apache Directory Project (mina-dev@directory.apache.org)
- * @version $Rev$, $Date$
- */
-public class StreamWriteFilter extends IoFilterAdapter
-{
- /**
- * The default buffer size this filter uses for writing.
- */
- public static final int DEFAULT_STREAM_BUFFER_SIZE = 4096;
-
- /**
- * The attribute name used when binding the {@link InputStream} to the session.
- */
- public static final String CURRENT_STREAM = StreamWriteFilter.class.getName() + ".stream";
-
- protected static final String WRITE_REQUEST_QUEUE = StreamWriteFilter.class.getName() + ".queue";
- protected static final String INITIAL_WRITE_FUTURE = StreamWriteFilter.class.getName() + ".future";
-
- private int writeBufferSize = DEFAULT_STREAM_BUFFER_SIZE;
-
- public void filterWrite( NextFilter nextFilter, IoSession session,
- WriteRequest writeRequest ) throws Exception
- {
- // If we're already processing a stream we need to queue the WriteRequest.
- if( session.getAttribute( CURRENT_STREAM ) != null )
- {
- Queue queue = ( Queue ) session.getAttribute( WRITE_REQUEST_QUEUE );
- if( queue == null )
- {
- queue = new Queue();
- session.setAttribute( WRITE_REQUEST_QUEUE, queue );
- }
- queue.push( writeRequest );
- return;
- }
-
- Object message = writeRequest.getMessage();
-
- if( message instanceof InputStream )
- {
-
- InputStream inputStream = ( InputStream ) message;
-
- ByteBuffer byteBuffer = getNextByteBuffer( inputStream );
- if ( byteBuffer == null )
- {
- // End of stream reached.
- writeRequest.getFuture().setWritten( true );
- nextFilter.messageSent( session, message );
- }
- else
- {
- session.setAttribute( CURRENT_STREAM, inputStream );
- session.setAttribute( INITIAL_WRITE_FUTURE, writeRequest.getFuture() );
-
- nextFilter.filterWrite( session, new WriteRequest( byteBuffer ) );
- }
-
- }
- else
- {
- nextFilter.filterWrite( session, writeRequest );
- }
- }
-
- public void messageSent( NextFilter nextFilter, IoSession session, Object message ) throws Exception
- {
- InputStream inputStream = ( InputStream ) session.getAttribute( CURRENT_STREAM );
-
- if( inputStream == null )
- {
- nextFilter.messageSent( session, message );
- }
- else
- {
- ByteBuffer byteBuffer = getNextByteBuffer( inputStream );
-
- if( byteBuffer == null )
- {
- // End of stream reached.
- session.removeAttribute( CURRENT_STREAM );
- WriteFuture writeFuture = ( WriteFuture ) session.removeAttribute( INITIAL_WRITE_FUTURE );
-
- // Write queued WriteRequests.
- Queue queue = ( Queue ) session.removeAttribute( WRITE_REQUEST_QUEUE );
- if( queue != null )
- {
- WriteRequest wr = ( WriteRequest ) queue.pop();
- while( wr != null )
- {
- filterWrite( nextFilter, session, wr );
- wr = ( WriteRequest ) queue.pop();
- }
- }
-
- writeFuture.setWritten( true );
- nextFilter.messageSent( session, inputStream );
- }
- else
- {
- nextFilter.filterWrite( session, new WriteRequest( byteBuffer ) );
- }
- }
- }
-
- private ByteBuffer getNextByteBuffer( InputStream is ) throws IOException
- {
- byte[] bytes = new byte[ writeBufferSize ];
-
- int off = 0;
- int n = 0;
- while( off < bytes.length &&
- ( n = is.read( bytes, off, bytes.length - off ) ) != -1 )
- {
- off += n;
- }
-
- if( n == -1 && off == 0 )
- {
- return null;
- }
-
- ByteBuffer buffer = ByteBuffer.wrap( bytes, 0, off );
-
- return buffer;
- }
-
- /**
- * Returns the size of the write buffer in bytes. Data will be read from the
- * stream in chunks of this size and then written to the next filter.
- *
- * @return the write buffer size.
- */
- public int getWriteBufferSize()
- {
- return writeBufferSize;
- }
-
- /**
- * Sets the size of the write buffer in bytes. Data will be read from the
- * stream in chunks of this size and then written to the next filter.
- *
- * @throws IllegalArgumentException if the specified size is < 1.
- */
- public void setWriteBufferSize( int writeBufferSize )
- {
- if( writeBufferSize < 1 )
- {
- throw new IllegalArgumentException( "writeBufferSize must be at least 1" );
- }
- this.writeBufferSize = writeBufferSize;
- }
-
-
-}
+/*
+ * @(#) $Id$
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * 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.
+ *
+ */
+package org.apache.mina.filter;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.common.IoFilterAdapter;
+import org.apache.mina.common.IoSession;
+import org.apache.mina.common.WriteFuture;
+import org.apache.mina.util.Queue;
+
+/**
+ * Filter implementation which makes it possible to write {@link InputStream}
+ * objects directly using {@link IoSession#write(Object)}. When an
+ * {@link InputStream} is written to a session this filter will read the bytes
+ * from the stream into {@link ByteBuffer} objects and write those buffers
+ * to the next filter. When end of stream has been reached this filter will
+ * call {@link NextFilter#messageSent(IoSession, Object)} using the original
+ * {@link InputStream} written to the session and call
+ * {@link org.apache.mina.common.WriteFuture#setWritten(boolean)} on the
+ * original {@link org.apache.mina.common.IoFilter.WriteRequest}.
+ * <p>
+ * This filter will ignore written messages which aren't {@link InputStream}
+ * instances. Such messages will be passed to the next filter directly.
+ * </p>
+ * <p>
+ * NOTE: this filter does not close the stream after all data from stream
+ * has been written. The {@link org.apache.mina.common.IoHandler} should take
+ * care of that in its
+ * {@link org.apache.mina.common.IoHandler#messageSent(IoSession, Object)}
+ * callback.
+ * </p>
+ *
+ * @author The Apache Directory Project (mina-dev@directory.apache.org)
+ * @version $Rev$, $Date$
+ */
+public class StreamWriteFilter extends IoFilterAdapter
+{
+ /**
+ * The default buffer size this filter uses for writing.
+ */
+ public static final int DEFAULT_STREAM_BUFFER_SIZE = 4096;
+
+ /**
+ * The attribute name used when binding the {@link InputStream} to the session.
+ */
+ public static final String CURRENT_STREAM = StreamWriteFilter.class.getName() + ".stream";
+
+ protected static final String WRITE_REQUEST_QUEUE = StreamWriteFilter.class.getName() + ".queue";
+ protected static final String INITIAL_WRITE_FUTURE = StreamWriteFilter.class.getName() + ".future";
+
+ private int writeBufferSize = DEFAULT_STREAM_BUFFER_SIZE;
+
+ public void filterWrite( NextFilter nextFilter, IoSession session,
+ WriteRequest writeRequest ) throws Exception
+ {
+ // If we're already processing a stream we need to queue the WriteRequest.
+ if( session.getAttribute( CURRENT_STREAM ) != null )
+ {
+ Queue queue = ( Queue ) session.getAttribute( WRITE_REQUEST_QUEUE );
+ if( queue == null )
+ {
+ queue = new Queue();
+ session.setAttribute( WRITE_REQUEST_QUEUE, queue );
+ }
+ queue.push( writeRequest );
+ return;
+ }
+
+ Object message = writeRequest.getMessage();
+
+ if( message instanceof InputStream )
+ {
+
+ InputStream inputStream = ( InputStream ) message;
+
+ ByteBuffer byteBuffer = getNextByteBuffer( inputStream );
+ if ( byteBuffer == null )
+ {
+ // End of stream reached.
+ writeRequest.getFuture().setWritten( true );
+ nextFilter.messageSent( session, message );
+ }
+ else
+ {
+ session.setAttribute( CURRENT_STREAM, inputStream );
+ session.setAttribute( INITIAL_WRITE_FUTURE, writeRequest.getFuture() );
+
+ nextFilter.filterWrite( session, new WriteRequest( byteBuffer ) );
+ }
+
+ }
+ else
+ {
+ nextFilter.filterWrite( session, writeRequest );
+ }
+ }
+
+ public void messageSent( NextFilter nextFilter, IoSession session, Object message ) throws Exception
+ {
+ InputStream inputStream = ( InputStream ) session.getAttribute( CURRENT_STREAM );
+
+ if( inputStream == null )
+ {
+ nextFilter.messageSent( session, message );
+ }
+ else
+ {
+ ByteBuffer byteBuffer = getNextByteBuffer( inputStream );
+
+ if( byteBuffer == null )
+ {
+ // End of stream reached.
+ session.removeAttribute( CURRENT_STREAM );
+ WriteFuture writeFuture = ( WriteFuture ) session.removeAttribute( INITIAL_WRITE_FUTURE );
+
+ // Write queued WriteRequests.
+ Queue queue = ( Queue ) session.removeAttribute( WRITE_REQUEST_QUEUE );
+ if( queue != null )
+ {
+ WriteRequest wr = ( WriteRequest ) queue.pop();
+ while( wr != null )
+ {
+ filterWrite( nextFilter, session, wr );
+ wr = ( WriteRequest ) queue.pop();
+ }
+ }
+
+ writeFuture.setWritten( true );
+ nextFilter.messageSent( session, inputStream );
+ }
+ else
+ {
+ nextFilter.filterWrite( session, new WriteRequest( byteBuffer ) );
+ }
+ }
+ }
+
+ private ByteBuffer getNextByteBuffer( InputStream is ) throws IOException
+ {
+ byte[] bytes = new byte[ writeBufferSize ];
+
+ int off = 0;
+ int n = 0;
+ while( off < bytes.length &&
+ ( n = is.read( bytes, off, bytes.length - off ) ) != -1 )
+ {
+ off += n;
+ }
+
+ if( n == -1 && off == 0 )
+ {
+ return null;
+ }
+
+ ByteBuffer buffer = ByteBuffer.wrap( bytes, 0, off );
+
+ return buffer;
+ }
+
+ /**
+ * Returns the size of the write buffer in bytes. Data will be read from the
+ * stream in chunks of this size and then written to the next filter.
+ *
+ * @return the write buffer size.
+ */
+ public int getWriteBufferSize()
+ {
+ return writeBufferSize;
+ }
+
+ /**
+ * Sets the size of the write buffer in bytes. Data will be read from the
+ * stream in chunks of this size and then written to the next filter.
+ *
+ * @throws IllegalArgumentException if the specified size is < 1.
+ */
+ public void setWriteBufferSize( int writeBufferSize )
+ {
+ if( writeBufferSize < 1 )
+ {
+ throw new IllegalArgumentException( "writeBufferSize must be at least 1" );
+ }
+ this.writeBufferSize = writeBufferSize;
+ }
+
+
+}
Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandler.java?rev=400067&r1=400066&r2=400067&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandler.java (original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandler.java Fri May 5 05:52:49 2006
@@ -1,108 +1,108 @@
-/*
- * @(#) $Id$
- *
- * Copyright 2004 The Apache Software Foundation
- *
- * 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.
- *
- */
-package org.apache.mina.handler.multiton;
-
-import java.io.IOException;
-
-import org.apache.mina.common.IdleStatus;
-import org.apache.mina.common.IoHandler;
-import org.apache.mina.common.IoSession;
-
-/**
- * A session handler without an {@link IoSession} parameter for simplicity.
- * <p>
- * A {@link SingleSessionIoHandler} is similar to an {@link IoHandler} with
- * the notable difference that a {@link SingleSessionIoHandler} is used only
- * by one session at a time. Thus, there is no {@link IoSession} parameter in
- * the methods of this interface.
- * </p>
- * <p>
- * Because events are passed to the session in order, it is possible to store
- * conversational state as instance variables in this object.
- * </p>
- *
- * @author The Apache Directory Project (mina-dev@directory.apache.org)
- * @version $Rev$, $Date$
- */
-public interface SingleSessionIoHandler
-{
-
- /**
- * Invoked when the session is created. Initialize default socket parameters
- * and user-defined attributes here.
- *
- * @throws Exception
- * @see IoHandler#sessionCreated(IoSession)
- */
- void sessionCreated() throws Exception;
-
- /**
- * Invoked when the connection is opened. This method is not invoked if the
- * transport type is UDP.
- *
- * @see IoHandler#sessionOpened(IoSession)
- */
- void sessionOpened() throws Exception;
-
- /**
- * Invoked when the connection is closed. This method is not invoked if the
- * transport type is UDP.
- *
- * @see IoHandler#sessionClosed(IoSession)
- */
- void sessionClosed() throws Exception;
-
- /**
- * Invoked when the connection is idle. Refer to {@link IdleStatus}. This
- * method is not invoked if the transport type is UDP.
- *
- * @param status the type of idleness
- * @see IoHandler#sessionIdle(IoSession, IdleStatus)
- */
- void sessionIdle(IdleStatus status) throws Exception;
-
- /**
- * Invoked when any exception is thrown by user {@link IoHandler}
- * implementation or by MINA. If <code>cause</code> is instanceof
- * {@link IOException}, MINA will close the connection automatically.
- *
- * @param cause the caught exception
- * @see IoHandler#exceptionCaught(IoSession, Throwable)
- */
- void exceptionCaught(Throwable cause) throws Exception;
-
- /**
- * Invoked when protocol message is received. Implement your protocol flow
- * here.
- *
- * @param message the received message
- * @see IoHandler#messageReceived(IoSession, Object)
- */
- void messageReceived(Object message) throws Exception;
-
- /**
- * Invoked when protocol message that user requested by
- * {@link IoSession#write(Object)} is sent out actually.
- *
- * @param message the sent message
- * @see IoHandler#messageSent(IoSession, Object)
- */
- void messageSent(Object message) throws Exception;
-
-}
+/*
+ * @(#) $Id$
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * 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.
+ *
+ */
+package org.apache.mina.handler.multiton;
+
+import java.io.IOException;
+
+import org.apache.mina.common.IdleStatus;
+import org.apache.mina.common.IoHandler;
+import org.apache.mina.common.IoSession;
+
+/**
+ * A session handler without an {@link IoSession} parameter for simplicity.
+ * <p>
+ * A {@link SingleSessionIoHandler} is similar to an {@link IoHandler} with
+ * the notable difference that a {@link SingleSessionIoHandler} is used only
+ * by one session at a time. Thus, there is no {@link IoSession} parameter in
+ * the methods of this interface.
+ * </p>
+ * <p>
+ * Because events are passed to the session in order, it is possible to store
+ * conversational state as instance variables in this object.
+ * </p>
+ *
+ * @author The Apache Directory Project (mina-dev@directory.apache.org)
+ * @version $Rev$, $Date$
+ */
+public interface SingleSessionIoHandler
+{
+
+ /**
+ * Invoked when the session is created. Initialize default socket parameters
+ * and user-defined attributes here.
+ *
+ * @throws Exception
+ * @see IoHandler#sessionCreated(IoSession)
+ */
+ void sessionCreated() throws Exception;
+
+ /**
+ * Invoked when the connection is opened. This method is not invoked if the
+ * transport type is UDP.
+ *
+ * @see IoHandler#sessionOpened(IoSession)
+ */
+ void sessionOpened() throws Exception;
+
+ /**
+ * Invoked when the connection is closed. This method is not invoked if the
+ * transport type is UDP.
+ *
+ * @see IoHandler#sessionClosed(IoSession)
+ */
+ void sessionClosed() throws Exception;
+
+ /**
+ * Invoked when the connection is idle. Refer to {@link IdleStatus}. This
+ * method is not invoked if the transport type is UDP.
+ *
+ * @param status the type of idleness
+ * @see IoHandler#sessionIdle(IoSession, IdleStatus)
+ */
+ void sessionIdle(IdleStatus status) throws Exception;
+
+ /**
+ * Invoked when any exception is thrown by user {@link IoHandler}
+ * implementation or by MINA. If <code>cause</code> is instanceof
+ * {@link IOException}, MINA will close the connection automatically.
+ *
+ * @param cause the caught exception
+ * @see IoHandler#exceptionCaught(IoSession, Throwable)
+ */
+ void exceptionCaught(Throwable cause) throws Exception;
+
+ /**
+ * Invoked when protocol message is received. Implement your protocol flow
+ * here.
+ *
+ * @param message the received message
+ * @see IoHandler#messageReceived(IoSession, Object)
+ */
+ void messageReceived(Object message) throws Exception;
+
+ /**
+ * Invoked when protocol message that user requested by
+ * {@link IoSession#write(Object)} is sent out actually.
+ *
+ * @param message the sent message
+ * @see IoHandler#messageSent(IoSession, Object)
+ */
+ void messageSent(Object message) throws Exception;
+
+}
Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerAdapter.java
URL: http://svn.apache.org/viewcvs/directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerAdapter.java?rev=400067&r1=400066&r2=400067&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerAdapter.java (original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerAdapter.java Fri May 5 05:52:49 2006
@@ -1,93 +1,93 @@
-/*
- * @(#) $Id$
- *
- * Copyright 2004 The Apache Software Foundation
- *
- * 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.
- *
- */
-package org.apache.mina.handler.multiton;
-
-import org.apache.mina.common.IdleStatus;
-import org.apache.mina.common.IoSession;
-import org.apache.mina.util.SessionUtil;
-
-/**
- * Adapter class for implementors of the {@link SingleSessionIoHandler}
- * interface. The session to which the handler is assigned is accessible
- * through the {@link #getSession()} method.
- *
- * @author The Apache Directory Project (mina-dev@directory.apache.org)
- * @version $Rev$, $Date$
- */
-public class SingleSessionIoHandlerAdapter implements SingleSessionIoHandler
-{
-
- /**
- * The session to which the handler is assigned.
- */
- private final IoSession session;
-
- /**
- * Creates a new instance that is assigned to the passed in session.
- *
- * @param session the session to which the handler is assigned
- */
- public SingleSessionIoHandlerAdapter(IoSession session)
- {
- if (session == null)
- {
- throw new NullPointerException("session");
- }
- this.session = session;
- }
-
- /**
- * Retrieves the session to which this handler is assigned.
- *
- * @return the session
- */
- protected IoSession getSession()
- {
- return session;
- }
-
- public void exceptionCaught(Throwable th) throws Exception
- {
- }
-
- public void messageReceived(Object message) throws Exception
- {
- }
-
- public void messageSent(Object message) throws Exception
- {
- }
-
- public void sessionClosed() throws Exception
- {
- }
-
- public void sessionCreated() throws Exception
- {
- SessionUtil.initialize( getSession() );
- }
-
- public void sessionIdle(IdleStatus status) throws Exception
- {
- }
-
- public void sessionOpened() throws Exception
- {
- }
-}
+/*
+ * @(#) $Id$
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * 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.
+ *
+ */
+package org.apache.mina.handler.multiton;
+
+import org.apache.mina.common.IdleStatus;
+import org.apache.mina.common.IoSession;
+import org.apache.mina.util.SessionUtil;
+
+/**
+ * Adapter class for implementors of the {@link SingleSessionIoHandler}
+ * interface. The session to which the handler is assigned is accessible
+ * through the {@link #getSession()} method.
+ *
+ * @author The Apache Directory Project (mina-dev@directory.apache.org)
+ * @version $Rev$, $Date$
+ */
+public class SingleSessionIoHandlerAdapter implements SingleSessionIoHandler
+{
+
+ /**
+ * The session to which the handler is assigned.
+ */
+ private final IoSession session;
+
+ /**
+ * Creates a new instance that is assigned to the passed in session.
+ *
+ * @param session the session to which the handler is assigned
+ */
+ public SingleSessionIoHandlerAdapter(IoSession session)
+ {
+ if (session == null)
+ {
+ throw new NullPointerException("session");
+ }
+ this.session = session;
+ }
+
+ /**
+ * Retrieves the session to which this handler is assigned.
+ *
+ * @return the session
+ */
+ protected IoSession getSession()
+ {
+ return session;
+ }
+
+ public void exceptionCaught(Throwable th) throws Exception
+ {
+ }
+
+ public void messageReceived(Object message) throws Exception
+ {
+ }
+
+ public void messageSent(Object message) throws Exception
+ {
+ }
+
+ public void sessionClosed() throws Exception
+ {
+ }
+
+ public void sessionCreated() throws Exception
+ {
+ SessionUtil.initialize( getSession() );
+ }
+
+ public void sessionIdle(IdleStatus status) throws Exception
+ {
+ }
+
+ public void sessionOpened() throws Exception
+ {
+ }
+}
Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java
URL: http://svn.apache.org/viewcvs/directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java?rev=400067&r1=400066&r2=400067&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java (original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java Fri May 5 05:52:49 2006
@@ -1,153 +1,153 @@
-/*
- * @(#) $Id$
- *
- * Copyright 2004 The Apache Software Foundation
- *
- * 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.
- *
- */
-package org.apache.mina.handler.multiton;
-
-import org.apache.mina.common.IdleStatus;
-import org.apache.mina.common.IoHandler;
-import org.apache.mina.common.IoSession;
-
-/**
- * An {@link IoHandler} implementation which delegates all requests to
- * {@link SingleSessionIoHandler}s. A {@link SingleSessionIoHandlerFactory}
- * is used to create a new {@link SingleSessionIoHandler} for each newly
- * created session.
- *
- * @author The Apache Directory Project (mina-dev@directory.apache.org)
- * @version $Rev$, $Date$
- */
-public class SingleSessionIoHandlerDelegate implements IoHandler
-{
- /**
- * The key used to store the {@link SingleSessionIoHandler} as a session
- * attribute.
- */
- public static final String HANDLER =
- SingleSessionIoHandlerDelegate.class.getName() + ".handler";
-
- /**
- * The {@link SingleSessionIoHandlerFactory} used to create new
- * {@link SingleSessionIoHandler}s.
- */
- private final SingleSessionIoHandlerFactory factory;
-
- /**
- * Creates a new instance that uses the passed in
- * {@link SingleSessionIoHandlerFactory} to create new
- * {@link SingleSessionIoHandler}s.
- *
- * @param factory the factory for {@link SingleSessionIoHandler}s
- */
- public SingleSessionIoHandlerDelegate( SingleSessionIoHandlerFactory factory )
- {
- if (factory == null)
- {
- throw new NullPointerException("factory");
- }
- this.factory = factory;
- }
-
- /**
- * Creates a new instance with the factory passed to the constructor of
- * this class. The created handler is stored as a session
- * attribute named {@link #HANDLER}.
- *
- * @see org.apache.mina.common.IoHandler#sessionCreated(org.apache.mina.common.IoSession)
- */
- public void sessionCreated(IoSession session) throws Exception
- {
- SingleSessionIoHandler handler = factory.getHandler(session);
- session.setAttribute(HANDLER, handler);
- handler.sessionCreated();
- }
-
- /**
- * Delegates the method call to the
- * {@link SingleSessionIoHandler#sessionOpened()} method of the handler
- * assigned to this session.
- */
- public void sessionOpened(IoSession session) throws Exception
- {
- SingleSessionIoHandler handler = (SingleSessionIoHandler)
- session.getAttribute(HANDLER);
- handler.sessionOpened();
- }
-
- /**
- * Delegates the method call to the
- * {@link SingleSessionIoHandler#sessionClosed()} method of the handler
- * assigned to this session.
- */
- public void sessionClosed(IoSession session) throws Exception
- {
- SingleSessionIoHandler handler = (SingleSessionIoHandler)
- session.getAttribute(HANDLER);
- handler.sessionClosed();
- }
-
- /**
- * Delegates the method call to the
- * {@link SingleSessionIoHandler#sessionIdle(IdleStatus)} method of the
- * handler assigned to this session.
- */
- public void sessionIdle(IoSession session, IdleStatus status)
- throws Exception
- {
- SingleSessionIoHandler handler = (SingleSessionIoHandler)
- session.getAttribute(HANDLER);
- handler.sessionIdle(status);
- }
-
- /**
- * Delegates the method call to the
- * {@link SingleSessionIoHandler#exceptionCaught(Throwable)} method of the
- * handler assigned to this session.
- */
- public void exceptionCaught(IoSession session, Throwable cause)
- throws Exception
- {
- SingleSessionIoHandler handler = (SingleSessionIoHandler)
- session.getAttribute(HANDLER);
- handler.exceptionCaught(cause);
- }
-
- /**
- * Delegates the method call to the
- * {@link SingleSessionIoHandler#messageReceived(Object)} method of the
- * handler assigned to this session.
- */
- public void messageReceived(IoSession session, Object message)
- throws Exception
- {
- SingleSessionIoHandler handler = (SingleSessionIoHandler)
- session.getAttribute(HANDLER);
- handler.messageReceived(message);
- }
-
- /**
- * Delegates the method call to the
- * {@link SingleSessionIoHandler#messageSent(Object)} method of the handler
- * assigned to this session.
- */
- public void messageSent(IoSession session, Object message) throws Exception
- {
- SingleSessionIoHandler handler = (SingleSessionIoHandler)
- session.getAttribute(HANDLER);
- handler.messageSent(message);
- }
-}
+/*
+ * @(#) $Id$
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * 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.
+ *
+ */
+package org.apache.mina.handler.multiton;
+
+import org.apache.mina.common.IdleStatus;
+import org.apache.mina.common.IoHandler;
+import org.apache.mina.common.IoSession;
+
+/**
+ * An {@link IoHandler} implementation which delegates all requests to
+ * {@link SingleSessionIoHandler}s. A {@link SingleSessionIoHandlerFactory}
+ * is used to create a new {@link SingleSessionIoHandler} for each newly
+ * created session.
+ *
+ * @author The Apache Directory Project (mina-dev@directory.apache.org)
+ * @version $Rev$, $Date$
+ */
+public class SingleSessionIoHandlerDelegate implements IoHandler
+{
+ /**
+ * The key used to store the {@link SingleSessionIoHandler} as a session
+ * attribute.
+ */
+ public static final String HANDLER =
+ SingleSessionIoHandlerDelegate.class.getName() + ".handler";
+
+ /**
+ * The {@link SingleSessionIoHandlerFactory} used to create new
+ * {@link SingleSessionIoHandler}s.
+ */
+ private final SingleSessionIoHandlerFactory factory;
+
+ /**
+ * Creates a new instance that uses the passed in
+ * {@link SingleSessionIoHandlerFactory} to create new
+ * {@link SingleSessionIoHandler}s.
+ *
+ * @param factory the factory for {@link SingleSessionIoHandler}s
+ */
+ public SingleSessionIoHandlerDelegate( SingleSessionIoHandlerFactory factory )
+ {
+ if (factory == null)
+ {
+ throw new NullPointerException("factory");
+ }
+ this.factory = factory;
+ }
+
+ /**
+ * Creates a new instance with the factory passed to the constructor of
+ * this class. The created handler is stored as a session
+ * attribute named {@link #HANDLER}.
+ *
+ * @see org.apache.mina.common.IoHandler#sessionCreated(org.apache.mina.common.IoSession)
+ */
+ public void sessionCreated(IoSession session) throws Exception
+ {
+ SingleSessionIoHandler handler = factory.getHandler(session);
+ session.setAttribute(HANDLER, handler);
+ handler.sessionCreated();
+ }
+
+ /**
+ * Delegates the method call to the
+ * {@link SingleSessionIoHandler#sessionOpened()} method of the handler
+ * assigned to this session.
+ */
+ public void sessionOpened(IoSession session) throws Exception
+ {
+ SingleSessionIoHandler handler = (SingleSessionIoHandler)
+ session.getAttribute(HANDLER);
+ handler.sessionOpened();
+ }
+
+ /**
+ * Delegates the method call to the
+ * {@link SingleSessionIoHandler#sessionClosed()} method of the handler
+ * assigned to this session.
+ */
+ public void sessionClosed(IoSession session) throws Exception
+ {
+ SingleSessionIoHandler handler = (SingleSessionIoHandler)
+ session.getAttribute(HANDLER);
+ handler.sessionClosed();
+ }
+
+ /**
+ * Delegates the method call to the
+ * {@link SingleSessionIoHandler#sessionIdle(IdleStatus)} method of the
+ * handler assigned to this session.
+ */
+ public void sessionIdle(IoSession session, IdleStatus status)
+ throws Exception
+ {
+ SingleSessionIoHandler handler = (SingleSessionIoHandler)
+ session.getAttribute(HANDLER);
+ handler.sessionIdle(status);
+ }
+
+ /**
+ * Delegates the method call to the
+ * {@link SingleSessionIoHandler#exceptionCaught(Throwable)} method of the
+ * handler assigned to this session.
+ */
+ public void exceptionCaught(IoSession session, Throwable cause)
+ throws Exception
+ {
+ SingleSessionIoHandler handler = (SingleSessionIoHandler)
+ session.getAttribute(HANDLER);
+ handler.exceptionCaught(cause);
+ }
+
+ /**
+ * Delegates the method call to the
+ * {@link SingleSessionIoHandler#messageReceived(Object)} method of the
+ * handler assigned to this session.
+ */
+ public void messageReceived(IoSession session, Object message)
+ throws Exception
+ {
+ SingleSessionIoHandler handler = (SingleSessionIoHandler)
+ session.getAttribute(HANDLER);
+ handler.messageReceived(message);
+ }
+
+ /**
+ * Delegates the method call to the
+ * {@link SingleSessionIoHandler#messageSent(Object)} method of the handler
+ * assigned to this session.
+ */
+ public void messageSent(IoSession session, Object message) throws Exception
+ {
+ SingleSessionIoHandler handler = (SingleSessionIoHandler)
+ session.getAttribute(HANDLER);
+ handler.messageSent(message);
+ }
+}
Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerFactory.java
URL: http://svn.apache.org/viewcvs/directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerFactory.java?rev=400067&r1=400066&r2=400067&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerFactory.java (original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerFactory.java Fri May 5 05:52:49 2006
@@ -1,40 +1,40 @@
-/*
- * @(#) $Id$
- *
- * Copyright 2004 The Apache Software Foundation
- *
- * 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.
- *
- */
-package org.apache.mina.handler.multiton;
-
-import org.apache.mina.common.IoSession;
-
-/**
- * A factory that creates {@link SingleSessionIoHandler} to be used with one
- * particular session.
- *
- * @see SingleSessionIoHandler
- *
- * @author The Apache Directory Project (mina-dev@directory.apache.org)
- * @version $Rev$, $Date$
- */
-public interface SingleSessionIoHandlerFactory {
-
- /**
- * Returns a {@link SingleSessionIoHandler} for the given session.
- *
- * @param session the session for which a handler is requested
- */
- SingleSessionIoHandler getHandler(IoSession session);
-}
+/*
+ * @(#) $Id$
+ *
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * 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.
+ *
+ */
+package org.apache.mina.handler.multiton;
+
+import org.apache.mina.common.IoSession;
+
+/**
+ * A factory that creates {@link SingleSessionIoHandler} to be used with one
+ * particular session.
+ *
+ * @see SingleSessionIoHandler
+ *
+ * @author The Apache Directory Project (mina-dev@directory.apache.org)
+ * @version $Rev$, $Date$
+ */
+public interface SingleSessionIoHandlerFactory {
+
+ /**
+ * Returns a {@link SingleSessionIoHandler} for the given session.
+ *
+ * @param session the session for which a handler is requested
+ */
+ SingleSessionIoHandler getHandler(IoSession session);
+}