Example usage for com.amazonaws.services.elastictranscoder AmazonElasticTranscoder readJob

List of usage examples for com.amazonaws.services.elastictranscoder AmazonElasticTranscoder readJob

Introduction

In this page you can find the example usage for com.amazonaws.services.elastictranscoder AmazonElasticTranscoder readJob.

Prototype

ReadJobResult readJob(ReadJobRequest readJobRequest);

Source Link

Document

The ReadJob operation returns detailed information about a job.

Usage

From source file:org.alanwilliamson.amazon.transcoder.job.Read.java

License:Open Source License

public cfData execute(cfSession _session, cfArgStructData argStruct) throws cfmRunTimeException {
    AmazonKey amazonKey = getAmazonKey(_session, argStruct);
    AmazonElasticTranscoder et = getAmazonElasticTranscoder(amazonKey);

    String jobid = getNamedStringParam(argStruct, "jobid", null);
    if (jobid == null)
        throwException(_session, "Please specify a jobid");

    try {/* w w  w.  j  a va 2 s. c  o m*/
        ReadJobResult rjr = et.readJob(new ReadJobRequest().withId(jobid));
        return new cfStringData(rjr.getJob().getStatus());
    } catch (Exception e) {
        throwException(_session, "AmazonElasticTranscoder: " + e.getMessage());
    }

    return cfBooleanData.TRUE;
}