port = PookaMessagingConstants.S_PORT;
}
getLogger().log(Level.FINE, "opening port " + port);
SocketAddress address = new InetSocketAddress("localhost",port);
SocketChannel channel = SocketChannel.open();
channel.configureBlocking(false);
if (! channel.connect(address)) {
// we're willing to wait for about a second.
for (int i = 0; (! channel.finishConnect()) && i < 4; i++) {
try {
getLogger().log(Level.FINE, "not connected; sleeping (" + i + ").");