directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <>
Subject [MINA] Adding isBound(SocketAddress) to IoAcceptor
Date Mon, 30 Jan 2006 03:50:05 GMT

I just looked into adding this method and it's not so trivial as I had 
thought.  Looks like the DatagramAcceptorDelagate presents the biggest 
problem.  Checking if the service is bound on the SocketAcceptorDelegate 
is cake though:

    public boolean isBound( SocketAddress address )
        return sessions.get( address ) != null;

Doing this for UDP is not so easy.  I cannot figure out how to do it 
without effecting the existing state of the acceptor.  Any ideas?

I thought this would be a good method to have but I'm going to back out 
of my changes until I receive further guidance.  I'm just going to try 
to unbind and if the socket is not bound then I'll swallow the 
exception.  However it would handy to have this check avilable.


View raw message