• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java AmazonElasticTranscoder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: scanElasticTranscoder

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
/**
 * Collect data for ElasticTranscoder.
 *
 * @param stats
 *            current statistics object.
 * @param account
 *            currently used credentials object.
 * @param region
 *            currently used aws region.
 */
public static void scanElasticTranscoder(AwsStats stats, AwsAccount account, Regions region) {
	if (region == Regions.EU_CENTRAL_1)
		return;

	LOG.debug("Scan for ElasticTranscoder in region " + region.getName() + " in account " + account.getAccountId());

	try {
		AmazonElasticTranscoder elasticTranscoder = new AmazonElasticTranscoderClient(account.getCredentials());
		elasticTranscoder.setRegion(Region.getRegion(region));

		List<Pipeline> list = elasticTranscoder.listPipelines().getPipelines();

		int totalItems = list.size();
		for (Pipeline pipeline : list) {
			AwsResource res = new AwsResource(pipeline.getName(), account.getAccountId(), AwsResourceType.ElasticTranscoder, region);
			res.addInfo(AwsTag.Arn, pipeline.getArn());
			stats.add(res);
		}

		LOG.info(totalItems + " Elastic Transcoder pipelines in region " + region.getName() + " in account " + account.getAccountId());
	} catch (AmazonServiceException ase) {
		LOG.error("Exception of ElasticTranscoder: " + ase.getMessage());
	}
}
 
开发者ID:janloeffler,项目名称:aws-utilization-monitor,代码行数:35,代码来源:AwsScan.java


示例2: execute

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
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{
		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; 
}
 
开发者ID:OpenBD,项目名称:openbd-core,代码行数:18,代码来源:Read.java


示例3: execute

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
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{
		et.cancelJob( new CancelJobRequest().withId(jobid) );
	}catch(Exception e){
		throwException(_session, "AmazonElasticTranscoder: " + e.getMessage() );
	}

	return cfBooleanData.TRUE; 
}
 
开发者ID:OpenBD,项目名称:openbd-core,代码行数:17,代码来源:Cancel.java


示例4: execute

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
public cfData execute( cfSession _session, cfArgStructData argStruct ) throws cfmRunTimeException{
	AmazonKey amazonKey	= getAmazonKey(_session, argStruct);
	AmazonElasticTranscoder et = getAmazonElasticTranscoder(amazonKey);

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

	try{
		
		ReadPipelineResult rp = et.readPipeline( new ReadPipelineRequest().withId(pipelineid) );
		return getPipeline( rp.getPipeline() );
		
	}catch(Exception e){
		throwException(_session, "AmazonElasticTranscoder: " + e.getMessage() );
	}
	
	return cfBooleanData.TRUE; 
}
 
开发者ID:OpenBD,项目名称:openbd-core,代码行数:20,代码来源:Read.java


示例5: execute

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
public cfData execute( cfSession _session, cfArgStructData argStruct ) throws cfmRunTimeException{
	AmazonKey amazonKey	= getAmazonKey(_session, argStruct);
	AmazonElasticTranscoder et = getAmazonElasticTranscoder(amazonKey);

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

	try{
		et.deletePipeline( new DeletePipelineRequest().withId(pipelineid) );
	}catch(Exception e){
		throwException(_session, "AmazonElasticTranscoder: " + e.getMessage() );
	}
	
	return cfBooleanData.TRUE; 
}
 
开发者ID:OpenBD,项目名称:openbd-core,代码行数:17,代码来源:Delete.java


示例6: execute

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
public cfData execute( cfSession _session, cfArgStructData argStruct ) throws cfmRunTimeException{
	AmazonKey amazonKey	= getAmazonKey(_session, argStruct);
	AmazonElasticTranscoder et = getAmazonElasticTranscoder(amazonKey);

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

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

	try{
		et.updatePipelineStatus( new UpdatePipelineStatusRequest().withId(pipelineid).withStatus(status) );
	}catch(Exception e){
		throwException(_session, "AmazonElasticTranscoder: " + e.getMessage() );
	}
	
	return cfBooleanData.TRUE; 
}
 
开发者ID:OpenBD,项目名称:openbd-core,代码行数:21,代码来源:UpdateStatus.java


示例7: getAmazonElasticTranscoder

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
/**
 * Returns back the necessary AmazonElasticTranscoder class for interacting with Elastic Transcoder
 * @param amazonKey
 * @return
 * @throws cfmRunTimeException
 */
