Services registered with service discovery would get unregistered when close()
is called. This will remove all services including static and permanent. Is
this the designed behavior?
public class ServiceDiscoveryImpl<T> implements ServiceDiscovery<T>
{
@Override
public void close() throws IOException
{
for ( ServiceCache<T> cache : Lists.newArrayList(caches) )
{
Closeables.closeQuietly(cache);
}
for ( ServiceProvider<T> provider : Lists.newArrayList(providers) )
{
Closeables.closeQuietly(provider);
}
for ( ServiceInstance<T> service : services.values() )
{
try
{
unregisterService(service);
}
catch ( Exception e )
{
log.error("Could not unregister instance: " +
service.getName(), e);
}
}
client.getConnectionStateListenable().removeListener(connectionStateListener);
}
}
Thanks,
Ying-Yi
On Feb 7, 2014, at 6:24 PM, Jordan Zimmerman
<[email protected]<mailto:[email protected]>>
wrote:
ServiceType.DYNAMIC is not supported. It makes sense because there is no
session for the REST API.
-JZ
________________________________
From: Huang, Ying-Yi Huang, Ying-Yi<mailto:[email protected]>
Reply: Huang, Ying-Yi [email protected]<mailto:[email protected]>
Date: February 7, 2014 at 1:29:12 PM
To: Jordan Zimmerman
[email protected]<mailto:[email protected]>
Subject: Re: Static/Permanent service type
A general question is that are all three types of services supported in Java
API and RESTFul API?