Search in sources :

Example 1 with ClusterExposedServiceView

use of com.sequenceiq.cloudbreak.template.views.ClusterExposedServiceView in project cloudbreak by hortonworks.

the class ServiceEndpointCollector method prepareClusterExposedServicesViews.

public Map<String, Collection<ClusterExposedServiceView>> prepareClusterExposedServicesViews(Cluster cluster, String managerIp) {
    Map<String, Collection<ClusterExposedServiceView>> result = new HashMap<>();
    for (Map.Entry<String, Collection<ClusterExposedServiceV4Response>> entry : prepareClusterExposedServices(cluster, managerIp).entrySet()) {
        Set<ClusterExposedServiceView> views = new HashSet<>();
        for (ClusterExposedServiceV4Response response : entry.getValue()) {
            views.add(new ClusterExposedServiceView(response.getServiceName(), response.getDisplayName(), response.getKnoxService(), response.getServiceUrl()));
        }
        result.put(entry.getKey(), views);
    }
    return result;
}
Also used : HashMap(java.util.HashMap) Collection(java.util.Collection) HashMap(java.util.HashMap) Map(java.util.Map) ClusterExposedServiceView(com.sequenceiq.cloudbreak.template.views.ClusterExposedServiceView) ClusterExposedServiceV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.cluster.gateway.topology.ClusterExposedServiceV4Response) HashSet(java.util.HashSet)

Aggregations

ClusterExposedServiceV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.cluster.gateway.topology.ClusterExposedServiceV4Response)1 ClusterExposedServiceView (com.sequenceiq.cloudbreak.template.views.ClusterExposedServiceView)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1