Package com.proofpoint.discovery.client

Examples of com.proofpoint.discovery.client.ServiceDescriptor$ServiceDescriptorBuilder


            builder.put(descriptor.getId(), descriptor);
        }
        Map<UUID, ServiceDescriptor> descriptorMap = builder.build();

        for (ServiceAnnouncement serviceAnnouncement : serviceAnnouncements) {
            ServiceDescriptor serviceDescriptor = descriptorMap.get(serviceAnnouncement.getId());
            assertNotNull(serviceDescriptor, "No descriptor for announcement " + serviceAnnouncement.getId());
            assertEquals(serviceDescriptor.getType(), serviceType.value());
            assertEquals(serviceDescriptor.getPool(), "pool");
            assertEquals(serviceDescriptor.getId(), serviceAnnouncement.getId());
            assertEquals(serviceDescriptor.getProperties(), serviceAnnouncement.getProperties());
            assertEquals(serviceDescriptor.getNodeId(), nodeInfo.getNodeId());
        }
    }
View Full Code Here


    public StaticServiceSelector(Iterable<ServiceDescriptor> serviceDescriptors)
    {
        Preconditions.checkNotNull(serviceDescriptors, "serviceDescriptors is null");

        ServiceDescriptor serviceDescriptor = Iterables.getFirst(serviceDescriptors, null);
        if (serviceDescriptor != null) {
            this.type = serviceDescriptor.getType();
            this.pool = serviceDescriptor.getPool();
        }
        else {
            this.type = "unknown";
            this.pool = DEFAULT_POOL;
        }
View Full Code Here

        String scheme = serviceUri.getScheme();
        checkArgument(scheme.equalsIgnoreCase("http") || scheme.equalsIgnoreCase("https"),
                "Unsupported scheme in uri %s", uri);
        properties.put(scheme, serviceUri.toString());

        return addDiscoveredService(new ServiceDescriptor(
                UUID.randomUUID(),
                nodeId,
                type,
                pool,
                "/somewhere/" + nodeId,
View Full Code Here

TOP

Related Classes of com.proofpoint.discovery.client.ServiceDescriptor$ServiceDescriptorBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.