Search in sources :

Example 1 with CloudFoundryClientFactory

use of org.springframework.ide.vscode.commons.cloudfoundry.client.CloudFoundryClientFactory in project sts4 by spring-projects.

the class ManifestYamlActualCfClientTest method setup.

@Before
public void setup() throws Exception {
    cfJson = new CfJson();
    CfTargetsInfo info = getTargetsInfoFromEnv();
    CfTargetsInfoProvder provider = new CfTargetsInfoProvder(info);
    CfClientConfig cfClientConfig = CfClientConfig.createDefault(provider);
    CloudFoundryClientFactory clientFactory = DefaultCloudFoundryClientFactoryV2.INSTANCE;
    cfTargetCache = new CFTargetCache(cfClientConfig, clientFactory, new ClientTimeouts());
}
Also used : CfClientConfig(org.springframework.ide.vscode.commons.cloudfoundry.client.cftarget.CfClientConfig) ClientTimeouts(org.springframework.ide.vscode.commons.cloudfoundry.client.ClientTimeouts) CfTargetsInfoProvder(org.springframework.ide.vscode.commons.cloudfoundry.client.cftarget.CfTargetsInfoProvder) CloudFoundryClientFactory(org.springframework.ide.vscode.commons.cloudfoundry.client.CloudFoundryClientFactory) CFTargetCache(org.springframework.ide.vscode.commons.cloudfoundry.client.cftarget.CFTargetCache) CfTargetsInfo(org.springframework.ide.vscode.commons.cloudfoundry.client.cftarget.CfTargetsInfo) Before(org.junit.Before)

Example 2 with CloudFoundryClientFactory

use of org.springframework.ide.vscode.commons.cloudfoundry.client.CloudFoundryClientFactory in project sts4 by spring-projects.

the class ManifestYamlLanguageServer method getCfTargetCache.

private CFTargetCache getCfTargetCache() {
    if (cfTargetCache == null) {
        // Init CF client params provider if it's initilized
        if (cfClientConfig.getClientParamsProvider() == null) {
            cfClientConfig.setClientParamsProvider(defaultClientParamsProvider);
        }
        CloudFoundryClientFactory clientFactory = cfClientFactory;
        cfTargetCache = new CFTargetCache(cfClientConfig, clientFactory, new ClientTimeouts());
    }
    return cfTargetCache;
}
Also used : ClientTimeouts(org.springframework.ide.vscode.commons.cloudfoundry.client.ClientTimeouts) CloudFoundryClientFactory(org.springframework.ide.vscode.commons.cloudfoundry.client.CloudFoundryClientFactory) CFTargetCache(org.springframework.ide.vscode.commons.cloudfoundry.client.cftarget.CFTargetCache)

Aggregations

ClientTimeouts (org.springframework.ide.vscode.commons.cloudfoundry.client.ClientTimeouts)2 CloudFoundryClientFactory (org.springframework.ide.vscode.commons.cloudfoundry.client.CloudFoundryClientFactory)2 CFTargetCache (org.springframework.ide.vscode.commons.cloudfoundry.client.cftarget.CFTargetCache)2 Before (org.junit.Before)1 CfClientConfig (org.springframework.ide.vscode.commons.cloudfoundry.client.cftarget.CfClientConfig)1 CfTargetsInfo (org.springframework.ide.vscode.commons.cloudfoundry.client.cftarget.CfTargetsInfo)1 CfTargetsInfoProvder (org.springframework.ide.vscode.commons.cloudfoundry.client.cftarget.CfTargetsInfoProvder)1