public void run() { for (LifeCycle lc : _jettys) { if (lc.isRunning()) { try { lc.stop(); } catch (Exception e) { changeState(STOPPING, e); } } } if (_context != null) { PortMapper pm = _context.portMapper(); if (_port > 0 && pm.getPort(PortMapper.SVC_EEPSITE) == _port) { _port = 0; pm.unregister(PortMapper.SVC_EEPSITE); } if (_sslPort > 0 && pm.getPort(PortMapper.SVC_HTTPS_EEPSITE) == _sslPort) { _sslPort = 0; pm.unregister(PortMapper.SVC_HTTPS_EEPSITE); } } changeState(STOPPED); } }
@Override public boolean close(boolean forced) { int reg = _context.portMapper().getPort(PortMapper.SVC_HTTPS_PROXY); if (reg == getLocalPort()) _context.portMapper().unregister(PortMapper.SVC_HTTPS_PROXY); return super.close(forced); }
public void run() { I2PAppContext.getGlobalContext().portMapper().register(PortMapper.SVC_SAM_UDP, _host, _port); try { run2(); } finally { I2PAppContext.getGlobalContext().portMapper().unregister(PortMapper.SVC_SAM_UDP); } }
/** * Overridden to close internal socket too. */ @Override public boolean close(boolean forced) { int port = getLocalPort(); int reg = _context.portMapper().getPort(PortMapper.SVC_HTTP_PROXY); if (reg == port) { _context.portMapper().unregister(PortMapper.SVC_HTTP_PROXY); } reg = _context.portMapper().getPort(PortMapper.SVC_HTTPS_PROXY); if (reg == port) { _context.portMapper().unregister(PortMapper.SVC_HTTPS_PROXY); } boolean rv = super.close(forced); if(this.isr != null) { this.isr.stopRunning(); } return rv; }
/** * Overridden to unregister with port mapper * * @since 0.9.27 */ @Override public boolean close(boolean forced) { int port = getLocalPort(); int reg = _context.portMapper().getPort(PortMapper.SVC_SMTP); if (reg == port) { _context.portMapper().unregister(PortMapper.SVC_SMTP); } reg = _context.portMapper().getPort(PortMapper.SVC_POP); if (reg == port) { _context.portMapper().unregister(PortMapper.SVC_POP); } boolean rv = super.close(forced); if (_isr != null) { _isr.stopRunning(); } return rv; } }
@Override public boolean close(boolean forced) { int reg = _context.portMapper().getPort(PortMapper.SVC_IRC); if (reg == getLocalPort()) _context.portMapper().unregister(PortMapper.SVC_IRC); synchronized(this) { if (_DCCServer != null) { _DCCServer.close(forced); _DCCServer = null; } if (_DCCClientManager != null) { _DCCClientManager.close(forced); _DCCClientManager = null; } } return super.close(forced); }
} finally { _log.info("BOB is now shutting down..."); _context.portMapper().unregister(PortMapper.SVC_BOB);
if (_port > 0) { _context.portMapper().unregister(portMapperService);
serverSocket.close(); } catch (IOException e) {} I2PAppContext.getGlobalContext().portMapper().unregister(_useSSL ? PortMapper.SVC_SAM_SSL : PortMapper.SVC_SAM); stopHandlers(); changeState(STOPPED);