Return-Path: X-Original-To: apmail-curator-commits-archive@minotaur.apache.org Delivered-To: apmail-curator-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 27E08FBF8 for ; Fri, 22 Mar 2013 20:01:23 +0000 (UTC) Received: (qmail 82947 invoked by uid 500); 22 Mar 2013 20:01:23 -0000 Delivered-To: apmail-curator-commits-archive@curator.apache.org Received: (qmail 82924 invoked by uid 500); 22 Mar 2013 20:01:23 -0000 Mailing-List: contact commits-help@curator.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.incubator.apache.org Delivered-To: mailing list commits@curator.incubator.apache.org Received: (qmail 82917 invoked by uid 99); 22 Mar 2013 20:01:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Mar 2013 20:01:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Mar 2013 20:01:19 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 07D152388C48; Fri, 22 Mar 2013 19:59:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1459958 [33/42] - in /incubator/curator/site/trunk: ./ apidocs/ apidocs/cache/ apidocs/cache/class-use/ apidocs/discovery/ apidocs/discovery/class-use/ apidocs/framework/ apidocs/framework/class-use/ apidocs/leader/ apidocs/leader/class-us... Date: Fri, 22 Mar 2013 19:59:01 -0000 To: commits@curator.incubator.apache.org From: randgalt@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130322195953.07D152388C48@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: incubator/curator/site/trunk/curator-x-discovery-server/dependency-info.html URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/dependency-info.html?rev=1459958&view=auto ============================================================================== --- incubator/curator/site/trunk/curator-x-discovery-server/dependency-info.html (added) +++ incubator/curator/site/trunk/curator-x-discovery-server/dependency-info.html Fri Mar 22 19:57:43 2013 @@ -0,0 +1,298 @@ + + + + + + + + + Discovery Service Server - Dependency Information + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ +
+ + +
+ +

Dependency Information

Apache Maven

<dependency>
+  <groupId>org.apache.curator</groupId>
+  <artifactId>curator-x-discovery-server</artifactId>
+  <version>2.0.0-SNAPSHOT</version>
+</dependency>

Apache Buildr

'org.apache.curator:curator-x-discovery-server:jar:2.0.0-SNAPSHOT'

Apache Ant

<dependency org="org.apache.curator" name="curator-x-discovery-server" rev="2.0.0-SNAPSHOT">
+  <artifact name="curator-x-discovery-server" type="jar" />
+</dependency>

Groovy Grape

@Grapes(
+@Grab(group='org.apache.curator', module='curator-x-discovery-server', version='2.0.0-SNAPSHOT')
+)

Grails

compile 'org.apache.curator:curator-x-discovery-server:2.0.0-SNAPSHOT'

Leiningen

[org.apache.curator/curator-x-discovery-server "2.0.0-SNAPSHOT"]

SBT

libraryDependencies += "org.apache.curator" %% "curator-x-discovery-server" % "2.0.0-SNAPSHOT"
+
+
+
+ +
+ +
+
+
Copyright © 2011-2013 + The Apache Software Foundation. + All Rights Reserved. + +
+ + +
Apache Curator, the Apache feather logo, and the Apache Curator project logos are + trademarks of The Apache Software Foundation. All other marks mentioned may be + trademarks or registered trademarks of their respective owners.
+ + +
+
+ + Propchange: incubator/curator/site/trunk/curator-x-discovery-server/dependency-info.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/curator/site/trunk/curator-x-discovery-server/dependency-info.html ------------------------------------------------------------------------------ svn:keywords = Date Revision Author HeadURL Id Propchange: incubator/curator/site/trunk/curator-x-discovery-server/dependency-info.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: incubator/curator/site/trunk/curator-x-discovery-server/dependency-management.html URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/dependency-management.html?rev=1459958&view=auto ============================================================================== --- incubator/curator/site/trunk/curator-x-discovery-server/dependency-management.html (added) +++ incubator/curator/site/trunk/curator-x-discovery-server/dependency-management.html Fri Mar 22 19:57:43 2013 @@ -0,0 +1,290 @@ + + + + + + + + + Discovery Service Server - Project Dependency Management + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ +
+ + +
+ +

