ioReactor.listen(new InetSocketAddress(localPort)); isReady = true; ioReactor.execute(ioEventDispatch);
ioReactor.listen(new InetSocketAddress(localPort)); isReady = true; ioReactor.execute(ioEventDispatch);
public void run() { try { ioReactor.listen(addr); isStarted = true; ioReactor.execute(ioEventDispatch); } catch (InterruptedIOException ex) { LOG.info("Interrupted"); } catch (IOException e) { LOG.warn("I/O error: " + e.getMessage()); } LOG.debug("Shutdown"); } };
private ListenerEndpoint startEndpoint(InetSocketAddress inetSocketAddress, ListeningIOReactor defaultListeningIOReactor, String endPointName) throws Exception { ListenerEndpoint endpoint = defaultListeningIOReactor.listen(inetSocketAddress); try { endpoint.waitFor(); InetSocketAddress address = (InetSocketAddress) endpoint.getAddress(); if (!address.isUnresolved()) { log.info((endPointName != null ? "Pass-through " + endPointName : " Pass-through Http ") + " Listener started on " + address.getHostName() + ":" + address.getPort()); } else { log.info((endPointName != null ? "Pass-through " + endPointName : " Pass-through Http ") + " Listener started on " + address); } } catch (Exception e) { throw new Exception("Endpoint does not start for port " + inetSocketAddress.getPort() + "May be IO Reactor not started or endpoint binding exception ", e); } return endpoint; }
@Override public void start() { if (!isInitialized()) throw new IllegalStateException( "Server initialization is incomplete, can not start the server"); log.info("Starting Http Server [" + id + "] ... "); try { ioReactor.listen(buildInetSocketAddress()); log.info("Http Server started"); ioReactor.execute(ioEventDispatch); } catch (InterruptedIOException iex) { log.error("Server was interrupted: ", iex); } catch (IOException ioex) { log.error("IO exception: ", ioex); } }
sh.listenerEndpoint = ioReactor.listen( sh.getSocketAddress() );
ioReactor.listen(new InetSocketAddress(httpPort));
try { ioReactor = new DefaultListeningIOReactor(2, parameters); ioReactor.listen(new InetSocketAddress(this.getServiceConfig().getPort())); } catch (IOException e) { log.error("I/O for service '" + this.getServiceName() + "' error: " + e.getMessage());
ioReactor.listen(new InetSocketAddress(httpPort));
this.ioReactor.listen(new InetSocketAddress(port));
ioReactor.listen(new InetSocketAddress(localPort)); isReady = true; ioReactor.execute(ioEventDispatch);