当前位置: 首页>>代码示例>>Java>>正文


Java AmazonSimpleWorkflowClient类代码示例

本文整理汇总了Java中com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient的典型用法代码示例。如果您正苦于以下问题:Java AmazonSimpleWorkflowClient类的具体用法?Java AmazonSimpleWorkflowClient怎么用?Java AmazonSimpleWorkflowClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AmazonSimpleWorkflowClient类属于com.amazonaws.services.simpleworkflow包,在下文中一共展示了AmazonSimpleWorkflowClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
    AmazonSimpleWorkflow service = new AmazonSimpleWorkflowClient();
    service.setEndpoint("https://swf.us-east-1.amazonaws.com");

    String domain = "helloWorldWalkthrough";
    String taskListToPoll = "HelloWorldAsyncList";

    WorkflowWorker wfw = new WorkflowWorker(service, domain, taskListToPoll);
    wfw.setRegisterDomain(true);
    wfw.setDomainRetentionPeriodInDays(1);
    wfw.addWorkflowImplementationType(GreeterWorkflowImpl.class);
    wfw.start();

    ActivityWorker aw = new ActivityWorker(service, domain, taskListToPoll);
    aw.addActivitiesImplementation(new GreeterActivitiesImpl());
    aw.start();

    GreeterWorkflowClientExternalFactory clientFactory = new GreeterWorkflowClientExternalFactoryImpl(service, domain);
    GreeterWorkflowClientExternal client = clientFactory.getClient();
    client.greet();
}
 
开发者ID:csquire,项目名称:swf-flow-gradle,代码行数:22,代码来源:GreeterWorker.java

示例2: setUp

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    configuration = new SWFConfiguration();
    configuration.setDomainName("testDomain");
    swClient = mock(AmazonSimpleWorkflowClient.class);
    configuration.setAmazonSWClient(swClient);
    configuration.setStartWorkflowOptionsParameters(Collections.<String, Object>emptyMap());

    endpoint = new SWFEndpoint();
    endpoint.setConfiguration(configuration);
    clientExternal = mock(DynamicWorkflowClientExternalImpl.class);

    camelSWFWorkflowClient = new CamelSWFWorkflowClient(endpoint, configuration) {
        @Override
        DynamicWorkflowClientExternal getDynamicWorkflowClient(String workflowId, String runId) {
            return clientExternal;
        }
    };
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:20,代码来源:CamelSWFWorkflowClientTest.java

示例3: swf

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
@Value.Default
public AmazonSimpleWorkflow swf() {
    //SWF holds the connection for 60 seconds to see if a decision is available
    final Duration DEFAULT_CONNECTION_TIMEOUT = Duration.ofSeconds(60);
    final Duration DEFAULT_SOCKET_TIMEOUT = DEFAULT_CONNECTION_TIMEOUT.plusSeconds(10);
    return new AmazonSimpleWorkflowClient(new DefaultAWSCredentialsProviderChain(),
            new ClientConfiguration().withConnectionTimeout((int) DEFAULT_CONNECTION_TIMEOUT.toMillis())
                    .withSocketTimeout((int) DEFAULT_SOCKET_TIMEOUT.toMillis()));
}
 
开发者ID:fzakaria,项目名称:WaterFlow,代码行数:10,代码来源:Config.java

示例4: createSWFClient

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
/**
 * Create a new SWF client given the current configuration.
 *
 * @return an AmazonSimpleWorkflow client
 */
AmazonSimpleWorkflow createSWFClient() {
  AWSCredentials credentials = new DefaultAWSCredentialsProviderChain().getCredentials();
  AmazonSimpleWorkflow service =
      new AmazonSimpleWorkflowClient(credentials, new ClientConfiguration().withSocketTimeout(SOCKET_TIMEOUT));
  service.setEndpoint(swfServiceUrl);
  return service;
}
 
开发者ID:soofaloofa,项目名称:swf-starter,代码行数:13,代码来源:Config.java

