Search in sources :

Example 6 with Daemon

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

the class CPUResourceUsageService method startService.

public void startService() throws Exception {
    if (operationSystem == null && operationSystemServiceName == null) {
        throw new IllegalArgumentException("OperationSystem is null.");
    }
    if (operationSystemServiceName != null) {
        operationSystem = (OperationSystem) ServiceManagerFactory.getServiceObject(operationSystemServiceName);
    }
    cpuTimesChecker = new Daemon(this);
    cpuTimesChecker.setDaemon(true);
    cpuTimesChecker.setName("Nimbus CPUResourceUsage Checker " + getServiceNameObject());
    cpuTimesChecker.start();
}
Also used : Daemon(jp.ossc.nimbus.daemon.Daemon)

Example 7 with Daemon

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

the class ServerConnectionImpl method initClientAcceptor.

private void initClientAcceptor(SocketAddress localAddress) {
    clientAcceptor = new Daemon(new ClientAcceptor());
    clientAcceptor.setName("Nimbus Publish(UDP) ServerConnection ClientAcceptor " + localAddress);
    clientAcceptor.setDaemon(true);
    clientAcceptor.start();
}
Also used : Daemon(jp.ossc.nimbus.daemon.Daemon)

Example 8 with Daemon

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

the class ServerConnectionImpl method initClientAcceptor.

private void initClientAcceptor(SocketAddress localAddress) {
    clientAcceptor = new Daemon(new ClientAcceptor());
    clientAcceptor.setName("Nimbus Publish(TCP) ServerConnection ClientAcceptor " + localAddress);
    clientAcceptor.setDaemon(true);
    clientAcceptor.start();
}
Also used : Daemon(jp.ossc.nimbus.daemon.Daemon)

Example 9 with Daemon

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

the class ServerConnectionImpl method initSendBufferChecker.

private void initSendBufferChecker(SocketAddress localAddress) {
    if (bufferTime > 0 || bufferSize > 0) {
        sendBufferChecker = new Daemon(new SendBufferChecker());
        sendBufferChecker.setName("Nimbus Publish(TCP) ServerConnection SendBufferChecker " + localAddress);
        sendBufferChecker.setDaemon(true);
        sendBufferChecker.start();
    }
}
Also used : Daemon(jp.ossc.nimbus.daemon.Daemon)

Example 10 with Daemon

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

the class ThinOutClientConnectionImpl method setMessageListener.

public void setMessageListener(MessageListener listener) {
    if (thinOutTimeoutChecker != null) {
        thinOutTimeoutChecker = new Daemon(new ThinOutTimeoutChecker());
        thinOutTimeoutChecker.setName("Nimbus Publish ThinOutClientConnection ThinOutTimeoutChecker " + clientConnection);
        thinOutTimeoutChecker.setDaemon(true);
        thinOutTimeoutChecker.start();
    }
    messageListener.setMessageListener(listener);
    if (clientConnection != null) {
        clientConnection.setMessageListener(messageListener);
    }
}
Also used : Daemon(jp.ossc.nimbus.daemon.Daemon)

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