09 December 2008 ~ 0 Comments

Using Auto expanding and shrinking IoBuffer in Apache MINA

Networking applications always need ByteBuffer that can expand on the need basis. Java ByteBuffer doesn’t provide this feature. Fortunately, MINA’s IoBuffer class has implemented this much needed feature.
Creating Auto Expanding Buffer
IoBuffer class in MINA has a property autoExpand, which when set makes the IoBuffer expand on the need basis, very much similar to StringBuffer class.
Let’s [...]

Continue Reading

04 December 2008 ~ 0 Comments

How I learned Apache MINA internal?

This is a very short post. The idea was to share how I learned some basic things about Apache MINA. LoggingFilter provides a very good way of how MINA process a incoming requests. Add the LoggingFilter in the chain and enable logging. As soon as it receives a packet, watch out the logs, it provides [...]

Continue Reading

Tags:

21 November 2008 ~ 0 Comments

Apache MINA – Blacklist Filter Explained

Blacklist filter blocks connections from the blacklisted remote Addresses. The filter is very useful, for dropping the connection originating from addresses, not of interest.
Useful API’s
setBlacklist(InetAddress[] addresses) – Sets a list of IP Addresses that needs to be blocked. This API call clears all the previously added Addresses
setSubnetBlacklist(Subnet[] subnets) – Sets a List of Subnets to [...]

Continue Reading

08 November 2008 ~ 0 Comments

Apache MINA - CumulativeProtocolDecoder Explained

Apache MINA uses the concept of Protocol Decoder to decoder read bytes into High Level Message objects. There are conditions in which a single packet may not contain the complete bytes to convert raw message into High Level Objects. For such situations, CumulativeProtocolDecoder can be used. Basically, encoder makes the framework buffer the data, till [...]

Continue Reading

01 November 2008 ~ 7 Comments

Integrating Apache MINA with Spring

So far we have seen Apache MINA code samples in standalone form. Apache MINA can be nicely integrated into DI frameworks like Spring. Lets see how to integrate a simple MINA application with Spring
This is how our application is structure. To see details of this application, please refer to the post Implementing Trap Receiver in [...]

Continue Reading