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

Java TaskLauncher类代码示例

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

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



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

示例1: AboutController

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
public AboutController(StreamDeployer streamDeployer, TaskLauncher taskLauncher, FeaturesProperties featuresProperties,
		VersionInfoProperties versionInfoProperties, SecurityStateBean securityStateBean) {
	this.streamDeployer = streamDeployer;
	this.taskLauncher = taskLauncher;
	this.featuresProperties = featuresProperties;
	this.versionInfoProperties = versionInfoProperties;
	this.securityStateBean = securityStateBean;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:9,代码来源:AboutController.java


示例2: DefaultTaskService

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
/**
 * Initializes the {@link DefaultTaskService}.
 *
 * @param dataSourceProperties the data source properties.
 * @param taskDefinitionRepository the {@link TaskDefinitionRepository} this service will
 * use for task CRUD operations.
 * @param taskExecutionRepository the repository this service will use for deployment IDs.
 * @param taskExplorer the explorer this service will use to lookup task executions
 * @param registry URI registry this service will use to look up app URIs.
 * @param resourceLoader the {@link ResourceLoader} that will resolve URIs to
 * {@link Resource}s.
 * @param taskLauncher the launcher this service will use to launch task apps.
 * @param metaDataResolver the metadata resolver
 * @param taskConfigurationProperties the properties used to define the behavior of tasks
 * @param deploymentIdRepository the repository that maps deployment keys to IDs
 * @param dataflowServerUri the data flow server URI
 */
public DefaultTaskService(DataSourceProperties dataSourceProperties,
		TaskDefinitionRepository taskDefinitionRepository, TaskExplorer taskExplorer,
		TaskRepository taskExecutionRepository, AppRegistryCommon registry, ResourceLoader resourceLoader,
		TaskLauncher taskLauncher, ApplicationConfigurationMetadataResolver metaDataResolver,
		TaskConfigurationProperties taskConfigurationProperties, DeploymentIdRepository deploymentIdRepository,
		String dataflowServerUri) {
	Assert.notNull(dataSourceProperties, "DataSourceProperties must not be null");
	Assert.notNull(taskDefinitionRepository, "TaskDefinitionRepository must not be null");
	Assert.notNull(taskExecutionRepository, "TaskExecutionRepository must not be null");
	Assert.notNull(taskExplorer, "TaskExplorer must not be null");
	Assert.notNull(registry, "UriRegistry must not be null");
	Assert.notNull(resourceLoader, "ResourceLoader must not be null");
	Assert.notNull(taskLauncher, "TaskLauncher must not be null");
	Assert.notNull(metaDataResolver, "metaDataResolver must not be null");
	Assert.notNull(taskConfigurationProperties, "taskConfigurationProperties must not be null");
	Assert.notNull(deploymentIdRepository, "deploymentIdRepository must not be null");
	this.dataSourceProperties = dataSourceProperties;
	this.taskDefinitionRepository = taskDefinitionRepository;
	this.taskExecutionRepository = taskExecutionRepository;
	this.taskExplorer = taskExplorer;
	this.registry = registry;
	this.taskLauncher = taskLauncher;
	this.resourceLoader = resourceLoader;
	this.whitelistProperties = new WhitelistProperties(metaDataResolver);
	this.taskConfigurationProperties = taskConfigurationProperties;
	this.deploymentIdRepository = deploymentIdRepository;
	this.dataflowServerUri = dataflowServerUri;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:46,代码来源:DefaultTaskService.java


示例3: taskService

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Bean
@ConditionalOnBean(TaskDefinitionRepository.class)
public TaskService taskService(TaskDefinitionRepository repository, TaskExplorer taskExplorer,
		TaskRepository taskExecutionRepository, AppRegistryCommon registry, DelegatingResourceLoader resourceLoader,
		TaskLauncher taskLauncher, ApplicationConfigurationMetadataResolver metadataResolver,
		TaskConfigurationProperties taskConfigurationProperties, DeploymentIdRepository deploymentIdRepository) {
	return new DefaultTaskService(dataSourceProperties, repository, taskExplorer, taskExecutionRepository, registry,
			resourceLoader, taskLauncher, metadataResolver, taskConfigurationProperties, deploymentIdRepository,
			this.dataflowServerUri);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:11,代码来源:TaskConfiguration.java


示例4: taskDefinitionController

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Bean
@ConditionalOnBean(TaskDefinitionRepository.class)
public TaskDefinitionController taskDefinitionController(TaskDefinitionRepository repository,
		DeploymentIdRepository deploymentIdRepository, TaskLauncher taskLauncher, AppRegistryCommon appRegistry,
		TaskService taskService) {
	return new TaskDefinitionController(repository, deploymentIdRepository, taskLauncher, appRegistry,
			taskService);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:9,代码来源:DataFlowControllerAutoConfiguration.java


示例5: aboutController

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Bean
public AboutController aboutController(ObjectProvider<StreamDeployer> streamDeployer, TaskLauncher taskLauncher,
		FeaturesProperties featuresProperties, VersionInfoProperties versionInfoProperties,
		SecurityStateBean securityStateBean) {
	return new AboutController(streamDeployer.getIfAvailable(), taskLauncher, featuresProperties, versionInfoProperties,
			securityStateBean);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:8,代码来源:DataFlowControllerAutoConfiguration.java


示例6: aboutController

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Bean
public AboutController aboutController(VersionInfoProperties versionInfoProperties, FeaturesProperties featuresProperties) {
	StreamDeployer streamDeployer = mock(StreamDeployer.class);
	TaskLauncher taskLauncher = mock(TaskLauncher.class);
	RuntimeEnvironmentInfo.Builder builder = new RuntimeEnvironmentInfo.Builder();
	RuntimeEnvironmentInfo appDeployerEnvInfo = builder.implementationName("testAppDepImplementationName").
			implementationVersion("testAppDepImplementationVersion").
			platformType("testAppDepPlatformType").
			platformApiVersion("testAppDepPlatformApiVersion").
			platformClientVersion("testAppDepPlatformClientVersion").spiClass(Class.class).
			platformHostVersion("testAppDepPlatformHostVersion").build();
	RuntimeEnvironmentInfo taskDeployerEnvInfo = builder.implementationName("testTaskDepImplementationName").
			implementationVersion("testTaskDepImplementationVersion").
			platformType("testTaskDepPlatformType").
			platformApiVersion("testTaskDepPlatformApiVersion").
			platformClientVersion("testTaskDepPlatformClientVersion").spiClass(Class.class).
			platformHostVersion("testTaskDepPlatformHostVersion").build();
	if (!featuresProperties.isSkipperEnabled()) {
		when(streamDeployer.environmentInfo()).thenReturn(appDeployerEnvInfo);
	}
	else {
		when(streamDeployer.environmentInfo()).thenThrow(new UnsupportedOperationException());
	}
	when(taskLauncher.environmentInfo()).thenReturn(taskDeployerEnvInfo);
	return new AboutController(streamDeployer, taskLauncher,
			mock(FeaturesProperties.class), versionInfoProperties,
			mock(SecurityStateBean.class));
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:29,代码来源:TestDependencies.java


示例7: defaultTaskService

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Bean
public DefaultTaskService defaultTaskService(TaskDefinitionRepository taskDefinitionRepository, TaskExplorer taskExplorer,
		TaskRepository taskExecutionRepository, AppRegistry appRegistry,
		ResourceLoader resourceLoader, TaskLauncher taskLauncher,
		ApplicationConfigurationMetadataResolver metadataResolver) {
	return new DefaultTaskService(dataSourceProperties, taskDefinitionRepository, taskExplorer,
			taskExecutionRepository, appRegistry, resourceLoader, taskLauncher, metadataResolver,
			new TaskConfigurationProperties(), new InMemoryDeploymentIdRepository(), null);

}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:11,代码来源:TaskServiceDependencies.java


示例8: taskService

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Bean
public TaskService taskService(TaskDefinitionRepository repository, TaskExplorer explorer, AppRegistry registry,
		ResourceLoader resourceLoader, TaskLauncher taskLauncher,
		ApplicationConfigurationMetadataResolver metadataResolver, DeploymentIdRepository deploymentIdRepository) {
	return new DefaultTaskService(new DataSourceProperties(), repository, explorer, taskRepository(), registry,
			resourceLoader, taskLauncher, metadataResolver, new TaskConfigurationProperties(),
			deploymentIdRepository, null);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:9,代码来源:JobDependencies.java


示例9: testLaunch

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Test
public void testLaunch() throws IOException {
	assertNotNull(this.sink.input());

	TaskLauncher testTaskLauncher =
			 context.getBean(TaskLauncher.class);

	Map<String, String> properties = new HashMap();
	properties.put("server.port", "0");
	TaskLaunchRequest request = new TaskLaunchRequest(
			"maven://org.springframework.cloud.task.app:"
			+ "timestamp-task:jar:1.0.1.RELEASE", null, properties,
			null, null);
	GenericMessage<TaskLaunchRequest> message = new GenericMessage<TaskLaunchRequest>(request);
	this.sink.input().send(message);

	ArgumentCaptor<AppDeploymentRequest> deploymentRequest = ArgumentCaptor.forClass(AppDeploymentRequest.class);

	verify(testTaskLauncher).launch(deploymentRequest.capture());

	AppDeploymentRequest actualRequest = deploymentRequest.getValue();

	assertTrue(actualRequest.getCommandlineArguments().isEmpty());
	assertEquals("0", actualRequest.getDefinition().getProperties().get("server.port"));
	assertTrue(actualRequest.getResource().toString()
			.contains("maven://org.springframework.cloud.task.app:timestamp-task:jar:1.0.1.RELEASE"));
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:28,代码来源:TaskSinkApplicationTests.java


示例10: taskLauncher

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Bean
public TaskLauncher taskLauncher() {
	LocalDeployerProperties props = new LocalDeployerProperties();
	props.setDeleteFilesOnExit(false);

	return new LocalTaskLauncher(props);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:8,代码来源:TaskLauncherSinkTests.java


示例11: DeployerPartitionHandler

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
public DeployerPartitionHandler(TaskLauncher taskLauncher,
		JobExplorer jobExplorer,
		Resource resource,
		String stepName) {
	Assert.notNull(taskLauncher, "A taskLauncher is required");
	Assert.notNull(jobExplorer, "A jobExplorer is required");
	Assert.notNull(resource, "A resource is required");
	Assert.hasText(stepName, "A step name is required");

	this.taskLauncher = taskLauncher;
	this.jobExplorer = jobExplorer;
	this.resource = resource;
	this.stepName = stepName;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:15,代码来源:DeployerPartitionHandler.java


示例12: validateConstructorValidation

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
private void validateConstructorValidation(TaskLauncher taskLauncher, JobExplorer jobExplorer, Resource resource, String stepName, String expectedMessage) {
	try {
		new DeployerPartitionHandler(taskLauncher, jobExplorer, resource, stepName);
	}
	catch (IllegalArgumentException iae) {
		assertEquals(expectedMessage, iae.getMessage());
	}
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:9,代码来源:DeployerPartitionHandlerTests.java


示例13: taskLauncher

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Bean
public TaskLauncher taskLauncher() {
	return mock(TaskLauncher.class);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dashboard,代码行数:5,代码来源:TestDependencies.java


示例14: environmentInfo

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Override
public RuntimeEnvironmentInfo environmentInfo() {
	return super.createRuntimeEnvironmentInfo(TaskLauncher.class, this.getClass());
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-deployer-kubernetes,代码行数:5,代码来源:KubernetesTaskLauncher.java


示例15: taskDeployer

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Bean
public TaskLauncher taskDeployer(KubernetesClient kubernetesClient,
                                 ContainerFactory containerFactory) {
	return new KubernetesTaskLauncher(properties, kubernetesClient, containerFactory);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-deployer-kubernetes,代码行数:6,代码来源:KubernetesAutoConfiguration.java


示例16: provideTaskLauncher

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Override
protected TaskLauncher provideTaskLauncher() {
	return taskLauncher;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-deployer-kubernetes,代码行数:5,代码来源:KubernetesTaskLauncherIntegrationTests.java


示例17: TaskLauncherWrapper

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
public TaskLauncherWrapper(TaskLauncher wrapped) {
	this.wrapped = wrapped;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-deployer,代码行数:4,代码来源:AbstractTaskLauncherIntegrationTests.java


示例18: taskDeployer

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Bean
@RefreshScope
public TaskLauncher taskDeployer(ChronosTaskLauncherProperties chronosProperties, Chronos chronos) {
	return new ChronosTaskLauncher(chronosProperties, chronos);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-deployer-mesos,代码行数:6,代码来源:MesosAutoConfiguration.java


示例19: taskLauncher

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Bean
public TaskLauncher taskLauncher() {
	return new TestTaskLauncher();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-stream-app-starters,代码行数:5,代码来源:TaskSinkConfiguration.java


示例20: taskLauncher

import org.springframework.cloud.deployer.spi.task.TaskLauncher; //导入依赖的package包/类
@Bean
TaskLauncher taskLauncher() {
	return 	mock(TaskLauncher.class);

}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:6,代码来源:TaskServiceDependencies.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java MavenId类代码示例发布时间:2022-05-23
下一篇:
Java Subscription类代码示例发布时间: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