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/11 19:28:36 UTC
svn commit: r1397184 - /mina/site/trunk/content/mina/faq.mdtext
Author: elecharny
Date: Thu Oct 11 17:28:36 2012
New Revision: 1397184
URL: http://svn.apache.org/viewvc?rev=1397184&view=rev
Log:
slight improvement for code in the faq
Modified:
mina/site/trunk/content/mina/faq.mdtext
Modified: mina/site/trunk/content/mina/faq.mdtext
URL: http://svn.apache.org/viewvc/mina/site/trunk/content/mina/faq.mdtext?rev=1397184&r1=1397183&r2=1397184&view=diff
==============================================================================
--- mina/site/trunk/content/mina/faq.mdtext (original)
+++ mina/site/trunk/content/mina/faq.mdtext Thu Oct 11 17:28:36 2012
@@ -79,11 +79,11 @@ Yes. Please take a look at [the SumUp ex
### Can I implement protocols that keeps connection alive with MINA?
-Yes. MINA doesn't close any connections unless you called <TT>IoSession.close()</TT> or connection is closed by the remote peer.
+Yes. MINA doesn't close any connections unless you called `IoSession.close()` or connection is closed by the remote peer.
### Does MINA support SSL/TLS and SASL out-of-the-box?
-We support SSL/TLS out-of-the-box. Please refer to <TT>SSLFilter</TT>. It also provides a way to implement <TT>StartTLS</TT>. JDK 1.5 provides complete SASL support which works well with MINA.
+We support SSL/TLS out-of-the-box. Please refer to `SSLFilter`. It also provides a way to implement <TT>StartTLS</TT>. JDK 1.5 provides complete SASL support which works well with MINA.
### Do I need to make my IoHandler thread-safe?
@@ -146,15 +146,15 @@ Here is an example code:
connector.connect( session.getRemoteAddress(), this );
}
-Possibly it would be better to extract this code to a method like 'reconnect()' so that it can reusable in more than one place.
+Possibly it would be better to extract this code to a method like `reconnect()` so that it can reusable in more than one place.
### When should I implement my protocol handler using filters?
-<TT>IoFilter</TT> is usually considered reusable just like we think about Servlet filters. Please implement commonly used business logic such as authorization and logging as a filter. In case you implement just complex multi-layer protocols like Kerberos, you could consider using <TT>org.apache.mina.handler.chain</TT> package.
+`IoFilter` is usually considered reusable just like we think about Servlet filters. Please implement commonly used business logic such as authorization and logging as a filter. In case you implement just complex multi-layer protocols like Kerberos, you could consider using `org.apache.mina.handler.chain`> package.
### How can I detect when the remote peer doesn't send a response message for my request message?
-You can't use <TT>sessionIdle event</TT> simply here. You'll have to use <TT>java.util.concurrent.ScheduledExecutor</TT> (or [OpenSymphony Quartz](http://www.opensymphony.com/quartz/) as an alternative). Schedule a timeout task to be executed on timeout situation for each request message, and cancel it when you receive the corresponding response message.
+You can't use `sessionIdle` event simply here. You'll have to use `java.util.concurrent.ScheduledExecutor` (or [OpenSymphony Quartz](http://www.opensymphony.com/quartz/) as an alternative). Schedule a timeout task to be executed on timeout situation for each request message, and cancel it when you receive the corresponding response message.
### How can I let MINA log messages using my favorite logging framework (i.e. Log4J)?
@@ -173,11 +173,11 @@ If you prefer direct buffers to heap buf
### No data is writtin out to the session even if the buffer is not empty.
-Please make sure if you called <TT>ByteBuffer.flip()</TT> to flip the buffer before writing the buffer out. It is a common mistake NIO beginners make.
+Please make sure if you called `ByteBuffer.flip()` to flip the buffer before writing the buffer out. It is a common mistake NIO beginners make.
### I created an SSL client with MINA, but it doesn't initiate any handshake after the session is open.
-Please make sure you called <TT>SSLFilter.setUseClientMode(true)</TT> before you initiate a connection. Server developers will also have to disconnect users who doesn't initiate SSL handshake by setting <TT>IoSession.readerIdleTime</TT> and closing the session in <TT>IoHandler.sessionIdle()</TT>.
+Please make sure you called `SSLFilter.setUseClientMode(true)` before you initiate a connection. Server developers will also have to disconnect users who doesn't initiate SSL handshake by setting `IoSession.readerIdleTime` and closing the session in `IoHandler.sessionIdle()`.
### Why does SocketConnector send several messages as one message?
@@ -191,7 +191,7 @@ However, even if you do this you cannot
### I get <TT>InvalidClassChangeError</TT>.
-Please make sure if you are using the appropriate SLF4J version. You will get <TT>InvalidClassChangeError</TT> if you are using outdated SLF4J release.
+Please make sure if you are using the appropriate SLF4J version. You will get `InvalidClassChangeError` if you are using outdated SLF4J release.
### My server fails with java.net.SocketException: Too many files open<