public Deferred < ArrayList < Object > > shutdown ( ) { // Clear shared instance. INSTANCE . set ( null ) ; final Collection < Deferred < Object > > deferreds = Lists . newArrayList ( ) ; if ( http_plugin_commands != null ) { for ( final Map . Entry < String , HttpRpcPlugin > entry : http_plugin_commands . entrySet ( ) ) { deferreds . add ( entry . getValue ( ) . shutdown ( ) ) ; } } if ( rpc_plugins != null ) { for ( final RpcPlugin rpc : rpc_plugins ) { deferreds . add ( rpc . shutdown ( ) ) ; } } return Deferred . groupInOrder ( deferreds ) ; }
Called to gracefully shutdown the plugin . Implementations should close any IO they have open