@ Override public ServerImpl shutdown ( ) { boolean shutdownTransportServers ; synchronized ( lock ) { if ( shutdown ) { return this ; } shutdown = true ; shutdownTransportServers = started ; if ( ! shutdownTransportServers ) { transportServersTerminated = true ; checkForTermination ( ) ; } } if ( shutdownTransportServers ) { for ( InternalServer ts : transportServers ) { ts . shutdown ( ) ; } } return this ; }
Initiates an orderly shutdown in which preexisting calls continue but new calls are rejected .