public AmazonElasticTranscoder getAmazonElasticTranscoder( AmazonKey amazonKey ) throws cfmRunTimeException{
	BasicAWSCredentials awsCreds = new BasicAWSCredentials(amazonKey.getKey(), amazonKey.getSecret());
	AmazonElasticTranscoder et = new AmazonElasticTranscoderClient(awsCreds);
	et.setRegion( amazonKey.getAmazonRegion().toAWSRegion() );
	return et;
}
 
开发者ID:OpenBD,项目名称:openbd-core,代码行数:13,代码来源:AmazonBase.java


示例8: amazonElasticTranscoderClient

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
@Bean( destroyMethod = "shutdown" )
AmazonElasticTranscoder amazonElasticTranscoderClient()
{
    return this.awsRegion().createClient( AmazonElasticTranscoderClient.class,
                                          this.awsCredentials(),
                                          new ClientConfiguration() );
}
 
开发者ID:stevenmhood,项目名称:transcoder,代码行数:8,代码来源:ApplicationConfig.java


示例9: getTranscoderClient

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
public AmazonElasticTranscoder getTranscoderClient() {
	return transcoderClient;
}
 
开发者ID:TimShi,项目名称:s3_video,代码行数:4,代码来源:AWSAdapter.java


示例10: setTranscoderClient

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
public void setTranscoderClient(AmazonElasticTranscoder transcoderClient) {
	this.transcoderClient = transcoderClient;
}
 
开发者ID:TimShi,项目名称:s3_video,代码行数:4,代码来源:AWSAdapter.java


示例11: execute

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
public cfData execute( cfSession _session, cfArgStructData argStruct ) throws cfmRunTimeException{
	AmazonKey amazonKey	= getAmazonKey(_session, argStruct);
	AmazonElasticTranscoder et = getAmazonElasticTranscoder(amazonKey);

	CreateJobRequest cjr	= new CreateJobRequest();

	cjr.setPipelineId( getNamedStringParam(argStruct, "pipelineid", null) );
	if ( cjr.getPipelineId() == null || cjr.getPipelineId().isEmpty() )
		throwException(_session, "please provide a valid pipelineid");

	cjr.setOutputKeyPrefix( getNamedStringParam(argStruct, "outputkeyprefix", null) );
	if ( cjr.getOutputKeyPrefix() != null && cjr.getOutputKeyPrefix().isEmpty() )
		throwException(_session, "please provide a valid outputkeyprefix");
	
	
	// Handle the input
	cfStructData	input	= getNamedStructParam( _session, argStruct, "input", null );
	if ( input == null )
		throwException(_session, "please provide a 'input'");
	
	JobInput jobinput	= new JobInput();
	
	if ( input.containsKey("aspectratio") )
		jobinput.setAspectRatio( input.getData("aspectratio").getString() );
	
	if ( input.containsKey("container") )
		jobinput.setContainer( input.getData("container").getString() );
	
	if ( input.containsKey("framerate") )
		jobinput.setFrameRate( input.getData("framerate").getString() );
	
	if ( input.containsKey("interlaced") )
		jobinput.setInterlaced( input.getData("interlaced").getString() );
	
	if ( input.containsKey("key") )
		jobinput.setKey( input.getData("key").getString() );
	
	if ( input.containsKey("resolution") )
		jobinput.setResolution( input.getData("resolution").getString() );
	
	if ( input.containsKey("encryption") )
		jobinput.setEncryption( getEncryption( (cfStructData)input.getData("encryption") ) );
		
	cjr.setInput(jobinput);
	
	
	// Set the output
	cfArrayData	outputArr	= getNamedArrayParam( _session, argStruct, "outputs", null );
	if ( outputArr == null )
		throwException(_session, "please provide 'outputs'");
	
	List<CreateJobOutput>	outputs	= new LinkedList();
	for ( int x=0; x < outputArr.size(); x++ )
		outputs.add( getCreateJobOutput( (cfStructData)outputArr.getData(x+1) ) );
	
	cjr.setOutputs(outputs);
	
	
	// Now after collection all that; create the actual pipeline
	try{
		CreateJobResult cpres = et.createJob(cjr);
		return new cfStringData( cpres.getJob().getId() ); 
	}catch(Exception e){
		throwException(_session, "AmazonElasticTranscoder: " + e.getMessage() );
		return cfBooleanData.TRUE;
	}
}
 
