Add {@link Consumer}s invoked when the {@link Server} is started.
(see: {@link ServerListener#serverStarted(Server)})
188549
public ServerListenerBuilder addStartedCallbacks(Iterable<Consumer<? super Server>> consumers) {
        requireNonNull(consumers, "consumers");
        for (Consumer<? super Server> consumer : consumers) {
            serverStartedCallbacks.add(requireNonNull(consumer, "consumer"));
        }
        return this;
    }
655832
def on_server_start(self):
        
        self._container = self._docker_client.containers.run(self.docker_image_name, detach=True, **self.docker_params)
        self.signal_ready()

        for log_line in self.get_lines():
            try:
                alert_dict = self.parse_line(log_line)
                if alert_dict:
                    self.add_alert_to_queue(alert_dict)
            except Exception:
                self.logger.exception(None)
172007
@SafeVarargs
    public final ServerListenerBuilder addStoppingCallbacks(Consumer<? super Server>... consumers) {
        return addStoppingCallbacks(Arrays.asList(consumers));
    }
1370106
protected void startServerImpl() {
        SelendroidLogger.info("*** ServerInstrumentation#startServerImpl() ***");
        if (serverThread != null && serverThread.isAlive()) {
            return;
        }

        if (serverThread != null) {
            stopServer();
        }

        serverThread = new HttpdThread(this, serverPort);
        serverThread.startServer();
    }
1095580
@Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.OPTIONAL)
    protected synchronized void setServerStarted(ServerStarted serverStarted) {
        isServerStarted = true;

        // Start SystemModule if everything else is ready
        startManagementEJB();
    }
819363
@Override
    public synchronized void chainStarted(ChainData chainData) {
        chainState.set(ChainState.STARTED.val);

        final ActiveConfiguration cfg = currentConfig;
        final int port = cfg.getActivePort();

        if (port > 0) {
            // HOORAY! we have a bound listener.
            // Notify listeners that the chain was started.
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(this, tc, "New configuration started " + cfg);
            }

            VirtualHostMap.notifyStarted(owner, cfg.resolvedHost, port, isHttps);

            // Post an endpoint started event to anyone listening
            String topic = owner.getEventTopic() + HttpServiceConstants.ENDPOINT_STARTED;
            postEvent(topic, cfg, null);
        }
    }
945098
private void establish(final T serverId) {
        LOG.debug("Connecting to: " + serverId);

        // We create a listener that will be notified of activity on this
        // connection.
        final ConnectionMaintainerListener<ServerT> listener = new MyListener(
                serverId);

        synchronized (this) {
            // Until we see a response from this attempt to establish a
            // connection, we have an outstanding connection attempt.
            ++m_outstanding;

            // We also track the fact that we have "used" the server.
            m_usedServerIds.add(serverId);
        }

        m_establisher.establish(serverId, listener);
    }
1017511
@Handler
    public void onStart(Start event) throws IOException {
        closing = false;
        serverSocketChannel = ServerSocketChannel.open();
        serverSocketChannel.bind(serverAddress, backlog);
        MBeanView.addServer(this);
        fire(new NioRegistration(this, serverSocketChannel,
            SelectionKey.OP_ACCEPT, this), Channel.BROADCAST);
    }
315966
public function onManagerStart(Server $server)
    {
        $this->fireServerEvent(SwooleEvent::ON_MANAGER_START, [$server]);

        ProcessHelper::setProcessTitle($this->serverSetting['pname'] . ' manager process');
    }
1299180
public ServerListenerBuilder addStoppingCallbacks(Iterable<Consumer<? super Server>> consumers) {
        requireNonNull(consumers, "consumers");
        for (Consumer<? super Server> consumer : consumers) {
            serverStoppingCallbacks.add(requireNonNull(consumer, "consumer"));
        }
        return this;
    }
136155
public void start() throws Exception {
		server = new Server();
		ServerConnector connector = new ServerConnector(server);
		if (serverAddress != null) {
			connector.setHost(serverAddress.getHostAddress());
		}
		connector.setPort(serverPort);
		server.addConnector(connector);
		server.setHandler(new JmxWebHandler());
		server.start();
	}
86573
@Opened(BROWSER_WATCH_SOCKET)
	public void addedClient(@Parameter("client") String client) {
		log.log(LogService.LOG_INFO, String.format("added client %s", client));
	}
637767
@PostConstruct
    public void init() {
        //init Bus and LifeCycle listeners
        if (bus != null && sendLifecycleEvent ) {
                ServerLifeCycleManager slcm = bus.getExtension(ServerLifeCycleManager.class);
                if (null != slcm) {
                    ServiceListenerImpl svrListener = new ServiceListenerImpl();
                    svrListener.setSendLifecycleEvent(sendLifecycleEvent);
                    svrListener.setQueue(queue);
                    svrListener.setMonitoringServiceClient(monitoringServiceClient);
                    slcm.registerListener(svrListener);
                }

                ClientLifeCycleManager clcm = bus.getExtension(ClientLifeCycleManager.class);
                if (null != clcm) {
                    ClientListenerImpl cltListener = new ClientListenerImpl();
                    cltListener.setSendLifecycleEvent(sendLifecycleEvent);
                    cltListener.setQueue(queue);
                    cltListener.setMonitoringServiceClient(monitoringServiceClient);
                    clcm.registerListener(cltListener);
                }
        }

        if(executorQueueSize == 0) {
        	executor = Executors.newFixedThreadPool(this.executorPoolSize);
        }else{
            executor = new ThreadPoolExecutor(executorPoolSize, executorPoolSize, 0, TimeUnit.SECONDS, 
            		new LinkedBlockingQueue<Runnable>(executorQueueSize), Executors.defaultThreadFactory(), 
            			new RejectedExecutionHandlerImpl());
        }

        scheduler = new Timer();
        scheduler.scheduleAtFixedRate(new TimerTask() {
            public void run() {
                sendEventsFromQueue();
            }
        }, 0, getDefaultInterval());
    }
706997
public boolean isServerStarted() {

        String thisMethodName = CLASS_NAME + ".isServerStarted()";

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(tc, thisMethodName, this);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(tc, thisMethodName, new Boolean(_serverStarted));
        }

        return _serverStarted;
    }
255580
public ServerListenerBuilder addStoppedCallbacks(Iterable<Consumer<? super Server>> consumers) {
        requireNonNull(consumers, "consumers");
        for (Consumer<? super Server> consumer : consumers) {
            serverStoppedCallbacks.add(requireNonNull(consumer, "consumer"));
        }
        return this;
    }
872887
public ServerListenerBuilder addStartedCallback(Runnable runnable) {
        requireNonNull(runnable, "runnable");
        serverStartedCallbacks.add(unused -> runnable.run());
        return this;
    }
983973
public void addSNIObserver(Consumer<SNIServerName> observer)
    {
        if (sniObservers == null)
        {
            sniObservers = new ArrayList<>();
        }
        sniObservers.add(observer);
    }