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

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

Introduction

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

Prototype

@Override
public void registerDomain(RegisterDomainRequest request) 

Source Link

Document

Registers a new domain.

Usage

From source file:org.diksha.common.dyutils.DyDBUtils.java

License:Apache License

public static void createDomain(String[] args) {

    AWSCredentials awsCredentials = getAwsCredentials();

    AmazonSimpleWorkflowClient amazonSimpleWorkflowClient = new AmazonSimpleWorkflowClient(awsCredentials);
    amazonSimpleWorkflowClient.registerDomain(new RegisterDomainRequest().withName(args[0])
            .withDescription(args[1]).withWorkflowExecutionRetentionPeriodInDays(args[2]));

}

From source file:org.wildfly.camel.test.common.aws.SWFUtils.java

License:Apache License

public static void registerDomain(AmazonSimpleWorkflowClient swfClient) {
    boolean registerDomain = true;
    ListDomainsRequest listreq = new ListDomainsRequest().withRegistrationStatus("REGISTERED");
    for (DomainInfo domain : swfClient.listDomains(listreq).getDomainInfos()) {
        registerDomain &= !DOMAIN.equals(domain.getName());
    }/*from  w  w w. j  av  a  2 s  .co m*/
    if (registerDomain) {
        RegisterDomainRequest domain = new RegisterDomainRequest()
                .withWorkflowExecutionRetentionPeriodInDays("NONE").withName(DOMAIN);
        swfClient.registerDomain(domain);
    }
}