protected ControlPoint createControlPoint(ProtocolFactory protocolFactory, Registry registry) { return new ControlPointImpl(getConfiguration(), protocolFactory, registry); }
protected Router createRouter(ProtocolFactory protocolFactory, Registry registry) { return new RouterImpl(getConfiguration(), protocolFactory); }
protected void shutdownConfiguration() { getConfiguration().shutdown(); }
public UpnpServiceImpl(UpnpServiceConfiguration configuration, RegistryListener... registryListeners) { this.configuration = configuration; log.info(">>> Starting UPnP service..."); log.info("Using configuration: " + getConfiguration().getClass().getName()); // Instantiation order is important: Router needs to start its network services after registry is ready this.protocolFactory = createProtocolFactory(); this.registry = createRegistry(protocolFactory); for (RegistryListener registryListener : registryListeners) { this.registry.addListener(registryListener); } this.router = createRouter(protocolFactory, registry); try { this.router.enable(); } catch (RouterException ex) { throw new RuntimeException("Enabling network router failed: " + ex, ex); } this.controlPoint = createControlPoint(protocolFactory, registry); log.info("<<< UPnP service started successfully"); }
protected void shutdownConfiguration() { getConfiguration().shutdown(); }
protected Router createRouter(ProtocolFactory protocolFactory, Registry registry) { return new RouterImpl(getConfiguration(), protocolFactory); }
protected ControlPoint createControlPoint(ProtocolFactory protocolFactory, Registry registry) { return new ControlPointImpl(getConfiguration(), protocolFactory, registry); }
public UpnpServiceImpl(UpnpServiceConfiguration configuration, RegistryListener... registryListeners) { this.configuration = configuration; log.info(">>> Starting UPnP service..."); log.info("Using configuration: " + getConfiguration().getClass().getName()); // Instantiation order is important: Router needs to start its network services after registry is ready this.protocolFactory = createProtocolFactory(); this.registry = createRegistry(protocolFactory); for (RegistryListener registryListener : registryListeners) { this.registry.addListener(registryListener); } this.router = createRouter(protocolFactory, registry); try { this.router.enable(); } catch (RouterException ex) { throw new RuntimeException("Enabling network router failed: " + ex, ex); } this.controlPoint = createControlPoint(protocolFactory, registry); log.info("<<< UPnP service started successfully"); }
protected Router createRouter(ProtocolFactory protocolFactory, Registry registry) { return new RouterImpl(getConfiguration(), protocolFactory); }
protected ControlPoint createControlPoint(ProtocolFactory protocolFactory, Registry registry) { return new ControlPointImpl(getConfiguration(), protocolFactory, registry); }
protected void shutdownConfiguration() { getConfiguration().shutdown(); }
public UpnpServiceImpl(UpnpServiceConfiguration configuration, RegistryListener... registryListeners) { this.configuration = configuration; log.info(">>> Starting UPnP service..."); log.info("Using configuration: " + getConfiguration().getClass().getName()); // Instantiation order is important: Router needs to start its network services after registry is ready this.protocolFactory = createProtocolFactory(); this.registry = createRegistry(protocolFactory); for (RegistryListener registryListener : registryListeners) { this.registry.addListener(registryListener); } this.router = createRouter(protocolFactory, registry); try { this.router.enable(); } catch (RouterException ex) { throw new RuntimeException("Enabling network router failed: " + ex, ex); } this.controlPoint = createControlPoint(protocolFactory, registry); log.info("<<< UPnP service started successfully"); }