示例5: createSWClient

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
private AmazonSimpleWorkflowClient createSWClient() throws Exception {
    AWSCredentials credentials = new BasicAWSCredentials(configuration.getAccessKey(), configuration.getSecretKey());

    ClientConfiguration clientConfiguration = new ClientConfiguration();
    if (!configuration.getClientConfigurationParameters().isEmpty()) {
        setProperties(clientConfiguration, configuration.getClientConfigurationParameters());
    }

    AmazonSimpleWorkflowClient client = new AmazonSimpleWorkflowClient(credentials, clientConfiguration);
    if (!configuration.getSWClientParameters().isEmpty()) {
        setProperties(client, configuration.getSWClientParameters());
    }
    return client;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:15,代码来源:SWFEndpoint.java

示例6: createRegistry

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry registry = super.createRegistry();
    amazonSWClient = mock(AmazonSimpleWorkflowClient.class);
    registry.bind("amazonSWClient", amazonSWClient);
    return registry;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:CamelSWFTestSupport.java

示例7: getClientProvider

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
@Produces
@Singleton
public SWFClientProvider getClientProvider() throws Exception {
    AmazonSimpleWorkflowClient client = SWFUtils.createWorkflowClient();
    if (client != null) {
        SWFUtils.registerDomain(client);
    }
    return new SWFClientProvider(client);
}
 
开发者ID:wildfly-extras,项目名称:wildfly-camel,代码行数:10,代码来源:SWFClientProducer.java

示例8: createWorkflowClient

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
public static AmazonSimpleWorkflowClient createWorkflowClient() {
    BasicCredentialsProvider credentials = BasicCredentialsProvider.standard();
    AmazonSimpleWorkflowClient client = !credentials.isValid() ? null : (AmazonSimpleWorkflowClient)
            AmazonSimpleWorkflowClientBuilder.standard()
            .withCredentials(credentials)
            .withRegion("eu-west-1")
            .build();
    return client;
}
 
开发者ID:wildfly-extras,项目名称:wildfly-camel,代码行数:10,代码来源:SWFUtils.java

示例9: getSWClient

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
public AmazonSimpleWorkflowClient getSWClient() {
    return configuration.getAmazonSWClient() != null ? configuration.getAmazonSWClient() : amazonSWClient;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:SWFEndpoint.java

示例10: getAmazonSWClient

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
public AmazonSimpleWorkflowClient getAmazonSWClient() {
    return amazonSWClient;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:SWFConfiguration.java

示例11: setAmazonSWClient

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
/**
 * To use the given AmazonSimpleWorkflowClient as client
 */
public void setAmazonSWClient(AmazonSimpleWorkflowClient amazonSWClient) {
    this.amazonSWClient = amazonSWClient;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:7,代码来源:SWFConfiguration.java

示例12: createSWFClient

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
static AmazonSimpleWorkflow createSWFClient() {
    AWSCredentials awsCredentials = new BasicAWSCredentials("{swfAccessId}", "{swfSecretKey}");
    AmazonSimpleWorkflow client = new AmazonSimpleWorkflowClient(awsCredentials);
    client.setEndpoint("{swfServiceUrl}");
    return client;
}
 
开发者ID:pedropaulovc,项目名称:aws-flow-maven-eclipse-samples,代码行数:7,代码来源:HumanTaskConsole.java

示例13: createSWFClient

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
public AmazonSimpleWorkflow createSWFClient() {
    AWSCredentials awsCredentials = new BasicAWSCredentials(this.swfAccessId, this.swfSecretKey);
    AmazonSimpleWorkflow client = new AmazonSimpleWorkflowClient(awsCredentials);
    client.setEndpoint(this.swfServiceUrl);
    return client;
}
 
开发者ID:pedropaulovc,项目名称:aws-flow-maven-eclipse-samples,代码行数:7,代码来源:ConfigHelper.java

示例14: SWFClientProvider

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
SWFClientProvider(AmazonSimpleWorkflowClient client) {
    this.client = client;
}
 
开发者ID:wildfly-extras,项目名称:wildfly-camel,代码行数:4,代码来源:SWFClientProducer.java

示例15: getClient

import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient; //导入依赖的package包/类
public AmazonSimpleWorkflowClient getClient() {
    return client;
}
 
开发者ID:wildfly-extras,项目名称:wildfly-camel,代码行数:4,代码来源:SWFClientProducer.java


注:本文中的com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。