WEB-7148 Built In HTTP Preview Server Needed (IntelliJ IDEA)

This commit is contained in:
Vladimir Krivosheev
2013-05-29 18:15:07 +02:00
parent 9c70ba9aa5
commit cc1706609a
2 changed files with 7 additions and 0 deletions
@@ -11,6 +11,8 @@ public abstract class CustomPortServerManager {
public interface CustomPortService {
boolean rebind();
boolean isBound();
}
public abstract int getPort();
@@ -37,6 +37,11 @@ public class SubServer implements CustomPortServerManager.CustomPortService, Dis
}
}
@Override
public boolean isBound() {
return !openChannels.isEmpty();
}
private void stop() {
// todo should we call releaseExternalResources? We use only 1 boss&worker thread
openChannels.close().awaitUninterruptibly();