Example usage for com.amazonaws.services.ec2 AmazonEC2AsyncClient shutdown

List of usage examples for com.amazonaws.services.ec2 AmazonEC2AsyncClient shutdown

Introduction

In this page you can find the example usage for com.amazonaws.services.ec2 AmazonEC2AsyncClient shutdown.

Prototype

@Override
public void shutdown() 

Source Link

Document

Shuts down the client, releasing all managed resources.

Usage

From source file:com.vmware.photon.controller.model.adapters.awsadapter.AWSUtils.java

License:Open Source License

/**
 * Releases all the resources allocated for the use of the AWS EC2 client.
 *///ww  w.j av a  2 s.co  m
public static void cleanupEC2ClientResources(AmazonEC2AsyncClient client) {
    if (client != null) {
        client.shutdown();
        // To ensure that no requests are made on a client on which shutdown has already been
        // invoked.
        client = null;
    }
}