public void terminate() { close(); if (logger.isDebugEnabled()) { logger.debug("Terminated worker task: " + getClass().getName()); } }
/** * Starts the listener thread that accepts incoming messages. The thread is * started in daemon mode and thus it will not block application terminated. * Nevertheless, the {@link #close()} method should be called to stop the * listen thread gracefully and free associated ressources. * * @throws IOException * if the listen port could not be bound to the server thread. */ public synchronized void listen() throws IOException { if (listener != null) { throw new SocketException("Port already listening"); } ensureSocket(); listenerThread = new ListenThread(); listener = SNMP4JSettings.getThreadFactory().createWorkerThread( "DefaultUDPTransportMapping_" + getListenAddress(), listenerThread, true); listener.run(); }
/** * Starts the listener thread that accepts incoming messages. The thread is * started in daemon mode and thus it will not block application terminated. * Nevertheless, the {@link #close()} method should be called to stop the * listen thread gracefully and free associated ressources. * * @throws IOException */ public synchronized void listen() throws IOException { if (listener != null) { throw new SocketException("Port already listening"); } ensureSocket(); listenerThread = new ListenThread(); listener = SNMP4JSettings.getThreadFactory().createWorkerThread( "DefaultUDPTransportMapping_"+getAddress(), listenerThread, true); listener.run(); }
/** * Starts the listener thread that accepts incoming messages. The thread is * started in daemon mode and thus it will not block application terminated. * Nevertheless, the {@link #close()} method should be called to stop the * listen thread gracefully and free associated ressources. * * @throws IOException * if the listen port could not be bound to the server thread. */ public synchronized void listen() throws IOException { if (listener != null) { throw new SocketException("Port already listening"); } ensureSocket(); listenerThread = new ListenThread(); listener = SNMP4JSettings.getThreadFactory().createWorkerThread( "DefaultUDPTransportMapping_"+getAddress(), listenerThread, true); listener.run(); }
public void interrupt() { if (logger.isDebugEnabled()) { logger.debug("Interrupting worker task: " + getClass().getName()); } close(); } }
public void terminate() { close(); if (logger.isDebugEnabled()) { logger.debug("Terminated worker task: " + getClass().getName()); } }
public void terminate() { close(); if (logger.isDebugEnabled()) { logger.debug("Terminated worker task: " + getClass().getName()); } }
public void interrupt() { if (logger.isDebugEnabled()) { logger.debug("Interrupting worker task: " + getClass().getName()); } close(); } }
public void interrupt() { if (logger.isDebugEnabled()) { logger.debug("Interrupting worker task: " + getClass().getName()); } close(); } }