Author: elecharny
Date: Wed Oct 31 04:48:37 2012
New Revision: 1403976
URL: http://svn.apache.org/viewvc?rev=1403976&view=rev
Log:
Added some code sample on acceptors
Modified:
mina/site/trunk/content/mina/userguide/ch3-service/acceptor.mdtext
Modified: mina/site/trunk/content/mina/userguide/ch3-service/acceptor.mdtext
URL:
http://svn.apache.org/viewvc/mina/site/trunk/content/mina/userguide/ch3-service/acceptor.mdtext?rev=1403976&r1=1403975&r2=1403976&view=diff
==============================================================================
--- mina/site/trunk/content/mina/userguide/ch3-service/acceptor.mdtext
(original)
+++ mina/site/trunk/content/mina/userguide/ch3-service/acceptor.mdtext Wed Oct
31 04:48:37 2012
@@ -90,3 +90,27 @@ You can get the _IoService_ status by ca
* _isActive()_ : true if the service can accept incoming requests
* _isDisposing()_ : true if the _dispose()_ method has been called. It does
not tell if the service is actually stopped (some sessions might be processed)
* _isDisposed()_ : true if the _dispose(boolean)_ method has been called, and
the executing threads have been completed.
+
+## Managing the IoHandler
+
+You can add or get the associated _IoHandler_ when the service has been
instanciated. Youjust have to call the _setHandler(IoHandler)_ or
_getHandler()_ methods.
+
+## Managing the Filters chain
+
+if you want to manage the filters chain, you will have to call the
_getFilterChain()_ method. Here is an example :
+
+ // Add a logger filter
+ DefaultIoFilterChainBuilder chain = acceptor.getFilterChain();
+ chain.addLast("logger", new LoggingFilter());
+
+You can also create the chain before and set it into the service :
+
+ // Add a logger filter
+ DefaultIoFilterChainBuilder chain = new DefaultIoFilterChainBuilder();
+ chain.addLast("logger", new LoggingFilter());
+
+ // And inject the created chain builder in the service
+ acceptor.setFilterChainBuilder(chain);
+
+##
+