I'm trying to build a Java NIO-based socket server using Apache Mina. I really need to know the port of the remote host, not just the IP address, and it seems that Mina only exposes a SocketAddress (which can be downcast to InetAddress) object. I can get the IP address from InetAddress, but I normally use Socket.getPort() to get the po...
I'm attempting to get started with MINA, and all of the examples seem to have data written to the session, rather than making use of a method that can write the same type of data over and over.
I'm trying to make use of org.apache.mina.filter.codec.demux.MessageEncoder / MessageDecoder to encode / decode messages, which will allow me to...
In using Apache MINA, I'm sending a login request from the client, which is interpreted on the server via LoginRequestDecoder (implements org.apache.mina.filter.codec.demux.MessageDecoder).
I now want to send a response (LoginResponse) that includes a success/failure code. Should I be sending the response from the LoginRequestDecoder's...
Dear Readers,
I am new to Apache MINA kindly guide me how to read from IoSession. I have stored a POJO in it.
public static EchoUDPServerDiscoveryObjectResponseProperties echoProperties
session.write(echoProperties);
...
Hi everyone, I'm having a bit of problem with an example I'm currently testing. For some reason, the execution blocks when writing at oos.writeObject(new SimpleObject());, despite that fact that the pipe should transfer the data across, even (I'd assume) if it had to do it in smaller operations due to a small pipe size. Anyway, the examp...
I am building a socketserver using Apache Mina and I am trying to make sense of configuring the thread model. I am currently reading:
http://mina.apache.org/configuring-thread-model.html
As I understand it; it is best to use multithreading for each IOService, something like:
SocketAcceptor acceptor = new SocketAcceptor(
Runtime...
I'm attempting to perform a synchronous write/read in a demux-based client application with MINA 2.0 RC1, but it seems to get stuck. Here is my code:
public boolean login(final String username, final String password) {
// block inbound messages
session.getConfig().setUseReadOperation(true);
// send the login request
fi...
public class CustomProtocolDecoder extends CumulativeProtocolDecoder{
byte currentCmd = -1;
int currentSize = -1;
boolean isFirst = false;
@Override
protected boolean doDecode(IoSession is, ByteBuffer bb, ProtocolDecoderOutput pdo) throws Exception {
if(currentCmd == -1)
{
currentCmd = bb.get();
cu...
I am currently working on building a simple HTTP proxy using Apache Mina, in particular org.apache.mina.proxy, and I have a few questions about how to use some of the components.
How do I extract the future address from an incoming HTTP request? I
can see how to create a ProxyConnection given a URL, but I can't see how
to extract thi...
our project(banking domain) is divided into 4 layers.
One of which is a communication(COM) layer which developed in JAVA uses MINA.
Our host applications run on UNIX machine which serve request from users via socket communication.
The COM layer has a java program which acts both like a client and server.
server to Requests from other JAV...
Hi all,
I am writing a FIX buyside GUI based on quickfixj. Although the performance is not an issue to a GUI, I am thinking of migrating the quickfixj from Mina to Netty as I would like to develop it to a buyside engine. The performance of quickfixj is not satisfied with me. It is heard that Netty is better than Mina on performance.
Doe...
hi friends,
i am working on a iphone application,in which iphone application sends a request to the server using socket connection.in server side java code(using apache mina) takes the request and it processes the request and sends the response.
now the problem is if multiple iphone users sends request at a time to the server,t...