Unbind port for IoAcceptor is not working

2014-01-27 Thread Hardik Kubavat
Hi, I am unbind the port from IoAcceptor using ==>acceptor.unbind(new InetSocketAddress(portNo)); So when we try to bind this same port on acceptor it's throws Exception with Following message Address already in use. As per my requirement I need to bind and unbind port dynamically. And I

Return type of doDecode method

2013-12-30 Thread Hardik Kubavat
Hii System.out.println("THIS IS FIRST DECODER"); out.setAutoExpand(true); Listener l = (Listener)is.getAttribute("listener"); byte[] bytes = new byte[ib.limit()]; ib.get(bytes); if(l.getMessageType().equals("HL7")) { String s = new Strin

Multiple ProtocolCodecFactory not working

2013-12-30 Thread Hardik Kubavat
Hii acceptor.getFilterChain().addLast("Codec",new ProtocolCodecFilter(new DecoderCodecFactory(new ProtocolDecoder(; acceptor.getFilterChain().addLast("Codec2",new ProtocolCodecFilter(new DecoderCodecFactory(new ProtocolDecoder2(; public class DecoderCodecFactory implements ProtocolCo

Message came as fragments

2013-12-26 Thread Hardik Kubavat
hi Is it required to Use Apache MINA framework in both Client and server? Because I had go through the Tutorial And I have tried the example but I didn't get the Actual result? My problem is Message come in two parts so how can i manage this with CumulativeProtocolDecoder but I cannot get mess

Example : Data larger than buffer size

2013-12-26 Thread Hardik Kubavat
Hii Emmanuel 1) Can you give me the example of how to manage data larger than buffer size?

Buffersize Problem

2013-12-23 Thread Hardik Kubavat
Hi Emmanuel 1) I have set datagramAcceptor.getSessionConfig().setReadBufferSize(2048); and I am sending one .txt file to this acceptor which size is 4KB, so it's received in three parts. Is there any way to handle large data than buffer size? through we can send it to any target port as one f

Buffer Size Problem

2013-12-23 Thread Hardik Kubavat
Hii I have created one acceptor and binding number of ports to that acceptor. So Following are my question 1) Is is good practice to implement logic or It causes harm? 2) We need to create different acceptor for different client? 3) If we change to size of Buffer runtime that other session are

Dynamically Change Session Buffer Size

2013-12-22 Thread Hardik Kubavat
Hi I have an application in which I am sharing the Handler between TCP and UDP connector. As requirement for My application I have variable size of data to accept and send. And in this if there is big size data they will send the notification that big message will arrive, So my question is can

MINA Handler for UDP & TCP

2013-12-18 Thread Hardik Kubavat
Can we Use Same Handler Object for UDP & TCP Acceptor and Connector? Is causing problem or not?