public synchronized GrizzlyFuture<NetworkListener> shutdown(final long gracePeriod, final TimeUnit timeUnit) { if (state == State.STOPPING || state == State.STOPPED) { return shutdownFuture != null ? shutdownFuture : Futures.createReadyFuture(this); } else if (state == State.PAUSED) { resume(); } shutdownEvent = new ShutdownEvent(gracePeriod, timeUnit); state = State.STOPPING; shutdownFuture = Futures.createSafeFuture(); transport.shutdown(gracePeriod, timeUnit); return shutdownFuture; }
public synchronized GrizzlyFuture<NetworkListener> shutdown(final long gracePeriod, final TimeUnit timeUnit) { if (state == State.STOPPING || state == State.STOPPED) { return shutdownFuture != null ? shutdownFuture : Futures.createReadyFuture(this); } else if (state == State.PAUSED) { resume(); } shutdownEvent = new ShutdownEvent(gracePeriod, timeUnit); state = State.STOPPING; shutdownFuture = Futures.createSafeFuture(); transport.shutdown(gracePeriod, timeUnit); return shutdownFuture; }
public synchronized GrizzlyFuture<NetworkListener> shutdown(final long gracePeriod, final TimeUnit timeUnit) { if (state == State.STOPPING || state == State.STOPPED) { return shutdownFuture != null ? shutdownFuture : Futures.createReadyFuture(this); } else if (state == State.PAUSED) { resume(); } shutdownEvent = new ShutdownEvent(gracePeriod, timeUnit); state = State.STOPPING; shutdownFuture = Futures.createSafeFuture(); transport.shutdown(gracePeriod, timeUnit); return shutdownFuture; }
public synchronized GrizzlyFuture<NetworkListener> shutdown(final long gracePeriod, final TimeUnit timeUnit) { if (state == State.STOPPING || state == State.STOPPED) { return shutdownFuture != null ? shutdownFuture : Futures.createReadyFuture(this); } else if (state == State.PAUSED) { resume(); } shutdownEvent = new ShutdownEvent(gracePeriod, timeUnit); state = State.STOPPING; shutdownFuture = Futures.createSafeFuture(); transport.shutdown(gracePeriod, timeUnit); return shutdownFuture; }
public synchronized GrizzlyFuture<NetworkListener> shutdown(final long gracePeriod, final TimeUnit timeUnit) { if (state == State.STOPPING || state == State.STOPPED) { return shutdownFuture != null ? shutdownFuture : Futures.createReadyFuture(this); } else if (state == State.PAUSED) { resume(); } shutdownEvent = new ShutdownEvent(gracePeriod, timeUnit); state = State.STOPPING; shutdownFuture = Futures.createSafeFuture(); transport.shutdown(gracePeriod, timeUnit); return shutdownFuture; }
public synchronized GrizzlyFuture<NetworkListener> shutdown(final long gracePeriod, final TimeUnit timeUnit) { if (state == State.STOPPING || state == State.STOPPED) { return shutdownFuture != null ? shutdownFuture : Futures.createReadyFuture(this); } else if (state == State.PAUSED) { resume(); } shutdownEvent = new ShutdownEvent(gracePeriod, timeUnit); state = State.STOPPING; shutdownFuture = Futures.createSafeFuture(); transport.shutdown(gracePeriod, timeUnit); return shutdownFuture; }
public synchronized GrizzlyFuture<NetworkListener> shutdown(final long gracePeriod, final TimeUnit timeUnit) { if (state == State.STOPPING || state == State.STOPPED) { return shutdownFuture != null ? shutdownFuture : Futures.createReadyFuture(this); } else if (state == State.PAUSED) { resume(); } shutdownEvent = new ShutdownEvent(gracePeriod, timeUnit); state = State.STOPPING; shutdownFuture = Futures.createSafeFuture(); transport.shutdown(gracePeriod, timeUnit); return shutdownFuture; }
public synchronized GrizzlyFuture<NetworkListener> shutdown(final long gracePeriod, final TimeUnit timeUnit) { if (state == State.STOPPING || state == State.STOPPED) { return shutdownFuture != null ? shutdownFuture : Futures.createReadyFuture(this); } else if (state == State.PAUSED) { resume(); } shutdownEvent = new ShutdownEvent(gracePeriod, timeUnit); state = State.STOPPING; shutdownFuture = Futures.createSafeFuture(); transport.shutdown(gracePeriod, timeUnit); return shutdownFuture; }
public synchronized GrizzlyFuture<NetworkListener> shutdown(final long gracePeriod, final TimeUnit timeUnit) { if (state == State.STOPPING || state == State.STOPPED) { return shutdownFuture != null ? shutdownFuture : Futures.createReadyFuture(this); } else if (state == State.PAUSED) { resume(); } shutdownEvent = new ShutdownEvent(gracePeriod, timeUnit); state = State.STOPPING; shutdownFuture = Futures.createSafeFuture(); transport.shutdown(gracePeriod, timeUnit); return shutdownFuture; }
public synchronized GrizzlyFuture<NetworkListener> shutdown(final long gracePeriod, final TimeUnit timeUnit) { if (state == State.STOPPING || state == State.STOPPED) { return shutdownFuture != null ? shutdownFuture : Futures.createReadyFuture(this); } else if (state == State.PAUSED) { resume(); } shutdownEvent = new ShutdownEvent(gracePeriod, timeUnit); state = State.STOPPING; shutdownFuture = Futures.createSafeFuture(); transport.shutdown(gracePeriod, timeUnit); return shutdownFuture; }
public synchronized GrizzlyFuture<NetworkListener> shutdown(final long gracePeriod, final TimeUnit timeUnit) { if (state == State.STOPPING || state == State.STOPPED) { return shutdownFuture != null ? shutdownFuture : Futures.createReadyFuture(this); } else if (state == State.PAUSED) { resume(); } state = State.STOPPING; shutdownFuture = Futures.createSafeFuture(); getHttpServerFilter().prepareForShutdown(shutdownCompletionHandler); transport.shutdown(gracePeriod, timeUnit); return shutdownFuture; }