@Override protected void doStart() throws Exception { if (_executor.isShutdown()) throw new IllegalStateException("This thread pool is not restartable"); for (int i = 0; i < _minThreads; ++i) _executor.prestartCoreThread(); _tryExecutor = new ReservedThreadExecutor(this, _reservedThreads); addBean(_tryExecutor); super.doStart(); }
@Override protected void doStart() throws Exception { _tryExecutor = new ReservedThreadExecutor(this,_reservedThreads); addBean(_tryExecutor); super.doStart(); _threadsStarted.set(0); startThreads(_minThreads); }
@Override protected void doStart() throws Exception { if (_hostName == null) _hostName = InetAddress.getLocalHost().getCanonicalHostName(); if (LOG.isDebugEnabled()) LOG.debug("Retrieving credentials for service {}/{}", getServiceName(), getHostName()); LoginContext loginContext = new LoginContext("", null, null, new SpnegoConfiguration()); loginContext.login(); Subject subject = loginContext.getSubject(); _context = Subject.doAs(subject, newSpnegoContext(subject)); super.doStart(); }
@Override protected void doStart() throws Exception { if (_context == null) throw new IllegalStateException ("No SessionContext"); super.doStart(); }
@Override protected void doStart() throws Exception { Objects.requireNonNull(httpClient, "Provided HttpClient is null"); super.doStart(); if (!httpClient.isRunning()) throw new IllegalStateException("HttpClient is not running (did you forget to start it?): " + httpClient); }
@Override protected void doStart() throws Exception { LOG.debug("starting {}",this); super.doStart(); }
@Override protected void doStart() throws Exception { LOG.debug("starting {}",this); super.doStart(); }
@Override protected void doStart() throws Exception { for (int i = 0; i < _selectors.length; i++) { ManagedSelector selector = newSelector(i); _selectors[i] = selector; addBean(selector); } super.doStart(); }
@Override protected void doStart() throws Exception { if(this.objectFactory == null) { this.objectFactory = findDecoratedObjectFactory(); } if(this.executor == null) { this.executor = findExecutor(); } super.doStart(); }
@Override protected void doStart() throws Exception { if (_executor.isShutdown()) throw new IllegalStateException("This thread pool is not restartable"); for (int i = 0; i < _minThreads; ++i) _executor.prestartCoreThread(); _tryExecutor = new ReservedThreadExecutor(this, _reservedThreads); addBean(_tryExecutor); super.doStart(); }
@Override protected void doStart() throws Exception { _defaultConnectionFactory = getConnectionFactory(_defaultProtocol); if(_defaultConnectionFactory==null) throw new IllegalStateException("No protocol factory for default protocol: "+_defaultProtocol); super.doStart(); _stopping=new CountDownLatch(_acceptors.length); for (int i = 0; i < _acceptors.length; i++) getExecutor().execute(new Acceptor(i)); LOG.info("Started {}", this); }
@Override protected void doStart() throws Exception { _defaultConnectionFactory = getConnectionFactory(_defaultProtocol); if(_defaultConnectionFactory==null) throw new IllegalStateException("No protocol factory for default protocol: "+_defaultProtocol); super.doStart(); _stopping=new CountDownLatch(_acceptors.length); for (int i = 0; i < _acceptors.length; i++) getExecutor().execute(new Acceptor(i)); LOG.info("Started {}", this); }
@Override protected void doStart() throws Exception { _tryExecutor = new ReservedThreadExecutor(this,_reservedThreads); addBean(_tryExecutor); super.doStart(); _threadsStarted.set(0); startThreads(_minThreads); }
@Override protected void doStart() throws Exception { if (LOG.isDebugEnabled()) LOG.debug("starting {}",this); if (_server==null) LOG.warn("No Server set for {}",this); super.doStart(); }
@Override protected void doStart() throws Exception { if (LOG.isDebugEnabled()) LOG.debug("starting {}",this); if (_server==null) LOG.warn("No Server set for {}",this); super.doStart(); }
@Override protected void doStart() throws Exception { this.connectionPool = newConnectionPool(client); addBean(connectionPool); super.doStart(); Sweeper sweeper = client.getBean(Sweeper.class); if (sweeper != null && connectionPool instanceof Sweeper.Sweepable) sweeper.offer((Sweeper.Sweepable)connectionPool); }
@Override protected void doStart() throws Exception { _lease = ThreadPoolBudget.leaseFrom(getExecutor(), this, _selectors.length); for (int i = 0; i < _selectors.length; i++) { ManagedSelector selector = newSelector(i); _selectors[i] = selector; addBean(selector); } super.doStart(); }
@Override protected void doStart() throws Exception { _lease = ThreadPoolBudget.leaseFrom(getExecutor(), this, _selectors.length); for (int i = 0; i < _selectors.length; i++) { ManagedSelector selector = newSelector(i); _selectors[i] = selector; addBean(selector); } super.doStart(); }
@Override protected void doStart() throws Exception { selector = newWebSocketClientSelectorManager(client); selector.setSslContextFactory(client.getSslContextFactory()); selector.setConnectTimeout(client.getConnectTimeout()); addBean(selector); super.doStart(); }
@Override protected void doStart() throws Exception { selector = newWebSocketClientSelectorManager(client); selector.setSslContextFactory(client.getSslContextFactory()); selector.setConnectTimeout(client.getConnectTimeout()); addBean(selector); super.doStart(); }