本文整理汇总了Java中org.eclipse.che.api.agent.shared.model.Agent类的典型用法代码示例。如果您正苦于以下问题:Java Agent类的具体用法?Java Agent怎么用?Java Agent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Agent类属于org.eclipse.che.api.agent.shared.model包,在下文中一共展示了Agent类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: launch
import org.eclipse.che.api.agent.shared.model.Agent; //导入依赖的package包/类
@Override
public void launch(Instance machine, Agent agent) throws ServerException, AgentStartException {
super.launch(machine, agent);
DockerNode node = (DockerNode) machine.getNode();
DockerInstance dockerMachine = (DockerInstance) machine;
try {
node.bindWorkspace();
} catch (EnvironmentException e) {
throw new AgentStartException(
format(
"Agent '%s' start failed because of an error with underlying environment. Error: %s",
agent.getId(), e.getLocalizedMessage()));
}
LOG.info(
"Docker machine has been deployed. "
+ "ID '{}'. Workspace ID '{}'. "
+ "Container ID '{}'. Node host '{}'. Node IP '{}'",
machine.getId(),
machine.getWorkspaceId(),
dockerMachine.getContainer(),
node.getHost(),
node.getIp());
}
示例2: configure
import org.eclipse.che.api.agent.shared.model.Agent; //导入依赖的package包/类
@Override
protected void configure() {
Multibinder.newSetBinder(binder(), Agent.class).addBinding().to(SampleAgent.class);
}
示例3: configure
import org.eclipse.che.api.agent.shared.model.Agent; //导入依赖的package包/类
@Override
protected void configure() {
bind(org.eclipse.che.api.agent.server.AgentRegistryService.class);
bind(org.eclipse.che.api.agent.server.WsAgentHealthChecker.class)
.to(com.codenvy.machine.WsAgentHealthCheckerWithAuth.class);
bind(org.eclipse.che.api.agent.server.AgentRegistry.class)
.to(org.eclipse.che.api.agent.server.impl.AgentRegistryImpl.class);
bindConstant()
.annotatedWith(Names.named("machine.terminal_agent.run_command"))
.to(
"$HOME/che/terminal/che-websocket-terminal "
+ "-addr :4411 "
+ "-cmd ${SHELL_INTERPRETER} "
+ "-path '/[^/]+' "
+ "-enable-auth "
+ "-enable-activity-tracking");
bindConstant()
.annotatedWith(Names.named("machine.exec_agent.run_command"))
.to(
"$HOME/che/exec-agent/che-exec-agent "
+ "-addr :4412 "
+ "-cmd ${SHELL_INTERPRETER} "
+ "-path '/[^/]+' "
+ "-enable-auth "
+ "-logs-dir $HOME/che/exec-agent/logs");
Multibinder<AgentLauncher> launchers = Multibinder.newSetBinder(binder(), AgentLauncher.class);
launchers.addBinding().to(org.eclipse.che.api.agent.WsAgentLauncher.class);
launchers
.addBinding()
.to(com.codenvy.machine.agent.launcher.MachineInnerRsyncAgentLauncherImpl.class);
launchers.addBinding().to(org.eclipse.che.api.agent.ExecAgentLauncher.class);
launchers.addBinding().to(org.eclipse.che.api.agent.TerminalAgentLauncher.class);
launchers.addBinding().to(org.eclipse.che.api.agent.SshAgentLauncher.class);
Multibinder<Agent> agents = Multibinder.newSetBinder(binder(), Agent.class);
agents.addBinding().to(com.codenvy.machine.agent.MachineInnerRsyncAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.SshAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.UnisonAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.ExecAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.TerminalAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.WsAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.LSPhpAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.LSPythonAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.LSJsonAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.LSCSharpAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.LSTypeScriptAgent.class);
agents.addBinding().to(org.eclipse.che.api.agent.GitCredentialsAgent.class);
bind(org.eclipse.che.plugin.machine.ssh.exec.SshMachineExecAgentLauncher.class);
bind(String.class)
.annotatedWith(Names.named("workspace.backup.public_key"))
.toProvider(com.codenvy.machine.agent.WorkspaceSyncPublicKeyProvider.class);
}