You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by el...@apache.org on 2012/10/22 17:10:22 UTC
svn commit: r1400908 - in /mina/site/trunk/content/mina/userguide:
ch1-getting-started/ ch10-iobuffer/ ch10/ ch11-codec-filter/ ch11/
ch12-executor-filter/ ch12/ ch13-ssl-filter/ ch13/ ch14-logging-filter/
ch14/ ch15-debugging/ ch15/ ch16-state-machine...
Author: elecharny
Date: Mon Oct 22 15:10:20 2012
New Revision: 1400908
URL: http://svn.apache.org/viewvc?rev=1400908&view=rev
Log:
Renamed many pages, added the scroll navigation on each page
Added:
mina/site/trunk/content/mina/userguide/ch10-iobuffer/
- copied from r1400842, mina/site/trunk/content/mina/userguide/ch10/
mina/site/trunk/content/mina/userguide/ch10-iobuffer/ch10-iobuffer.mdtext
- copied, changed from r1400842, mina/site/trunk/content/mina/userguide/ch10/ch10.mdtext
mina/site/trunk/content/mina/userguide/ch11-codec-filter/
- copied from r1400842, mina/site/trunk/content/mina/userguide/ch11/
mina/site/trunk/content/mina/userguide/ch11-codec-filter/ch11-codec-filter.mdtext
- copied, changed from r1400842, mina/site/trunk/content/mina/userguide/ch11/ch11.mdtext
mina/site/trunk/content/mina/userguide/ch12-executor-filter/
- copied from r1400842, mina/site/trunk/content/mina/userguide/ch12/
mina/site/trunk/content/mina/userguide/ch12-executor-filter/ch12-executor-filter.mdtext
- copied, changed from r1400842, mina/site/trunk/content/mina/userguide/ch12/ch12.mdtext
mina/site/trunk/content/mina/userguide/ch13-ssl-filter/
- copied from r1400842, mina/site/trunk/content/mina/userguide/ch13/
mina/site/trunk/content/mina/userguide/ch13-ssl-filter/ch13-ssl-filter.mdtext
- copied, changed from r1400842, mina/site/trunk/content/mina/userguide/ch13/ch13.mdtext
mina/site/trunk/content/mina/userguide/ch14-logging-filter/
- copied from r1400842, mina/site/trunk/content/mina/userguide/ch14/
mina/site/trunk/content/mina/userguide/ch14-logging-filter/ch14-logging-filter.mdtext
- copied, changed from r1400842, mina/site/trunk/content/mina/userguide/ch14/ch14.mdtext
mina/site/trunk/content/mina/userguide/ch15-debugging/
- copied from r1400842, mina/site/trunk/content/mina/userguide/ch15/
mina/site/trunk/content/mina/userguide/ch15-debugging/ch15-debugging.mdtext
- copied, changed from r1400842, mina/site/trunk/content/mina/userguide/ch15/ch15.mdtext
mina/site/trunk/content/mina/userguide/ch16-state-machine/
- copied from r1400842, mina/site/trunk/content/mina/userguide/ch16/
mina/site/trunk/content/mina/userguide/ch16-state-machine/ch16-state-machine.mdtext
- copied, changed from r1400842, mina/site/trunk/content/mina/userguide/ch16/ch16.mdtext
mina/site/trunk/content/mina/userguide/ch17-proxy/
- copied from r1400842, mina/site/trunk/content/mina/userguide/ch17/
mina/site/trunk/content/mina/userguide/ch17-proxy/ch17-proxy.mdtext
- copied, changed from r1400842, mina/site/trunk/content/mina/userguide/ch17/ch17.mdtext
mina/site/trunk/content/mina/userguide/ch18-jmx-support/
- copied from r1400842, mina/site/trunk/content/mina/userguide/ch18/
mina/site/trunk/content/mina/userguide/ch18-jmx-support/ch18-jmx-support.mdtext
- copied, changed from r1400842, mina/site/trunk/content/mina/userguide/ch18/ch18.mdtext
mina/site/trunk/content/mina/userguide/ch19-spring-integration/
- copied from r1400842, mina/site/trunk/content/mina/userguide/ch19/
mina/site/trunk/content/mina/userguide/ch19-spring-integration/ch19-spring-integration.mdtext
- copied, changed from r1400842, mina/site/trunk/content/mina/userguide/ch19/ch19.mdtext
mina/site/trunk/content/mina/userguide/ch8-acceptor/
- copied from r1400842, mina/site/trunk/content/mina/userguide/ch8/
mina/site/trunk/content/mina/userguide/ch8-acceptor/ch8-acceptor.mdtext
- copied, changed from r1400842, mina/site/trunk/content/mina/userguide/ch8/ch8.mdtext
mina/site/trunk/content/mina/userguide/ch9-connector/
- copied from r1400842, mina/site/trunk/content/mina/userguide/ch9/
mina/site/trunk/content/mina/userguide/ch9-connector/ch9-connector.mdtext
- copied, changed from r1400842, mina/site/trunk/content/mina/userguide/ch9/ch9.mdtext
Removed:
mina/site/trunk/content/mina/userguide/ch10/
mina/site/trunk/content/mina/userguide/ch10-iobuffer/ch10.mdtext
mina/site/trunk/content/mina/userguide/ch11/
mina/site/trunk/content/mina/userguide/ch11-codec-filter/ch11.mdtext
mina/site/trunk/content/mina/userguide/ch12/
mina/site/trunk/content/mina/userguide/ch12-executor-filter/ch12.mdtext
mina/site/trunk/content/mina/userguide/ch13/
mina/site/trunk/content/mina/userguide/ch13-ssl-filter/ch13.mdtext
mina/site/trunk/content/mina/userguide/ch14/
mina/site/trunk/content/mina/userguide/ch14-logging-filter/ch14.mdtext
mina/site/trunk/content/mina/userguide/ch15/
mina/site/trunk/content/mina/userguide/ch15-debugging/ch15.mdtext
mina/site/trunk/content/mina/userguide/ch16/
mina/site/trunk/content/mina/userguide/ch16-state-machine/ch16.mdtext
mina/site/trunk/content/mina/userguide/ch17/
mina/site/trunk/content/mina/userguide/ch17-proxy/ch17.mdtext
mina/site/trunk/content/mina/userguide/ch18/
mina/site/trunk/content/mina/userguide/ch18-jmx-support/ch18.mdtext
mina/site/trunk/content/mina/userguide/ch19/
mina/site/trunk/content/mina/userguide/ch19-spring-integration/ch19.mdtext
mina/site/trunk/content/mina/userguide/ch8/
mina/site/trunk/content/mina/userguide/ch8-acceptor/ch8.mdtext
mina/site/trunk/content/mina/userguide/ch9/
mina/site/trunk/content/mina/userguide/ch9-connector/ch9.mdtext
Modified:
mina/site/trunk/content/mina/userguide/ch1-getting-started/ch1-getting-started.mdtext
mina/site/trunk/content/mina/userguide/ch2-basics/ch2-basics.mdtext
mina/site/trunk/content/mina/userguide/ch3-service/ch3-service.mdtext
mina/site/trunk/content/mina/userguide/ch4-session/ch4-session.mdtext
mina/site/trunk/content/mina/userguide/ch5-filters/ch5-filters.mdtext
mina/site/trunk/content/mina/userguide/ch6-transports/ch6-transports.mdtext
mina/site/trunk/content/mina/userguide/ch7-handler/ch7-handler.mdtext
Modified: mina/site/trunk/content/mina/userguide/ch1-getting-started/ch1-getting-started.mdtext
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch1-getting-started/ch1-getting-started.mdtext?rev=1400908&r1=1400907&r2=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch1-getting-started/ch1-getting-started.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch1-getting-started/ch1-getting-started.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,4 @@
-Title: Getting Started
+Title: Chapter 1 - Getting Started
NavUp: ../user-guide-toc.html
NavUpText: User Guide
NavNext: ../ch2-basics/ch2-basics.html
Copied: mina/site/trunk/content/mina/userguide/ch10-iobuffer/ch10-iobuffer.mdtext (from r1400842, mina/site/trunk/content/mina/userguide/ch10/ch10.mdtext)
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch10-iobuffer/ch10-iobuffer.mdtext?p2=mina/site/trunk/content/mina/userguide/ch10-iobuffer/ch10-iobuffer.mdtext&p1=mina/site/trunk/content/mina/userguide/ch10/ch10.mdtext&r1=1400842&r2=1400908&rev=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch10/ch10.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch10-iobuffer/ch10-iobuffer.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,10 @@
-Title: Chapter 10
+Title: Chapter 10 - IoBuffer
+NavUp: ../user-guide-toc.html
+NavUpText: User Guide
+NavPrev: ../ch9-connector/ch9-connector.html
+NavPrevText: Chapter 9 - Connector
+NavNext: ../ch11-codec-filter/ch11-codec-filter.html
+NavNextText: Chapter 11 - Codec Filter
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -16,7 +22,7 @@ Notice: Licensed to the Apache Softwa
specific language governing permissions and limitations
under the License.
-# Introduction
+# Chapter 10 - IoBuffer
A byte buffer used by MINA applications.
Copied: mina/site/trunk/content/mina/userguide/ch11-codec-filter/ch11-codec-filter.mdtext (from r1400842, mina/site/trunk/content/mina/userguide/ch11/ch11.mdtext)
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch11-codec-filter/ch11-codec-filter.mdtext?p2=mina/site/trunk/content/mina/userguide/ch11-codec-filter/ch11-codec-filter.mdtext&p1=mina/site/trunk/content/mina/userguide/ch11/ch11.mdtext&r1=1400842&r2=1400908&rev=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch11/ch11.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch11-codec-filter/ch11-codec-filter.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,10 @@
-Title: Chapter 11
+Title: Chapter 11 - Codec Filter
+NavUp: ../user-guide-toc.html
+NavUpText: User Guide
+NavPrev: ../ch10-iobuffer/ch10-iobuffer.html
+NavPrevText: Chapter 10 - IoBuffer
+NavNext: ../ch12-executor-filter/ch12-executor-filter.html
+NavNextText: Chapter 12 - Executor Filter
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -16,6 +22,8 @@ Notice: Licensed to the Apache Softwa
specific language governing permissions and limitations
under the License.
+# Chapter 11 - Codec Filter
+
This tutorial tries to explain why and how to use a ProtocolCodecFilter.
## Why use a ProtocolCodecFilter?
Copied: mina/site/trunk/content/mina/userguide/ch12-executor-filter/ch12-executor-filter.mdtext (from r1400842, mina/site/trunk/content/mina/userguide/ch12/ch12.mdtext)
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch12-executor-filter/ch12-executor-filter.mdtext?p2=mina/site/trunk/content/mina/userguide/ch12-executor-filter/ch12-executor-filter.mdtext&p1=mina/site/trunk/content/mina/userguide/ch12/ch12.mdtext&r1=1400842&r2=1400908&rev=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch12/ch12.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch12-executor-filter/ch12-executor-filter.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,10 @@
-Title: Chapter 12
+Title: Chapter 12 - Executor Filter
+NavUp: ../user-guide-toc.html
+NavUpText: User Guide
+NavPrev: ../ch11-codec-filter/ch11-codec-filter.html
+NavPrevText: Chapter 11 - Codec Filter
+NavNext: ../ch13-ssl-filter/ch13-ssl-filter.html
+NavNextText: Chapter 13 - SSL Filter
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -15,6 +21,9 @@ Notice: Licensed to the Apache Softwa
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
+
+# Chapter 12 - Executor Filter
+
MINA 1.X version let the user define the Thread Model at the Acceptor level. It was part of the Acceptor configuration. This led to complexity, and the MINA team decided to remove this option, replacing it with a much more versatile system, based on a filter : the __ExecutorFilter__.
## The ExecutorFilter class
Copied: mina/site/trunk/content/mina/userguide/ch13-ssl-filter/ch13-ssl-filter.mdtext (from r1400842, mina/site/trunk/content/mina/userguide/ch13/ch13.mdtext)
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch13-ssl-filter/ch13-ssl-filter.mdtext?p2=mina/site/trunk/content/mina/userguide/ch13-ssl-filter/ch13-ssl-filter.mdtext&p1=mina/site/trunk/content/mina/userguide/ch13/ch13.mdtext&r1=1400842&r2=1400908&rev=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch13/ch13.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch13-ssl-filter/ch13-ssl-filter.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,10 @@
-Title: Chapter 13
+Title: Chapter 13 - SSL Filter
+NavUp: ../user-guide-toc.html
+NavUpText: User Guide
+NavPrev: ../ch12-executor-filter/ch12-executor-filter.html
+NavPrevText: Chapter 12 - Executor Filter
+NavNext: ../ch14-logging-filter/ch14-logging-filter.html
+NavNextText: Chapter 14 - Logging Filter
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -16,4 +22,6 @@ Notice: Licensed to the Apache Softwa
specific language governing permissions and limitations
under the License.
+# Chapter 13 - SSL Filter
+
To be completed...
Copied: mina/site/trunk/content/mina/userguide/ch14-logging-filter/ch14-logging-filter.mdtext (from r1400842, mina/site/trunk/content/mina/userguide/ch14/ch14.mdtext)
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch14-logging-filter/ch14-logging-filter.mdtext?p2=mina/site/trunk/content/mina/userguide/ch14-logging-filter/ch14-logging-filter.mdtext&p1=mina/site/trunk/content/mina/userguide/ch14/ch14.mdtext&r1=1400842&r2=1400908&rev=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch14/ch14.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch14-logging-filter/ch14-logging-filter.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,10 @@
-Title: Chapter 14
+Title: Chapter 14 - Logging Filter
+NavUp: ../user-guide-toc.html
+NavUpText: User Guide
+NavPrev: ../ch13-ssl-filter/ch13-ssl-filter.html
+NavPrevText: Chapter 13 - SSL Filter
+NavNext: ../ch15-debugging/ch15-debugging.html
+NavNextText: Chapter 15 - Debugging
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -15,7 +21,8 @@ Notice: Licensed to the Apache Softwa
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-
+
+# Chapter 14 - Logging Filter
[TOC]
# Background
Copied: mina/site/trunk/content/mina/userguide/ch15-debugging/ch15-debugging.mdtext (from r1400842, mina/site/trunk/content/mina/userguide/ch15/ch15.mdtext)
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch15-debugging/ch15-debugging.mdtext?p2=mina/site/trunk/content/mina/userguide/ch15-debugging/ch15-debugging.mdtext&p1=mina/site/trunk/content/mina/userguide/ch15/ch15.mdtext&r1=1400842&r2=1400908&rev=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch15/ch15.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch15-debugging/ch15-debugging.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,10 @@
-Title: Chapter 15
+Title: Chapter 15 - Debugging
+NavUp: ../user-guide-toc.html
+NavUpText: User Guide
+NavPrev: ../ch14-logging-filter/ch14-logging-filter.html
+NavPrevText: Chapter 14 - Logging Filter
+NavNext: ../ch16-state-machine/ch16-state-machine.html
+NavNextText: Chapter 16 - State Machine
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -16,4 +22,5 @@ Notice: Licensed to the Apache Softwa
specific language governing permissions and limitations
under the License.
+# Chapter 15 - Debugging
To be completed...
Copied: mina/site/trunk/content/mina/userguide/ch16-state-machine/ch16-state-machine.mdtext (from r1400842, mina/site/trunk/content/mina/userguide/ch16/ch16.mdtext)
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch16-state-machine/ch16-state-machine.mdtext?p2=mina/site/trunk/content/mina/userguide/ch16-state-machine/ch16-state-machine.mdtext&p1=mina/site/trunk/content/mina/userguide/ch16/ch16.mdtext&r1=1400842&r2=1400908&rev=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch16/ch16.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch16-state-machine/ch16-state-machine.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,10 @@
-Title: Chapter 16
+Title: Chapter 16 - State Machine
+NavUp: ../user-guide-toc.html
+NavUpText: User Guide
+NavPrev: ../ch15-debugging/ch15-debugging.html
+NavPrevText: Chapter 15 - Debugging
+NavNext: ../ch17-proxy/ch17-proxy.html
+NavNextText: Chapter 17 - Proxy
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -16,6 +22,8 @@ Notice: Licensed to the Apache Softwa
specific language governing permissions and limitations
under the License.
+# Chapter 16 - State Machine
+
If you are using MINA to develop an application with complex network interactions you may at some point find yourself reaching for the good old [State pattern](http://home.earthlink.net/~huston2/dp/state.html) to try to sort out some of that complexity. However, before you do that you might want to checkout mina-statemachine which tries to address some of the shortcomings of the State pattern.
[TOC]
Copied: mina/site/trunk/content/mina/userguide/ch17-proxy/ch17-proxy.mdtext (from r1400842, mina/site/trunk/content/mina/userguide/ch17/ch17.mdtext)
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch17-proxy/ch17-proxy.mdtext?p2=mina/site/trunk/content/mina/userguide/ch17-proxy/ch17-proxy.mdtext&p1=mina/site/trunk/content/mina/userguide/ch17/ch17.mdtext&r1=1400842&r2=1400908&rev=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch17/ch17.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch17-proxy/ch17-proxy.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,10 @@
-Title: Chapter 17
+Title: Chapter 17 - Proxy
+NavUp: ../user-guide-toc.html
+NavUpText: User Guide
+NavPrev: ../ch16-state-machine/ch16-state-machine.html
+NavPrevText: Chapter 16 - State Machine
+NavNext: ../ch18-jmx-support/ch18-jmx-support.html
+NavNextText: Chapter 18 - JMX support
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -16,4 +22,6 @@ Notice: Licensed to the Apache Softwa
specific language governing permissions and limitations
under the License.
+# Chapter 17 - Proxy
+
To be completed...
Copied: mina/site/trunk/content/mina/userguide/ch18-jmx-support/ch18-jmx-support.mdtext (from r1400842, mina/site/trunk/content/mina/userguide/ch18/ch18.mdtext)
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch18-jmx-support/ch18-jmx-support.mdtext?p2=mina/site/trunk/content/mina/userguide/ch18-jmx-support/ch18-jmx-support.mdtext&p1=mina/site/trunk/content/mina/userguide/ch18/ch18.mdtext&r1=1400842&r2=1400908&rev=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch18/ch18.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch18-jmx-support/ch18-jmx-support.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,10 @@
-Title: Chapter 18
+Title: Chapter 18 - JMX Support
+NavUp: ../user-guide-toc.html
+NavUpText: User Guide
+NavPrev: ../ch17-proxy/ch17-proxy.html
+NavPrevText: Chapter 17 - Proxy
+NavNext: ../ch19-spring-integration/ch19-spring-integration.html
+NavNextText: Chapter 19 - Spring Integration
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -16,6 +22,8 @@ Notice: Licensed to the Apache Softwa
specific language governing permissions and limitations
under the License.
+# Chapter 18 - JMX Support
+
Java Management Extensions (JMX) is used for managing and monitoring java applications. This tutorial will provide you with an example as to how you can JMX-enable your MINA based application.
This tutorial is designed to help you get the JMX technology integrated in to your MINA-based application. In this tutorial, we will integrate the MINA-JMX classes into the imagine server example program.
Copied: mina/site/trunk/content/mina/userguide/ch19-spring-integration/ch19-spring-integration.mdtext (from r1400842, mina/site/trunk/content/mina/userguide/ch19/ch19.mdtext)
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch19-spring-integration/ch19-spring-integration.mdtext?p2=mina/site/trunk/content/mina/userguide/ch19-spring-integration/ch19-spring-integration.mdtext&p1=mina/site/trunk/content/mina/userguide/ch19/ch19.mdtext&r1=1400842&r2=1400908&rev=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch19/ch19.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch19-spring-integration/ch19-spring-integration.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,8 @@
-Title: Chapter 19
+Title: Chapter 19 - Spring Integration
+NavUp: ../user-guide-toc.html
+NavUpText: User Guide
+NavPrev: ../ch18-jmx-support/ch18-jmx-support.html
+NavPrevText: Chapter 18 - Adding JMX Support
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -15,7 +19,8 @@ Notice: Licensed to the Apache Softwa
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-# Integrating with Spring
+
+# Chapter 19 - Spring Integration
This article demonstrates integrating MINA application with Spring. I wrote this article on my blog, and though to put it here, where this information actually belongs to. Can find the original copy at [Integrating Apache MINA with Spring](http://www.ashishpaliwal.com/blog/2008/11/integrating-apache-mina-with-spring/).
@@ -70,57 +75,49 @@ Now lets pull things together
Lets set the IO Handler in the spring context file
- <!-- The IoHandler implementation -->
- <bean id="trapHandler""com.ashishpaliwal.udp.mina.server.ServerHandler"/>
+ <!-- The IoHandler implementation -->
+ <bean id="trapHandler" class="com.ashishpaliwal.udp.mina.server.ServerHandler">
Lets create the Filter chain
-<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
-<PRE class="code-xml">
-<SPAN class="code-tag"><bean id=<SPAN class="code-quote">"snmpCodecFilter"</SPAN> class=<SPAN class="code-quote">"org.apache.mina.filter.codec.ProtocolCodecFilter"</SPAN>></SPAN>
- <SPAN class="code-tag"><constructor-arg></SPAN>
- <SPAN class="code-tag"><bean class=<SPAN class="code-quote">"com.ashishpaliwal.udp.mina.snmp.SNMPCodecFactory"</SPAN> /></SPAN>
- <SPAN class="code-tag"></constructor-arg></SPAN>
- <SPAN class="code-tag"></bean></SPAN>
-
- <SPAN class="code-tag"><bean id=<SPAN class="code-quote">"loggingFilter"</SPAN> class=<SPAN class="code-quote">"org.apache.mina.filter.logging.LoggingFilter"</SPAN> /></SPAN>
-
- <SPAN class="code-tag"><SPAN class="code-comment"><!-- The filter chain. --></SPAN></SPAN>
- <SPAN class="code-tag"><bean id=<SPAN class="code-quote">"filterChainBuilder"</SPAN> class=<SPAN class="code-quote">"org.apache.mina.core.filterchain.DefaultIoFilterChainBuilder"</SPAN>></SPAN>
- <SPAN class="code-tag"><property name=<SPAN class="code-quote">"filters"</SPAN>></SPAN>
- <SPAN class="code-tag"><map></SPAN>
- <SPAN class="code-tag"><entry key=<SPAN class="code-quote">"loggingFilter"</SPAN> value-ref=<SPAN class="code-quote">"loggingFilter"</SPAN>/></SPAN>
- <SPAN class="code-tag"><entry key=<SPAN class="code-quote">"codecFilter"</SPAN> value-ref=<SPAN class="code-quote">"snmpCodecFilter"</SPAN>/></SPAN>
- <SPAN class="code-tag"></map></SPAN>
- <SPAN class="code-tag"></property></SPAN>
- <SPAN class="code-tag"></bean></SPAN>
-</PRE>
-</DIV></DIV>
+ <bean id="snmpCodecFilter" class="org.apache.mina.filter.codec.ProtocolCodecFilter">
+ <constructor-arg>
+ <bean class="com.ashishpaliwal.udp.mina.snmp.SNMPCodecFactory" />
+ </constructor-arg>
+ </bean>
+
+ <bean id="loggingFilter" class="org.apache.mina.filter.logging.LoggingFilter" />
+
+ <!-- The filter chain. -->
+ <bean id="filterChainBuilder" class="org.apache.mina.core.filterchain.DefaultIoFilterChainBuilder">
+ <property name="filters">
+ <map>
+ <entry key="loggingFilter" value-ref="loggingFilter"/>
+ <entry key="codecFilter" value-ref="snmpCodecFilter"/>
+ </map>
+ </property>
+ </bean>
Here, we create instance of our IoFilter. See that for the ProtocolCodec factory, we have used Constructor injection. Logging Filter creation is straight forward. Once we have defined the beans for the filters to be used, we now create the Filter Chain to be used for the implementation. We define a bean with id "FilterChainBuidler" and add the defined filters to it. We are almost ready, and we just need to create the Socket and call bind
Lets complete the last part of creating the Socket and completing the chain
-<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
-<PRE class="code-xml">
-<SPAN class="code-tag"><bean class=<SPAN class="code-quote">"org.springframework.beans.factory.config.CustomEditorConfigurer"</SPAN>></SPAN>
- <SPAN class="code-tag"><property name=<SPAN class="code-quote">"customEditors"</SPAN>></SPAN>
- <SPAN class="code-tag"><map></SPAN>
- <SPAN class="code-tag"><entry key=<SPAN class="code-quote">"java.net.SocketAddress"</SPAN>></SPAN>
- <SPAN class="code-tag"><bean class=<SPAN class="code-quote">"org.apache.mina.integration.beans.InetSocketAddressEditor"</SPAN> /></SPAN>
- <SPAN class="code-tag"></entry></SPAN>
- <SPAN class="code-tag"></map></SPAN>
- <SPAN class="code-tag"></property></SPAN>
- <SPAN class="code-tag"></bean></SPAN>
-
-<SPAN class="code-tag"><SPAN class="code-comment"><!-- The IoAcceptor which binds to port 161 --></SPAN></SPAN>
-<SPAN class="code-tag"><bean id=<SPAN class="code-quote">"ioAcceptor"</SPAN> class=<SPAN class="code-quote">"org.apache.mina.transport.socket.nio.NioDatagramAcceptor"</SPAN> init-method=<SPAN class="code-quote">"bind"</SPAN> destroy-method=<SPAN class="code-quote">"unbind"</SPAN>></SPAN>
- <SPAN class="code-tag"><property name=<SPAN class="code-quote">"defaultLocalAddress"</SPAN> value=<SPAN class="code-quote">":161"</SPAN> /></SPAN>
- <SPAN class="code-tag"><property name=<SPAN class="code-quote">"handler"</SPAN> ref=<SPAN class="code-quote">"trapHandler"</SPAN> /></SPAN>
- <SPAN class="code-tag"><property name=<SPAN class="code-quote">"filterChainBuilder"</SPAN> ref=<SPAN class="code-quote">"filterChainBuilder"</SPAN> /></SPAN>
-<SPAN class="code-tag"></bean></SPAN>
-</PRE>
-</DIV></DIV>
+ <bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+ <property name="customEditors">
+ <map>
+ <entry key="java.net.SocketAddress">
+ <bean class="org.apache.mina.integration.beans.InetSocketAddressEditor" />
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+ <!-- The IoAcceptor which binds to port 161 -->
+ <bean id="ioAcceptor" class="org.apache.mina.transport.socket.nio.NioDatagramAcceptor" init-method="bind" destroy-method="unbind">
+ <property name="defaultLocalAddress" value=":161" />
+ <property name="handler" ref="trapHandler" />
+ <property name="filterChainBuilder" ref="filterChainBuilder" />
+ </bean>
Now we create our ioAcceptor, set IO handler and Filter Chain. Now we have to write a function to read this file using Spring and start our application. Here's the code
Modified: mina/site/trunk/content/mina/userguide/ch2-basics/ch2-basics.mdtext
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch2-basics/ch2-basics.mdtext?rev=1400908&r1=1400907&r2=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch2-basics/ch2-basics.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch2-basics/ch2-basics.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,4 @@
-Title: Basics
+Title: Chapter 2 - Basics
NavUp: ../user-guide-toc.html
NavUpText: User Guide
NavPrev: ../ch1-getting-started/ch1-getting-started.html
Modified: mina/site/trunk/content/mina/userguide/ch3-service/ch3-service.mdtext
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch3-service/ch3-service.mdtext?rev=1400908&r1=1400907&r2=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch3-service/ch3-service.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch3-service/ch3-service.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,4 @@
-Title: Chapter 3
+Title: Chapter 3 - Service
NavUp: ../user-guide-toc.html
NavUpText: User Guide
NavPrev: ../ch2-basics/ch2-basics.html
Modified: mina/site/trunk/content/mina/userguide/ch4-session/ch4-session.mdtext
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch4-session/ch4-session.mdtext?rev=1400908&r1=1400907&r2=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch4-session/ch4-session.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch4-session/ch4-session.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,4 @@
-Title: Chapter 4
+Title: Chapter 4 - Session
NavUp: ../user-guide-toc.html
NavUpText: User Guide
NavPrev: ../ch3-service/ch3-service.html
Modified: mina/site/trunk/content/mina/userguide/ch5-filters/ch5-filters.mdtext
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch5-filters/ch5-filters.mdtext?rev=1400908&r1=1400907&r2=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch5-filters/ch5-filters.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch5-filters/ch5-filters.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,4 @@
-Title: Chapter 5
+Title: Chapter 5 - Filters
NavUp: ../user-guide-toc.html
NavUpText: User Guide
NavPrev: ../ch4-session/ch4-session.html
Modified: mina/site/trunk/content/mina/userguide/ch6-transports/ch6-transports.mdtext
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch6-transports/ch6-transports.mdtext?rev=1400908&r1=1400907&r2=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch6-transports/ch6-transports.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch6-transports/ch6-transports.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,4 @@
-Title: Chapter 6
+Title: Chapter 6 - Transports
NavUp: ../user-guide-toc.html
NavUpText: User Guide
NavPrev: ../ch5-filters/ch5-filters.html
Modified: mina/site/trunk/content/mina/userguide/ch7-handler/ch7-handler.mdtext
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch7-handler/ch7-handler.mdtext?rev=1400908&r1=1400907&r2=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch7-handler/ch7-handler.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch7-handler/ch7-handler.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,4 @@
-Title: Chapter 7
+Title: Chapter 7 - Handler
NavUp: ../user-guide-toc.html
NavUpText: User Guide
NavPrev: ../ch6-transports/ch6-transports.html
Copied: mina/site/trunk/content/mina/userguide/ch8-acceptor/ch8-acceptor.mdtext (from r1400842, mina/site/trunk/content/mina/userguide/ch8/ch8.mdtext)
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch8-acceptor/ch8-acceptor.mdtext?p2=mina/site/trunk/content/mina/userguide/ch8-acceptor/ch8-acceptor.mdtext&p1=mina/site/trunk/content/mina/userguide/ch8/ch8.mdtext&r1=1400842&r2=1400908&rev=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch8/ch8.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch8-acceptor/ch8-acceptor.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,10 @@
-Title: Chapter 8
+Title: Chapter 8 - Acceptor
+NavUp: ../user-guide-toc.html
+NavUpText: User Guide
+NavPrev: ../ch7-handler/ch7-handler.html
+NavPrevText: Chapter 7 - Handler
+NavNext: ../ch9-connector/ch9-connector.html
+NavNextText: Chapter 9 - Connector
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -16,7 +22,7 @@ Notice: Licensed to the Apache Softwa
specific language governing permissions and limitations
under the License.
-# Introduction
+# Chapter 8 - Acceptor
In order to build a server, you need to select an implementation of the IoAcceptor interface.
Copied: mina/site/trunk/content/mina/userguide/ch9-connector/ch9-connector.mdtext (from r1400842, mina/site/trunk/content/mina/userguide/ch9/ch9.mdtext)
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch9-connector/ch9-connector.mdtext?p2=mina/site/trunk/content/mina/userguide/ch9-connector/ch9-connector.mdtext&p1=mina/site/trunk/content/mina/userguide/ch9/ch9.mdtext&r1=1400842&r2=1400908&rev=1400908&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch9/ch9.mdtext (original)
+++ mina/site/trunk/content/mina/userguide/ch9-connector/ch9-connector.mdtext Mon Oct 22 15:10:20 2012
@@ -1,4 +1,10 @@
-Title: Chapter 9
+Title: Chapter 9 - Connector
+NavUp: ../user-guide-toc.html
+NavUpText: User Guide
+NavPrev: ../ch8-acceptor/ch8-acceptor.html
+NavPrevText: Chapter 8 - Acceptor
+NavNext: ../ch10-iobuffer/ch10-iobuffer.html
+NavNextText: Chapter 10 - IoBuffer
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -16,7 +22,7 @@ Notice: Licensed to the Apache Softwa
specific language governing permissions and limitations
under the License.
-# Introduction
+# Chapter 9 - Connector
For client applications, you need to implement an implementation of the IoConnector interface.