Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2013-2014 by Cisco Systems, Inc. All rights reserved.
ServiceDirectory client class. Applications obtain the instance of LookupManager/RegistrationManager/ServiceDirectoryConfig from this class.

 public class ServiceDirectory {

The ServiceDirectory enable property name, indicating whether ServiceDirectory enabled for directory service.
 	public static final String SD_API_SERVICE_DIRECTORY_ENABLED_PROPERTY = "";

Default value to enable ServiceDirectory for directory service.
 	public static final boolean SD_API_SERVICE_DIRECTORY_ENABLED_DEFAULT = true;

Singleton, private constructor.
 	private ServiceDirectory(){

Get the LookupManager.

the implementation instance of LookupManager.
 	public static LookupManager getLookupManager() throws ServiceException {
 		return getImpl().getLookupManager();

Get the RegistrationManager.

the implementation instance of RegistrationManager.

Get the ServiceDirectoryConfig.

the ServiceDirectoryConfig of the SD API.

Re-initialize the ServiceDirectoryManagerFactory. It allows applications to change the ServiceDirectoryManagerFactory in the runtime.

factory the ServiceDirectoryManagerFactory which generates LookupManager and RegistrationManager.

Check whether ServiceDirectory is enabled for the directory service. The value comes from the SD API configuration property "". By default the ServiceDirectory is enabled.

true if the ServiceDirectory is enabled.
 	public static boolean isEnabled(){

Shutdown the ServiceDirectory. Be careful to invoke this method, it used to help gc in shutdown the jvm. The whole ServiceDirectory shutdown, it cannot be used unless restart the jvm and reload the ServiceDirectory class. The methods throw SERVICE_DIRECTORY_IS_SHUTDOWN error.
	public static void shutdown(){

Get the ServiceDirectory implementation.

the ServiceDirectoryImpl instance.
	private static ServiceDirectoryImpl getImpl() {
		return ServiceDirectoryImpl.getInstance();
New to GrepCode? Check out our FAQ X