Package discovery
Class ExampleServer
java.lang.Object
discovery.ExampleServer
- All Implemented Interfaces:
Closeable
,AutoCloseable
This shows a very simplified method of registering an instance with the service discovery. Each individual
instance in your distributed set of applications would create an instance of something similar to ExampleServer,
start it when the application comes up and close it when the application shuts down.
-
Constructor Summary
ConstructorDescriptionExampleServer
(CuratorFramework client, String path, String serviceName, String description) -
Method Summary
-
Constructor Details
-
Method Details
-
getThisInstance
-
start
- Throws:
Exception
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-