The following document contains the results of PMD's CPD 4.2.2.
| File | Line |
|---|---|
| org/abstracthorizon/danube/service/server/MultiThreadServerService.java | 105 |
| org/abstracthorizon/danube/service/server/ServerSocketChannelService.java | 177 |
}
/**
* Starts the service
* @throws ServiceException
*/
public void start() throws ServiceException {
super.start();
Executor executor = getExecutor();
executor.execute(this);
}
/**
* Stops the service.
* @throws ServiceException
*/
public void stop() throws ServiceException {
ServiceNotificationListener listener = new ServiceNotificationListener() {
public void serviceAboutToChangeState(Service service, int newState) {
}
public synchronized void serviceChangedState(Service service, int oldState) {
if (getState() == STOPPED) {
notifyAll();
}
}
};
addListener(listener);
synchronized (listener) {
super.stop();
try {
listener.wait(graceFinishPeriod);
} catch (InterruptedException ignore) {
}
}
removeListener(listener);
for (ConnectionHandlerThread thread : activeConnections) {
Connection socketConnection = thread.getConnection();
| |