Call this method to disconnect yhe client from DDSL.
Call this method to disconnect yhe client from DDSL. When you do this All services added by serviceUp() will be removed from DDSL. This also happens if your program quits.
If you undeploy your app or quit gracefully, it is best practice to call disconnect
Returns list of all services pressent in the ddsl-network
Clients would probably use the method getBestServiceLocation() instead of this one.
Clients would probably use the method getBestServiceLocation() instead of this one.
Returns the list of all available locations where the service being asked for can be found just now. The returned list is sorted, with the best location for your client first.. The list is sorted by quality. Locations with equal quality is randomized - so you would automatically get distributed load if you have several instances of your service running at the same time. Services running on the same host as the asking client will be preferred.
If available locations is found, an NoDDSLServiceLocationFoundException is thrown
You can use this method to remove your service from DDSL.
You can use this method to remove your service from DDSL. This will automatically happen if you use disconnect ot just quit your app.
Tells DDSL that your service is up.
Tells DDSL that your service is up.. If persistent == false, it will stay as UP forever or until you call serviceDown, disconnect, or until your app quit. If persistent == true, it will stay up even after your app quits.
Returns true if success
This method return just one locatiion for the service beeing asked for.
This method return just one locatiion for the service beeing asked for. It return the one best locations. The best location is the first element in the list returned from the method getServiceLocations.
Have a look at the documentation for getServiceLocations() to get more info.
If available locations is found, an NoDDSLServiceLocationFoundException is thrown
Tells DDSL that your service is up.
Tells DDSL that your service is up.. It will stay as UP forever or until you call serviceDown, disconnect, or until your app quit
Returns true if success
Trait describing the interface to the DdslClient. This client is used by both servers broadcasting that they are available and by clients asking for particular services.
It is best practice to call disconnect() when shuting down, undeployting or in som way "removing" the client..