Search in sources :

Example 1 with ServiceInfoCollection

use of org.platformlayer.core.model.ServiceInfoCollection in project platformlayer by platformlayer.

the class OpsSystem method listServices.

public ServiceInfoCollection listServices() {
    ServiceInfoCollection collection = new ServiceInfoCollection();
    collection.services = Lists.newArrayList();
    collection.services.addAll(serviceDictionary.getAllServices());
    return collection;
}
Also used : ServiceInfoCollection(org.platformlayer.core.model.ServiceInfoCollection)

Example 2 with ServiceInfoCollection

use of org.platformlayer.core.model.ServiceInfoCollection in project platformlayer by platformlayer.

the class HttpPlatformLayerClient method listServices.

@Override
public List<ServiceInfo> listServices(boolean allowCache) throws PlatformLayerClientException {
    if (!allowCache || services == null) {
        ServiceInfoCollection ret = doRequest(HttpMethod.GET, "", ServiceInfoCollection.class, Format.XML, null, null);
        services = ret.services;
    }
    return services;
}
Also used : ServiceInfoCollection(org.platformlayer.core.model.ServiceInfoCollection)

Example 3 with ServiceInfoCollection

use of org.platformlayer.core.model.ServiceInfoCollection in project platformlayer by platformlayer.

the class DirectPlatformLayerClient method listServices.

@Override
public Collection<ServiceInfo> listServices(boolean allowCache) throws PlatformLayerClientException {
    Collection<ServiceInfo> services = this.services;
    if (!allowCache || services == null) {
        ServiceInfoCollection serviceInfoCollection = opsSystem.listServices();
        services = serviceInfoCollection.services;
        this.services = services;
    }
    return services;
}
Also used : ServiceInfo(org.platformlayer.core.model.ServiceInfo) ServiceInfoCollection(org.platformlayer.core.model.ServiceInfoCollection)

Aggregations

ServiceInfoCollection (org.platformlayer.core.model.ServiceInfoCollection)3 ServiceInfo (org.platformlayer.core.model.ServiceInfo)1