List of usage examples for com.amazonaws.services.simpleworkflow.model RegisterDomainRequest RegisterDomainRequest
RegisterDomainRequest
From source file:CreateSwfDomain.java
License:Open Source License
/** * Register a domain. Does nothing if the domain already exists. * @param swf The SWF client that will be used to register the domain. * @param name The name of the domain to register. *///from w ww . j a v a 2s . c o m public void RegisterSwfDomain(AmazonSimpleWorkflow swf, String name) { RegisterDomainRequest request = new RegisterDomainRequest().withName(name); request.setWorkflowExecutionRetentionPeriodInDays("10"); try { swf.registerDomain(request); } catch (DomainAlreadyExistsException e) { System.out.println("Domain already exists!"); } }
From source file:aws.example.helloswf.HelloTypes.java
License:Apache License
public static void registerDomain() { try {/*from ww w . j a v a 2s . co m*/ System.out.println("** Registering the domain '" + DOMAIN + "'."); swf.registerDomain( new RegisterDomainRequest().withName(DOMAIN).withWorkflowExecutionRetentionPeriodInDays("1")); } catch (DomainAlreadyExistsException e) { System.out.println("** Domain already exists!"); } }
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 www. j av a2 s . c o m*/ if (registerDomain) { RegisterDomainRequest domain = new RegisterDomainRequest() .withWorkflowExecutionRetentionPeriodInDays("NONE").withName(DOMAIN); swfClient.registerDomain(domain); } }