Author: trustin
Date: Mon Dec 4 19:36:48 2006
New Revision: 482473
URL: http://svn.apache.org/viewvc?view=rev&rev=482473
Log:
* Resolved issue: DIRMINA-319 (DatagramConnector doesn't need IoSessionRecycler
at all.)
** Removed DatagramService
* Updated license information
* Removed duplicate license information
Added:
mina/trunk/LICENSE.jzlib.txt
mina/trunk/LICENSE.slf4j.txt
mina/trunk/LICENSE.springframework.txt
mina/trunk/LICENSE.txt
mina/trunk/NOTICE.txt
Removed:
mina/trunk/core/LICENSE.txt
mina/trunk/core/NOTICE.txt
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramService.java
mina/trunk/example/LICENSE.txt
mina/trunk/example/NOTICE.txt
mina/trunk/filter-codec-netty/LICENSE.txt
mina/trunk/filter-codec-netty/NOTICE.txt
mina/trunk/filter-compression/LICENSE.txt
mina/trunk/filter-compression/NOTICE.txt
mina/trunk/filter-ssl/LICENSE.txt
mina/trunk/filter-ssl/NOTICE.txt
mina/trunk/integration-jmx/LICENSE.txt
mina/trunk/integration-jmx/NOTICE.txt
mina/trunk/integration-spring/LICENSE.txt
mina/trunk/integration-spring/NOTICE.txt
Modified:
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramService.java
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java
mina/trunk/core/src/test/java/org/apache/mina/transport/socket/nio/DatagramRecyclerTest.java
mina/trunk/doap.rdf
Added: mina/trunk/LICENSE.jzlib.txt
URL:
http://svn.apache.org/viewvc/mina/trunk/LICENSE.jzlib.txt?view=auto&rev=482473
==============================================================================
--- mina/trunk/LICENSE.jzlib.txt (added)
+++ mina/trunk/LICENSE.jzlib.txt Mon Dec 4 19:36:48 2006
@@ -0,0 +1,29 @@
+JZlib 0.0.* were released under the GNU LGPL license. Later, we have switched
+over to a BSD-style license.
+
+------------------------------------------------------------------------------
+Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. The names of the authors may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
+INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Added: mina/trunk/LICENSE.slf4j.txt
URL:
http://svn.apache.org/viewvc/mina/trunk/LICENSE.slf4j.txt?view=auto&rev=482473
==============================================================================
--- mina/trunk/LICENSE.slf4j.txt (added)
+++ mina/trunk/LICENSE.slf4j.txt Mon Dec 4 19:36:48 2006
@@ -0,0 +1,30 @@
+Copyright (c) 2004-2005 SLF4J.ORG
+Copyright (c) 2004-2005 QOS.ch
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, and/or sell copies of the Software, and to permit persons
+to whom the Software is furnished to do so, provided that the above
+copyright notice(s) and this permission notice appear in all copies of
+the Software and that both the above copyright notice(s) and this
+permission notice appear in supporting documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY
+SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
+RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale, use
+or other dealings in this Software without prior written authorization
+of the copyright holder.
+
Added: mina/trunk/LICENSE.springframework.txt
URL:
http://svn.apache.org/viewvc/mina/trunk/LICENSE.springframework.txt?view=auto&rev=482473
==============================================================================
--- mina/trunk/LICENSE.springframework.txt (added)
+++ mina/trunk/LICENSE.springframework.txt Mon Dec 4 19:36:48 2006
@@ -0,0 +1,177 @@
+ 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
+
Added: mina/trunk/LICENSE.txt
URL: http://svn.apache.org/viewvc/mina/trunk/LICENSE.txt?view=auto&rev=482473
==============================================================================
--- mina/trunk/LICENSE.txt (added)
+++ mina/trunk/LICENSE.txt Mon Dec 4 19:36:48 2006
@@ -0,0 +1,177 @@
+ 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
+
Added: mina/trunk/NOTICE.txt
URL: http://svn.apache.org/viewvc/mina/trunk/NOTICE.txt?view=auto&rev=482473
==============================================================================
--- mina/trunk/NOTICE.txt (added)
+++ mina/trunk/NOTICE.txt Mon Dec 4 19:36:48 2006
@@ -0,0 +1,26 @@
+Apache MINA
+Copyright 2006 The Apache Software Foundation.
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+Message logging is provided by the SLF4J library package,
+which is open source software, written by Ceki Gülcü, and
+copyright by SLF4J.ORG and QOS.ch. The original software is
+available from
+
+ http://www.slf4j.org/
+
+Data compression support is provided by the JZLib library package,
+which is open source software, written by JCraft, and copyright
+by JCraft. The original software is available from
+
+ http://www.jcraft.com/jzlib/
+
+Spring framework is provided by the Spring framework library
+package, which is open source software, written by Rod Johnson
+et al, and copyright by Springframework.org. The original
+software is available from
+
+ http://www.springframework.org/
+
Modified:
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
URL:
http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java?view=diff&rev=482473&r1=482472&r2=482473
==============================================================================
---
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
(original)
+++
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
Mon Dec 4 19:36:48 2006
@@ -33,7 +33,7 @@
* @author The Apache Directory Project ([email protected])
* @version $Rev$, $Date$
*/
-public class DatagramAcceptor extends DelegatedIoAcceptor implements
DatagramService
+public class DatagramAcceptor extends DelegatedIoAcceptor
{
/**
* Creates a new instance using a NewThreadExecutor
@@ -53,11 +53,19 @@
init( new DatagramAcceptorDelegate( this, executor ) );
}
+ /**
+ * Returns the [EMAIL PROTECTED] IoSessionRecycler} for this service.
+ */
public IoSessionRecycler getSessionRecycler()
{
return ( ( DatagramAcceptorDelegate ) delegate ).getSessionRecycler();
}
+ /**
+ * Sets the [EMAIL PROTECTED] IoSessionRecycler} for this service.
+ *
+ * @param sessionRecycler <tt>null</tt> to use the default recycler
+ */
public void setSessionRecycler( IoSessionRecycler sessionRecycler )
{
( ( DatagramAcceptorDelegate ) delegate ).setSessionRecycler(
sessionRecycler );
Modified:
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
URL:
http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java?view=diff&rev=482473&r1=482472&r2=482473
==============================================================================
---
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
(original)
+++
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
Mon Dec 4 19:36:48 2006
@@ -22,7 +22,6 @@
import java.util.concurrent.Executor;
import org.apache.mina.common.IoConnector;
-import org.apache.mina.common.IoSessionRecycler;
import org.apache.mina.common.support.DelegatedIoConnector;
import org.apache.mina.transport.socket.nio.support.DatagramConnectorDelegate;
import org.apache.mina.util.NewThreadExecutor;
@@ -33,7 +32,7 @@
* @author The Apache Directory Project ([email protected])
* @version $Rev$, $Date$
*/
-public class DatagramConnector extends DelegatedIoConnector implements
DatagramService
+public class DatagramConnector extends DelegatedIoConnector
{
/**
* Creates a new instance using a NewThreadExecutor
@@ -51,15 +50,5 @@
public DatagramConnector( Executor executor )
{
init( new DatagramConnectorDelegate( this, executor ) );
- }
-
- public IoSessionRecycler getSessionRecycler()
- {
- return ( ( DatagramConnectorDelegate ) delegate ).getSessionRecycler();
- }
-
- public void setSessionRecycler( IoSessionRecycler sessionRecycler )
- {
- ( ( DatagramConnectorDelegate ) delegate ).setSessionRecycler(
sessionRecycler );
}
}
Modified:
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
URL:
http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java?view=diff&rev=482473&r1=482472&r2=482473
==============================================================================
---
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
(original)
+++
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
Mon Dec 4 19:36:48 2006
@@ -34,11 +34,9 @@
import org.apache.mina.common.ByteBuffer;
import org.apache.mina.common.ConnectFuture;
import org.apache.mina.common.ExceptionMonitor;
-import org.apache.mina.common.ExpiringSessionRecycler;
import org.apache.mina.common.IoConnector;
import org.apache.mina.common.IoSession;
import org.apache.mina.common.IoSessionConfig;
-import org.apache.mina.common.IoSessionRecycler;
import org.apache.mina.common.RuntimeIOException;
import org.apache.mina.common.IoFilter.WriteRequest;
import org.apache.mina.common.support.AbstractIoFilterChain;
@@ -56,12 +54,8 @@
*/
public class DatagramConnectorDelegate extends BaseIoConnector implements
DatagramService
{
- private static final IoSessionRecycler DEFAULT_RECYCLER = new
ExpiringSessionRecycler();
-
private static volatile int nextId = 0;
- private IoSessionRecycler sessionRecycler = DEFAULT_RECYCLER;
-
private final IoConnector wrapper;
private final Executor executor;
private final int id = nextId ++ ;
@@ -172,21 +166,6 @@
return request;
}
- public IoSessionRecycler getSessionRecycler()
- {
- return sessionRecycler;
- }
-
- // FIXME There can be a problem if a user changes the recycler after the
service is activated.
- public void setSessionRecycler( IoSessionRecycler sessionRecycler )
- {
- if( sessionRecycler == null )
- {
- sessionRecycler = DEFAULT_RECYCLER;
- }
- this.sessionRecycler = sessionRecycler;
- }
-
private synchronized void startupWorker()
{
if( worker == null )
@@ -338,13 +317,6 @@
DatagramSessionImpl session = ( DatagramSessionImpl )
key.attachment();
- DatagramSessionImpl replaceSession = getRecycledSession(session);
-
- if(replaceSession != null)
- {
- session = replaceSession;
- }
-
if( key.isReadable() && session.getTrafficMask().isReadable() )
{
readSession( session );
@@ -357,30 +329,6 @@
}
}
- private DatagramSessionImpl getRecycledSession( IoSession session )
- {
- IoSessionRecycler sessionRecycler = getSessionRecycler();
- DatagramSessionImpl replaceSession = null;
-
- if ( sessionRecycler != null )
- {
- synchronized ( sessionRecycler )
- {
- replaceSession = ( DatagramSessionImpl )
sessionRecycler.recycle( session.getLocalAddress(), session
- .getRemoteAddress() );
-
- if ( replaceSession != null )
- {
- return replaceSession;
- }
-
- sessionRecycler.put( session );
- }
- }
-
- return null;
- }
-
private void readSession( DatagramSessionImpl session )
{
@@ -514,22 +462,13 @@
boolean success = false;
try
{
- DatagramSessionImpl replaceSession = getRecycledSession(
session );
-
- if ( replaceSession != null )
- {
- session = replaceSession;
- }
- else
- {
- SelectionKey key = req.channel.register( selector,
- SelectionKey.OP_READ, session );
+ SelectionKey key = req.channel.register( selector,
+ SelectionKey.OP_READ, session );
- session.setSelectionKey( key );
- buildFilterChain( session );
- // The CONNECT_FUTURE attribute is cleared and notified
here.
- getListeners().fireSessionCreated( session );
- }
+ session.setSelectionKey( key );
+ buildFilterChain( session );
+ // The CONNECT_FUTURE attribute is cleared and notified here.
+ getListeners().fireSessionCreated( session );
success = true;
}
catch( Throwable t )
Modified:
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramService.java
URL:
http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramService.java?view=diff&rev=482473&r1=482472&r2=482473
==============================================================================
---
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramService.java
(original)
+++
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramService.java
Mon Dec 4 19:36:48 2006
@@ -26,7 +26,7 @@
* @author The Apache Directory Project ([email protected])
* @version $Rev$, $Date$
*/
-interface DatagramService extends
org.apache.mina.transport.socket.nio.DatagramService
+interface DatagramService
{
/**
* Requests this processor to flush the write buffer of the specified
Modified:
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java
URL:
http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java?view=diff&rev=482473&r1=482472&r2=482473
==============================================================================
---
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java
(original)
+++
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramSessionImpl.java
Mon Dec 4 19:36:48 2006
@@ -163,7 +163,10 @@
protected void close0()
{
- managerDelegate.getSessionRecycler().remove( this );
+ if( managerDelegate instanceof IoAcceptor )
+ {
+ ( ( DatagramAcceptorDelegate ) managerDelegate
).getSessionRecycler().remove( this );
+ }
filterChain.fireFilterClose( this );
}
Modified:
mina/trunk/core/src/test/java/org/apache/mina/transport/socket/nio/DatagramRecyclerTest.java
URL:
http://svn.apache.org/viewvc/mina/trunk/core/src/test/java/org/apache/mina/transport/socket/nio/DatagramRecyclerTest.java?view=diff&rev=482473&r1=482472&r2=482473
==============================================================================
---
mina/trunk/core/src/test/java/org/apache/mina/transport/socket/nio/DatagramRecyclerTest.java
(original)
+++
mina/trunk/core/src/test/java/org/apache/mina/transport/socket/nio/DatagramRecyclerTest.java
Mon Dec 4 19:36:48 2006
@@ -63,17 +63,27 @@
try
{
connector.setHandler( connectorHandler );
- connector.setSessionRecycler( recycler );
ConnectFuture future = connector.connect( new InetSocketAddress(
"localhost", port ) );
future.join();
// Write whatever to trigger the acceptor.
future.getSession().write( ByteBuffer.allocate(1) ).join();
- // Wait until the connection is closed.
- future.getSession().getCloseFuture().join( 3000 );
+ // Close the client-side connection.
+ // This doesn't mean that the acceptor-side connection is also
closed.
+ // The lifecycle of the acceptor-side connection is managed by the
recycler.
+ future.getSession().close();
+ future.getSession().getCloseFuture().join();
Assert.assertTrue( future.getSession().getCloseFuture().isClosed()
);
+
+ // Wait until the acceptor-side connection is closed.
+ while( acceptorHandler.session == null )
+ {
+ Thread.yield();
+ }
acceptorHandler.session.getCloseFuture().join( 3000 );
+
+ // Is it closed?
Assert.assertTrue(
acceptorHandler.session.getCloseFuture().isClosed() );
Thread.sleep( 1000 );
Modified: mina/trunk/doap.rdf
URL:
http://svn.apache.org/viewvc/mina/trunk/doap.rdf?view=diff&rev=482473&r1=482472&r2=482473
==============================================================================
--- mina/trunk/doap.rdf (original)
+++ mina/trunk/doap.rdf Mon Dec 4 19:36:48 2006
@@ -13,38 +13,31 @@
=======================================================================
-->
- <Project rdf:about="http://directory.apache.org/subprojects/mina/">
+ <Project rdf:about="http://mina.apache.org/">
<created>2006-04-04</created>
<license rdf:resource="http://usefulinc.com/doap/licenses/asl20" />
<name>Apache MINA</name>
- <homepage rdf:resource="http://directory.apache.org/subprojects/mina/" />
- <asfext:pmc rdf:resource="http://directory.apache.org" />
+ <homepage rdf:resource="http://mina.apache.org/" />
+ <asfext:pmc rdf:resource="http://mina.apache.org" />
<shortdesc>A network application framework</shortdesc>
<description>Apache MINA (Multipurpose Infrastructure for Network
Applications) is a network application framework which helps users develop
network applications easily by providing abstractions of network and protocol
I/O layers.</description>
<bug-database rdf:resource="http://issues.apache.org/jira/browse/DIRMINA"
/>
- <mailing-list
rdf:resource="http://directory.apache.org/subprojects/mina/mail-lists.html" />
- <download-page
rdf:resource="http://www.apache.org/dyn/closer.cgi/directory/mina/" />
+ <mailing-list rdf:resource="http://mina.apache.org/mailing-lists.html" />
+ <download-page rdf:resource="http://www.apache.org/dyn/closer.cgi/mina/" />
<programming-language>Java</programming-language>
<category
rdf:resource="http://projects.apache.org/category/network-client" />
<category
rdf:resource="http://projects.apache.org/category/network-server" />
<release>
<Version>
<name>Stable branch</name>
- <created>2005-02-25</created>
- <revision>0.8.2</revision>
- </Version>
- </release>
- <release>
- <Version>
- <name>Unstable branch</name>
- <created>2005-04-04</created>
- <revision>0.9.3</revision>
+ <created>2006-10-02</created>
+ <revision>1.0</revision>
</Version>
</release>
<repository>
<SVNRepository>
- <location
rdf:resource="https://svn.apache.org/repos/asf/directory/trunks/mina"/>
- <browse
rdf:resource="http://svn.apache.org/viewcvs.cgi/directory/trunks/mina/"/>
+ <location rdf:resource="https://svn.apache.org/repos/asf/mina"/>
+ <browse rdf:resource="http://svn.apache.org/viewcvs.cgi/mina/"/>
</SVNRepository>
</repository>
<maintainer>