本文整理汇总了Java中com.thoughtworks.go.plugin.api.GoApplicationAccessor类的典型用法代码示例。如果您正苦于以下问题:Java GoApplicationAccessor类的具体用法?Java GoApplicationAccessor怎么用?Java GoApplicationAccessor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GoApplicationAccessor类属于com.thoughtworks.go.plugin.api包,在下文中一共展示了GoApplicationAccessor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: settingsParsing
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
@Test
public void settingsParsing() throws Exception {
ArtifactoryScmPlugin plugin = new ArtifactoryScmPlugin();
plugin.initializeGoApplicationAccessor(new GoApplicationAccessor(){
@Override
public GoApiResponse submit(GoApiRequest request)
{
String json = "{"
+ "\"connectTimeout\": \"1\","
+ "\"socketTimeout\": \"2\","
+ "\"connectionRequestTimeout\": \"3\","
+ "\"proxyUrl\": \"http://proxy.example.com:1234\","
+ "\"connPoolSize\": \"3\""
+ "}";
DefaultGoApiResponse response = new DefaultGoApiResponse(200);
response.setResponseBody(json);
return response;
}
});
// just make sure there is no exception
}
示例2: setUp
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
@Before
public void setUp() throws IOException {
plugin = new YamlConfigPlugin();
goAccessor = mock(GoApplicationAccessor.class);
plugin.initializeGoApplicationAccessor(goAccessor);
GoApiResponse settingsResponse = DefaultGoApiResponse.success("{}");
when(goAccessor.submit(any(GoApiRequest.class))).thenReturn(settingsResponse);
parser = new JsonParser();
}
示例3: initializeGoApplicationAccessor
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
@Override
public void initializeGoApplicationAccessor(GoApplicationAccessor goApplicationAccessor) {
logger.debug("initializeGoApplicationAccessor()");
GoApiRequest request = new DefaultGoApiRequest(REQUEST_SETTINGS_GET_THEM, GO_API_VERSION, pluginIdentifier());
GoApiResponse response = goApplicationAccessor.submit(request);
String json = response.responseBody();
httpClient = createHttpClient(json);
}
示例4: createPluginScm
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
protected ArtifactoryScmPlugin createPluginScm() {
ArtifactoryScmPlugin plugin = new ArtifactoryScmPlugin();
plugin.initializeGoApplicationAccessor(new GoApplicationAccessor(){
@Override
public GoApiResponse submit(GoApiRequest request)
{
return new DefaultGoApiResponse(200);
}
});
return plugin;
}
示例5: createPluginPkg
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
protected ArtifactoryPkgPlugin createPluginPkg() {
ArtifactoryPkgPlugin plugin = new ArtifactoryPkgPlugin();
plugin.initializeGoApplicationAccessor(new GoApplicationAccessor(){
@Override
public GoApiResponse submit(GoApiRequest request)
{
return new DefaultGoApiResponse(200);
}
});
return plugin;
}
示例6: PluginRequest
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
public PluginRequest(GoApplicationAccessor accessor) {
this.accessor = accessor;
}
示例7: initializeGoApplicationAccessor
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
@Override
public void initializeGoApplicationAccessor(GoApplicationAccessor accessor) {
pluginRequest = new PluginRequest(accessor);
agentInstances = new KubernetesAgentInstances();
}
示例8: initializeGoApplicationAccessor
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
@Override
public void initializeGoApplicationAccessor(GoApplicationAccessor accessor) {
this.accessor = accessor;
}
示例9: initializeGoApplicationAccessor
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
@Override
public void initializeGoApplicationAccessor(GoApplicationAccessor accessor) {
pluginRequest = new PluginRequest(accessor);
agentInstances = new MarathonAgentInstances(marathonClientFactory);
}
示例10: initializeGoApplicationAccessor
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
@Override
public void initializeGoApplicationAccessor(GoApplicationAccessor goApplicationAccessor) {
this.goApplicationAccessor = goApplicationAccessor;
}
示例11: initializeGoApplicationAccessor
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
@Override
public void initializeGoApplicationAccessor(GoApplicationAccessor accessor) {
pluginRequest = new PluginRequest(accessor);
agentInstances = new DockerContainers();
}
示例12: initializeGoApplicationAccessor
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
@Override
public void initializeGoApplicationAccessor(GoApplicationAccessor accessor) {
this.accessor = accessor;
this.pluginRequest = new PluginRequest(accessor);
}
示例13: initializeGoApplicationAccessor
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
@Override
public void initializeGoApplicationAccessor(GoApplicationAccessor accessor) {
pluginRequest = new PluginRequest(accessor);
agentInstances = new DockerServices();
}
示例14: initializeGoApplicationAccessor
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
@Override
public void initializeGoApplicationAccessor(GoApplicationAccessor accessor) {
pluginRequest = new PluginRequest(accessor);
agentInstances = new OpenStackInstances();
}
示例15: initializeGoApplicationAccessor
import com.thoughtworks.go.plugin.api.GoApplicationAccessor; //导入依赖的package包/类
@Override
public void initializeGoApplicationAccessor(GoApplicationAccessor accessor) {
pluginRequest = new PluginRequest(accessor);
agentInstances = new ExampleAgentInstances();
}