Package org.apache.curator.x.discovery

Examples of org.apache.curator.x.discovery.UriSpec


        .name(name)
        .id(id)
        .payload(payload)
        .serviceType(ServiceType.DYNAMIC);
    if (url != null) {
      UriSpec uriSpec = new UriSpec(url.toString());

      int port = url.getPort();
      if (port == 0) {
        throw new IOException("Port undefined in " + url);
      }
View Full Code Here


    private final ServiceInstance<InstanceDetails> thisInstance;

    public ExampleServer(CuratorFramework client, String path, String serviceName, String description) throws Exception
    {
        // in a real application, you'd have a convention of some kind for the URI layout
        UriSpec     uriSpec = new UriSpec("{scheme}://foo.com:{port}");

        thisInstance = ServiceInstance.<InstanceDetails>builder()
            .name(serviceName)
            .payload(new InstanceDetails(description))
            .port((int)(65535 * Math.random())) // in a real application, you'd use a common port
View Full Code Here

            if (serviceType != null) {
                builder.serviceType(serviceType);
            }
        }
        {
            final UriSpec uriSpec = getObject(rootNode, "uriSpec", UriSpec.class);
            if (uriSpec != null) {
                builder.uriSpec(uriSpec);
            }
        }
        return builder.build();
View Full Code Here

    private final ServiceInstance<InstanceDetails> thisInstance;

    public ExampleServer(CuratorFramework client, String path, String serviceName, String description) throws Exception
    {
        // in a real application, you'd have a convention of some kind for the URI layout
        UriSpec     uriSpec = new UriSpec("{scheme}://foo.com:{port}");

        thisInstance = ServiceInstance.<InstanceDetails>builder()
            .name(serviceName)
            .payload(new InstanceDetails(description))
            .port((int)(65535 * Math.random())) // in a real application, you'd use a common port
View Full Code Here

        this.uriSpec = uriSpec;
    }

    public ServiceInstance<byte[]> toReal()
    {
        return new ServiceInstance<byte[]>(name, id, address, port, sslPort, payload, registrationTimeUTC, ServiceType.valueOf(serviceType.name()), new UriSpec(uriSpec));
    }
View Full Code Here

TOP

Related Classes of org.apache.curator.x.discovery.UriSpec

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.