Project Dependency Management

compile

The following is a list of compile dependencies in the DependencyManagement of this project. These dependencies can be included in the submodules to compile and run the submodule:

GroupIdArtifactIdVersionTypeLicense
org.apache.curatorcurator-client2.0.0-SNAPSHOTjarfile:///Users/jzimmerman/Netflix/dev/oss/apache/curator/curator-client/LICENSE.txt
org.apache.curatorcurator -framework2.0.0-SNAPSHOTjarfile:///Users/jzimmerman/Netflix/dev/oss/apache/curator/curator-framework/LICENSE.txt
org.apache.curatorcurator-recipes2.0.0-SNAPSHOTjarfile:///Users/jzimmerman/Netflix/dev/oss/apache/curator/curator-recipes/LICENSE.txt
org.apache.curatorcurator-test2.0.0-SNAPSHOTjarfile:///Users/jzimmerman/Netflix/dev/oss/apache/curator/curator-test/LICENSE.txt
org.apache.curatorcurator-x-discovery2.0.0-SNAPSHOTjarfile:///Users/jzimmerman/Netflix/dev/oss/apache/curator/curator-x-discovery/LI CENSE.txt
org.apache.curatorcurator-x-discovery-server2.0.0-SNAPSHOTjarfile:///Users/jzimmerman/Netflix/dev/oss/apache/curator/curator-x-discovery-server/LICENSE.txt
org.mockitomockito-core1.8.5jarThe MIT License
org.slf4jslf4j-api1.6.4jarMIT License
+
+
+
+ +
+ +
+
+
Copyright © 2011-2013 + The Apache Software Foundation. + All Rights Reserved. + +
+ + +
Apache Curator, the Apache feather logo, and the Apache Curator project logos are + trademarks of The Apache Software Foundation. All other marks mentioned may be + trademarks or registered trademarks of their respective owners.
+ + +
+
+ + Propchange: incubator/curator/site/trunk/curator-x-discovery-server/dependency-management.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/curator/site/trunk/curator-x-discovery-server/dependency-management.html ------------------------------------------------------------------------------ svn:keywords = Date Revision Author HeadURL Id Propchange: incubator/curator/site/trunk/curator-x-discovery-server/dependency-management.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: incubator/curator/site/trunk/curator-x-discovery-server/distribution-management.html URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/distribution-management.html?rev=1459958&view=auto ============================================================================== --- incubator/curator/site/trunk/curator-x-discovery-server/distribution-management.html (added) +++ incubator/curator/site/trunk/curator-x-discovery-server/distribution-management.html Fri Mar 22 19:57:43 2013 @@ -0,0 +1,290 @@ + + + + + + + + + Discovery Service Server - Project Distribution Management + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ +
+ + +
+ +

Overview

The following is the distribution management information used by this project.

Snapshot Repository - apache.snapshots.https

https://repository.apache.org/content/repositories/snapshots

Site - apache

scp://people.apach e.org/www/curator.incubator.apache.org/curator-x-discovery-server

