The client application will remain running until the
client.shutdown() or
client.shutdown(long, TimeUnit) methods are
called.
The shutdown() method shuts the application
down immediately and any outstanding work will be stopped.
The shutdown(long, TimeUnit) method will
actually wait until any outstanding queued work is completed
before shutting down, but it will time out in the given period of
time. This would be the preferred method of shutting down the
client connection.