Example usage for com.amazonaws.services.simpleworkflow AmazonSimpleWorkflowClient setRegion

List of usage examples for com.amazonaws.services.simpleworkflow AmazonSimpleWorkflowClient setRegion

Introduction

In this page you can find the example usage for com.amazonaws.services.simpleworkflow AmazonSimpleWorkflowClient setRegion.

Prototype

@Deprecated
public void setRegion(Region region) throws IllegalArgumentException 

Source Link

Document

An alternative to AmazonWebServiceClient#setEndpoint(String) , sets the regional endpoint for this client's service calls.

Usage

From source file:com.netflix.amazoncomponents.security.AmazonClientProvider.java

License:Apache License

public AmazonSimpleWorkflow getAmazonSimpleWorkflow(AWSCredentialsProviderChain providerChain, String region) {
    if (providerChain == null) {
        throw new IllegalArgumentException("Provider chain cannot be null");
    }/*  w  w  w.  j a  v  a  2 s.  c  o m*/
    AmazonSimpleWorkflowClient client = new AmazonSimpleWorkflowClient(providerChain);
    if (region != null && region.length() > 0) {
        client.setRegion(Region.getRegion(Regions.fromName(region)));
    }
    return client;
}