开发者ID:OpenBD,项目名称:openbd-core,代码行数:68,代码来源:Create.java


示例12: transcodeClient

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
@Bean
@Scope(WebApplicationContext.SCOPE_APPLICATION)
public AmazonElasticTranscoder transcodeClient(final AWSCredentialsProvider creds,
                                               final Region region) {
    return region.createClient(AmazonElasticTranscoderClient.class, creds, null);
}
 
开发者ID:awslabs,项目名称:amediamanager,代码行数:7,代码来源:ServerConfig.java


示例13: TranscodingService

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
public TranscodingService( final AmazonElasticTranscoder elasticTranscoder )
{
    this.elasticTranscoder = elasticTranscoder;
}
 
开发者ID:stevenmhood,项目名称:transcoder,代码行数:5,代码来源:TranscodingService.java


示例14: execute

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
public cfData execute( cfSession _session, cfArgStructData argStruct ) throws cfmRunTimeException{
	AmazonKey amazonKey	= getAmazonKey(_session, argStruct);
	AmazonElasticTranscoder et = getAmazonElasticTranscoder(amazonKey);

	try{
		cfArrayData	pipelines	= cfArrayData.createArray(1);

		ListPresetsRequest listObjectsRequest = new ListPresetsRequest();

		ListPresetsResult lpr;
		
		do {
			lpr = et.listPresets(listObjectsRequest);
		
			for (Preset preset: lpr.getPresets() )
				pipelines.addElement( getPreset(preset) );
		
			listObjectsRequest.setPageToken( lpr.getNextPageToken() );
		} while ( listObjectsRequest.getPageToken() != null );

		return pipelines;
		
	}catch(Exception e){
		throwException(_session, "AmazonElasticTranscoder: " + e.getMessage() );
	}
	
	return cfBooleanData.TRUE; 
}
 
开发者ID:OpenBD,项目名称:openbd-core,代码行数:29,代码来源:List.java


示例15: execute

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
public cfData execute( cfSession _session, cfArgStructData argStruct ) throws cfmRunTimeException{
	AmazonKey amazonKey	= getAmazonKey(_session, argStruct);
	AmazonElasticTranscoder et = getAmazonElasticTranscoder(amazonKey);

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

	
	try{
		cfArrayData	jobs	= cfArrayData.createArray(1);

		ListJobsByPipelineRequest listObjectsRequest = new ListJobsByPipelineRequest();

		ListJobsByPipelineResult lpr;
		
		do {
			lpr = et.listJobsByPipeline(listObjectsRequest);
		
			for (Job job : lpr.getJobs() )
				jobs.addElement( getJob(job) );
		
			listObjectsRequest.setPageToken( lpr.getNextPageToken() );
		} while ( listObjectsRequest.getPageToken() != null );

		return jobs;
		
	}catch(Exception e){
		throwException(_session, "AmazonElasticTranscoder: " + e.getMessage() );
	}
	
	return cfBooleanData.TRUE; 
}
 
开发者ID:OpenBD,项目名称:openbd-core,代码行数:34,代码来源:List.java


示例16: execute

import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; //导入依赖的package包/类
public cfData execute( cfSession _session, cfArgStructData argStruct ) throws cfmRunTimeException{
	AmazonKey amazonKey	= getAmazonKey(_session, argStruct);
	AmazonElasticTranscoder et = getAmazonElasticTranscoder(amazonKey);

	try{
		cfArrayData	pipelines	= cfArrayData.createArray(1);

		ListPipelinesRequest listObjectsRequest = new ListPipelinesRequest();

		ListPipelinesResult lpr;
		
		do {
			lpr = et.listPipelines(listObjectsRequest);
		
			for (Pipeline pipeline : lpr.getPipelines())
				pipelines.addElement( getPipeline(pipeline) );
		
			listObjectsRequest.setPageToken( lpr.getNextPageToken() );
		} while ( listObjectsRequest.getPageToken() != null );

		return pipelines;
		
	}catch(Exception e){
		throwException(_session, "AmazonElasticTranscoder: " + e.getMessage() );
	}
	
	return cfBooleanData.TRUE; 
}
 
开发者ID:OpenBD,项目名称:openbd-core,代码行数:29,代码来源:List.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ServiceDefinition类代码示例发布时间:2022-05-23
下一篇:
Java ThreadPool类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap