Initiates an orderly shutdown in which preexisting calls continue but new calls are rejected.
()
| 251 | * Initiates an orderly shutdown in which preexisting calls continue but new calls are rejected. |
| 252 | */ |
| 253 | @Override |
| 254 | public ServerImpl shutdown() { |
| 255 | boolean shutdownTransportServers; |
| 256 | synchronized (lock) { |
| 257 | if (shutdown) { |
| 258 | return this; |
| 259 | } |
| 260 | shutdown = true; |
| 261 | shutdownTransportServers = started; |
| 262 | if (!shutdownTransportServers) { |
| 263 | transportServersTerminated = true; |
| 264 | checkForTermination(); |
| 265 | } |
| 266 | } |
| 267 | if (shutdownTransportServers) { |
| 268 | transportServer.shutdown(); |
| 269 | } |
| 270 | return this; |
| 271 | } |
| 272 | |
| 273 | @Override |
| 274 | public ServerImpl shutdownNow() { |
no test coverage detected