Search in sources :

Example 11 with Daemon

use of jp.ossc.nimbus.daemon.Daemon in project nimbus by nimbus-org.

the class DefaultServerService method startService.

public void startService() throws Exception {
    if (queueHandlerContainerServiceName == null) {
        throw new IllegalArgumentException("QueueHandlerContainerServiceName is null.");
    } else {
        queueHandlerContainer = (QueueHandlerContainer) ServiceManagerFactory.getServiceObject(queueHandlerContainerServiceName);
    }
    if (sequenceServiceName != null) {
        sequence = (Sequence) ServiceManagerFactory.getServiceObject(sequenceServiceName);
    }
    Request request = (Request) requestClass.newInstance();
    Response response = (Response) responseClass.newInstance();
    dispatchDaemon = new Daemon(new DispatchDaemonRunnable());
    dispatchDaemon.setName("Nimbus TCP Server dispatch daemon " + getServiceNameObject());
    connect();
    dispatchDaemon.start();
}
Also used : Daemon(jp.ossc.nimbus.daemon.Daemon)

Example 12 with Daemon

use of jp.ossc.nimbus.daemon.Daemon in project nimbus by nimbus-org.

the class AbstractKeepAliveCheckerService method postStartService.

public void postStartService() throws Exception {
    if (checkInterval > 0) {
        try {
            isAlive = checkAlive();
        } catch (Exception e) {
            isAlive = false;
        }
        keepAliveChecker = new Daemon(new KeepAliveCheckerRunnable());
        keepAliveChecker.setName("Nimbus KeepAliveChecker " + getServiceNameObject());
        keepAliveChecker.start();
    }
    super.postStartService();
}
Also used : Daemon(jp.ossc.nimbus.daemon.Daemon)

Example 13 with Daemon

use of jp.ossc.nimbus.daemon.Daemon in project nimbus by nimbus-org.

the class DefaultPingPongHandlerService method createService.

@Override
public void createService() throws Exception {
    sessionSet = new HashSet();
    daemon = new Daemon(this);
    daemon.setName("Nimbus WebSocket PingSendAndPongCheckDaemon " + getServiceNameObject());
}
Also used : Daemon(jp.ossc.nimbus.daemon.Daemon) HashSet(java.util.HashSet)

Aggregations

Daemon (jp.ossc.nimbus.daemon.Daemon)13 EOFException (java.io.EOFException)2 IOException (java.io.IOException)2 InetAddress (java.net.InetAddress)2 Socket (java.net.Socket)2 SocketException (java.net.SocketException)2 SocketTimeoutException (java.net.SocketTimeoutException)2 UnknownHostException (java.net.UnknownHostException)2 Iterator (java.util.Iterator)2 ServiceManager (jp.ossc.nimbus.core.ServiceManager)2 ConnectException (jp.ossc.nimbus.service.publish.ConnectException)2 MessageSendException (jp.ossc.nimbus.service.publish.MessageSendException)2 DatagramSocket (java.net.DatagramSocket)1 InetSocketAddress (java.net.InetSocketAddress)1 MulticastSocket (java.net.MulticastSocket)1 NetworkInterface (java.net.NetworkInterface)1 HashSet (java.util.HashSet)1 JMXServiceURL (javax.management.remote.JMXServiceURL)1 ServiceNameEditor (jp.ossc.nimbus.beans.ServiceNameEditor)1 ServiceName (jp.ossc.nimbus.core.ServiceName)1