+
+
+
+ +
+ +
+
+
Copyright © 2011-2013 + The Apache Software Foundation. + All Rights Reserved. + +
+ + +
Apache Curator, the Apache feather logo, and the Apache Curator project logos are + trademarks of The Apache Software Foundation. All other marks mentioned may be + trademarks or registered trademarks of their respective owners.
+ + +
+
+ + Propchange: incubator/curator/site/trunk/curator-x-discovery-server/distribution-management.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/curator/site/trunk/curator-x-discovery-server/distribution-management.html ------------------------------------------------------------------------------ svn:keywords = Date Revision Author HeadURL Id Propchange: incubator/curator/site/trunk/curator-x-discovery-server/distribution-management.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: incubator/curator/site/trunk/curator-x-discovery-server/images/accessories-text-editor.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/accessories-text-editor.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/accessories-text-editor.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/add.gif URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/add.gif?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/add.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: incubator/curator/site/trunk/curator-x-discovery-server/images/apache-maven-project-2.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/apache-maven-project-2.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/apache-maven-project-2.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/application-certificate.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/application-certificate.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/application-certificate.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/close.gif URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/close.gif?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/close.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: incubator/curator/site/trunk/curator-x-discovery-server/images/contact-new.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/contact-new.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/contact-new.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/document-properties.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/document-properties.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/document-properties.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/drive-harddisk.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/drive-harddisk.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/drive-harddisk.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/fix.gif URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/fix.gif?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/fix.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: incubator/curator/site/trunk/curator-x-discovery-server/images/icon_error_sml.gif URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/icon_error_sml.gif?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/icon_error_sml.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: incubator/curator/site/trunk/curator-x-discovery-server/images/icon_help_sml.gif URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/icon_help_sml.gif?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/icon_help_sml.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: incubator/curator/site/trunk/curator-x-discovery-server/images/icon_info_sml.gif URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/icon_info_sml.gif?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/icon_info_sml.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: incubator/curator/site/trunk/curator-x-discovery-server/images/icon_success_sml.gif URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/icon_success_sml.gif?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/icon_success_sml.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: incubator/curator/site/trunk/curator-x-discovery-server/images/icon_warning_sml.gif URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/icon_warning_sml.gif?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/icon_warning_sml.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: incubator/curator/site/trunk/curator-x-discovery-server/images/image-x-generic.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/image-x-generic.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/image-x-generic.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/internet-web-browser.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/internet-web-browser.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/internet-web-browser.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/logos/build-by-maven-black.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/logos/build-by-maven-black.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/logos/build-by-maven-black.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/logos/build-by-maven-white.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/logos/build-by-maven-white.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/logos/build-by-maven-white.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/logos/maven-feather.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/logos/maven-feather.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/logos/maven-feather.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/network-server.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/network-server.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/network-server.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/package-x-generic.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/package-x-generic.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/package-x-generic.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/profiles/pre-release.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/profiles/pre-release.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/profiles/pre-release.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/profiles/retired.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/profiles/retired.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/profiles/retired.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/profiles/sandbox.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/profiles/sandbox.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/profiles/sandbox.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/remove.gif URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/remove.gif?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/remove.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: incubator/curator/site/trunk/curator-x-discovery-server/images/rss.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/rss.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/rss.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/images/update.gif URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/update.gif?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/update.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: incubator/curator/site/trunk/curator-x-discovery-server/images/window-new.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/images/window-new.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/images/window-new.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/img/glyphicons-halflings-white.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/img/glyphicons-halflings-white.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/img/glyphicons-halflings-white.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/img/glyphicons-halflings.png URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/img/glyphicons-halflings.png?rev=1459958&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/curator/site/trunk/curator-x-discovery-server/img/glyphicons-halflings.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: incubator/curator/site/trunk/curator-x-discovery-server/index.html URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/index.html?rev=1459958&view=auto ============================================================================== --- incubator/curator/site/trunk/curator-x-discovery-server/index.html (added) +++ incubator/curator/site/trunk/curator-x-discovery-server/index.html Fri Mar 22 19:57:43 2013 @@ -0,0 +1,297 @@ + + + + + + + + + Discovery Service Server - + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ +
+ + +
+ +

Service Discovery Server

Packaging

Curator Service Discovery is in its own package in Maven Central: curator-x-discovery-server

Description

The Service Discovery Server bridges non-Java or legacy applications with the Curator Service Discovery. It exposes RESTful web services to register, remove, query, etc. services.

The Service Discovery Server provides JAX-RS components that can be incorporated into a container of your choice (Tomcat, Jetty, etc.). You can also choose any JAX-RS provider (Jersey, RESTEasy, etc.).

Deploying the Server

The server must be combined with a JAX-RS implementation (Jersey, etc.) and a container (Tom cat, Jetty, etc.).

Several singletons need to be injected:

  • ServiceDiscovery
  • DiscoveryContext
  • JsonServiceInstanceMarshaller
  • JsonServiceInstancesMarshaller
  • JsonServiceNamesMarshaller

Additionally the JAX-RS Resource class must be injected. Due to how most JAX-RS implementations are written, you must create a concrete class that extends this using your payload type. The concrete class should have the base path that you'd like to use. Because the JAX-RS implementation can create a new instance of the resource for every request, your concrete class must use a context resolver to access the DiscoveryContext. Or, if you are using an IoC framework, you can access it that way.

