if (listenerEndpoint.getAddress() instanceof InetSocketAddress) { int endPointPort = ((InetSocketAddress) listenerEndpoint.getAddress()).getPort(); if (dynamicPTTListeningEndpointMapper.containsKey(endPointPort)) { continue; if (inetSocketAddress.getHostName().equalsIgnoreCase(((InetSocketAddress) listenerEndpoint.getAddress()).getHostName())) { listenerEndpoint.close(); for (ListenerEndpoint listenerEndpoint : endpoints) { for (InetSocketAddress inetSocketAddress : bindAddresses) { if (inetSocketAddress.getHostName().equalsIgnoreCase(((InetSocketAddress) listenerEndpoint.getAddress()).getHostName())) { listenerEndpoint.close();
@Override public Set<ListenerEndpoint> getEndpoints() { final Set<ListenerEndpoint> set = new HashSet<ListenerEndpoint>(); synchronized (this.endpoints) { final Iterator<ListenerEndpointImpl> it = this.endpoints.iterator(); while (it.hasNext()) { final ListenerEndpoint endpoint = it.next(); if (!endpoint.isClosed()) { set.add(endpoint); } else { it.remove(); } } } return set; }
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; }
void close() { for ( HttpsEndpointHandle eph : endpoints.values() ) eph.close__(); socketHandles.remove(getSocketAddress()); if (listenerEndpoint != null) listenerEndpoint.close(); } @Override
try { log.info("Closing Endpoint Listener for port "+port); dynamicPTTListeningEndpointMapper.get(port).close(); } catch (Exception e) { log.error("Cannot close Endpoint relevant to port " + port, e);
ListenerEndpoint endpoint = endpoints.remove(); try { endpoint.waitFor(); if (log.isInfoEnabled()) { InetSocketAddress address = (InetSocketAddress) endpoint.getAddress(); if (!address.isUnresolved()) { log.info(name + " started on " + address.getHostName() + ":" + address.getPort());
if (listenerEndpoint.getAddress() instanceof InetSocketAddress) { int endPointPort = ((InetSocketAddress) listenerEndpoint.getAddress()).getPort(); if (dynamicPTTListeningEndpointMapper.containsKey(endPointPort)) { continue; listenerEndpoint.close(); log.info("Successfully closed Endpoint Listener for port "+port); for (ListenerEndpoint listenerEndpoint : endpoints) { log.info("Closing Endpoint Listener for port "+port); listenerEndpoint.close(); log.info("Successfully closed Endpoint Listener for port "+port);
for ( SocketHandle sh : socketHandleSnapshot() ) { ListenerEndpoint le = sh.listenerEndpoint; if ( le != null ) le.close(); sh.listenerEndpoint = null;
@Override public Set<ListenerEndpoint> getEndpoints() { final Set<ListenerEndpoint> set = new HashSet<ListenerEndpoint>(); synchronized (this.endpoints) { final Iterator<ListenerEndpointImpl> it = this.endpoints.iterator(); while (it.hasNext()) { final ListenerEndpoint endpoint = it.next(); if (!endpoint.isClosed()) { set.add(endpoint); } else { it.remove(); } } } return set; }
ListenerEndpoint endpoint = endpoints.remove(); try { endpoint.waitFor(); if (log.isInfoEnabled()) { InetSocketAddress address = (InetSocketAddress) endpoint.getAddress(); if (!address.isUnresolved()) { log.info(name + " started on " + address.getHostName() + ":" + address.getPort());
if (inetSocketAddress.getHostName().equalsIgnoreCase(((InetSocketAddress) listenerEndpoint.getAddress()).getHostName())) { listenerEndpoint.close(); endPointsClosed.add((InetSocketAddress) listenerEndpoint.getAddress());
public void reload(final TransportInDescription transportIn) throws AxisFault { if (state != BaseConstants.STARTED) return; // Close all listener endpoints and stop accepting new connections Set<ListenerEndpoint> endpoints = ioReactor.getEndpoints(); for (ListenerEndpoint endpoint: endpoints) { endpoint.close(); } // Rebuild connection factory HttpHost host = new HttpHost( listenerContext.getHostname(), listenerContext.getPort(), scheme.getName()); ServerConnFactoryBuilder connFactoryBuilder = initConnFactoryBuilder(transportIn, host); connFactory = connFactoryBuilder.build(params); iodispatch.update(connFactory); startEndpoints(); log.info(name + " Reloaded"); }
debug("Serving " + docRoot + " on " + server.getEndpoint().getAddress() + (sslContext == null ? "" : " with " + sslContext.getProvider() + " " + sslContext.getProtocol())); server.getEndpoint().waitFor();
debug("Serving " + docRoot + " on " + server.getEndpoint().getAddress() + (sslContext == null ? "" : " with " + sslContext.getProvider() + " " + sslContext.getProtocol())); server.getEndpoint().waitFor();