void start() throws IOException { sendVersionHeader(); IoFuture<String> futureConnectionId = ConnectionIdReceiver.getConnectionId(channel); IoFuture.Status result = futureConnectionId.await(timeoutSeconds, TimeUnit.SECONDS); switch (result) { case DONE: connectionId = futureConnectionId.get(); mbeanServerConnection = new TheConnection(); localNotificationManager = new LocalNotificationManager(); channel.receiveMessage(new MessageReceiver()); break; case FAILED: throw futureConnectionId.getException(); default: throw new IOException("Unable to obtain connectionId, status=" + result.toString()); } }
void start() throws IOException { sendVersionHeader(); IoFuture<String> futureConnectionId = ConnectionIdReceiver.getConnectionId(channel); IoFuture.Status result = futureConnectionId.await(timeoutSeconds, TimeUnit.SECONDS); switch (result) { case DONE: connectionId = futureConnectionId.get(); mbeanServerConnection = new TheConnection(); localNotificationManager = new LocalNotificationManager(); channel.receiveMessage(new MessageReceiver()); break; case FAILED: throw futureConnectionId.getException(); default: throw new IOException("Unable to obtain connectionId, status=" + result.toString()); } }
void start() throws IOException { sendVersionHeader(); IoFuture<String> futureConnectionId = ConnectionIdReceiver.getConnectionId(channel); IoFuture.Status result = futureConnectionId.await(timeoutSeconds, TimeUnit.SECONDS); switch (result) { case DONE: connectionId = futureConnectionId.get(); mbeanServerConnection = new TheConnection(); localNotificationManager = new LocalNotificationManager(); channel.receiveMessage(new MessageReceiver()); break; case FAILED: throw futureConnectionId.getException(); default: throw new IOException("Unable to obtain connectionId, status=" + result.toString()); } }