Here's a version that has no payload (i.e. a Void payload):

   @Path("/")
+   public class MyResource extends DiscoveryResource&lt;Void> {
+       public MyResource(@Context ContextResolver&lt;DiscoveryContext&lt;Void>> resolver) {
+           // note: this may not work with all JAX-RS implementations
+           super(resolver.getContext(DiscoveryContext.class));
+       }
+   }
+

REST

Clients must make appropriate REST calls to register themselves and send periodic heartbeats. They can also find services via REST calls:

putService

Method: PUT Path: v1/service/{name}/{id} Request Entity: ServiceInstance Response Entity: n/a Description: {name} is the service name, {id} is the instance id. The request entity is a ServiceInstance. This method registers a service instance. If the ServiceType is STATIC, the instance is registered only for the pre-defined period (defined in the DiscoveryContext). STATIC services must call putService at least once per period. PERMANENT services are registered until they are manually deleted.

removeService

Method: DELETE
Path: v1/service/{name}/{id}
Req uest Entity: n/a
Response Entity: n/a
Description: {name} is the service name, {id} is the instance id. The specified service is deleted/unregistered.

get

Method: GET
Path: v1/service/{name}/{id}
Request Entity: n/a
Response Entity: ServiceInstance
Description: {name} is the service name, {id} is the instance id. Returns the complete ServiceInstance for the specified service. 404 is returned if not found.

getAllNames

Method: GET
Path: v1/service
Request Entity: n/a
Response Entity: ServiceNames
Description: Returns all currently registered service names.

getAll

Method: GET
Path: v1/service/{name}
R equest Entity: n/a
Response Entity: ServiceInstances
Description: {name} is the service name. Returns all service instances for the named service.

getAny

Method: GET
Path: v1/anyservice/{name}
Request Entity: n/a
Response Entity: ServiceInstance
Description: {name} is the service name. Return a random instance from the given service or 404.

JSON specs

The JSON specifications for the REST entities are documented here: https://github.com/Netflix/curator/tree/master/curator-x-discovery-server

+
+
+
+ +
+ +
+
+
Copyright © 2011-2013 + The Apache Software Foundation. + All Rights Reserved. + +
+ + +
Apache Curator, the Apache feather logo, and the Apache Curator project logos are + trademarks of The Apache Software Foundation. All other marks mentioned may be + trademarks or registered trademarks of their respective owners.
+ + +
+
+ + Propchange: incubator/curator/site/trunk/curator-x-discovery-server/index.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/curator/site/trunk/curator-x-discovery-server/index.html ------------------------------------------------------------------------------ svn:keywords = Date Revision Author HeadURL Id Propchange: incubator/curator/site/trunk/curator-x-discovery-server/index.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: incubator/curator/site/trunk/curator-x-discovery-server/integration.html URL: http://svn.apache.org/viewvc/incubator/curator/site/trunk/curator-x-discovery-server/integration.html?rev=1459958&view=auto ============================================================================== --- incubator/curator/site/trunk/curator-x-discovery-server/integration.html (added) +++ incubator/curator/site/trunk/curator-x-discovery-server/integration.html Fri Mar 22 19:57:43 2013 @@ -0,0 +1,290 @@ + + + + + + + + + Discovery Service Server - Continuous Integration + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ +
+ + +
+ +

Overview

This project uses Jenkins.

Access

The following is a link to the continuous integration system used by the project.

Notifiers

Configuration for notifying developers/users when a build is unsuccessful, including user information and notification mode.

TypeAddressConfiguration
mail-address=dev@curator.incubator.apache.org
+
+
+
+ +
+ + + + Propchange: incubator/curator/site/trunk/curator-x-discovery-server/integration.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/curator/site/trunk/curator-x-discovery-server/integration.html ------------------------------------------------------------------------------ svn:keywords = Date Revision Author HeadURL Id Propchange: incubator/curator/site/trunk/curator-x-discovery-server/integration.html ------------------------------------------------------------------------------ svn:mime-type = text/html