public void reinitServiceDirectoryManagerFactory ( ServiceDirectoryManagerFactory factory ) throws ServiceException { if ( factory == null ) { throw new ServiceException ( ErrorCode . SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR , ErrorCode . SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR . getMessageTemplate ( ) , "ServiceDirectoryManagerFactory" ) ; } synchronized ( this ) { if ( isShutdown ) { throw new ServiceException ( ErrorCode . SERVICE_DIRECTORY_IS_SHUTDOWN ) ; } if ( this . directoryManagerFactory != null ) { directoryManagerFactory . stop ( ) ; LOGGER . info ( "Resetting ServiceDirectoryManagerFactory, old={}, new={}." , this . directoryManagerFactory . getClass ( ) . getName ( ) , factory . getClass ( ) . getName ( ) ) ; this . directoryManagerFactory = factory ; } else { this . directoryManagerFactory = factory ; LOGGER . info ( "Setting ServiceDirectoryManagerFactory, factory={}." , factory . getClass ( ) . getName ( ) ) ; } directoryManagerFactory . start ( ) ; } }
Set the ServiceDirectoryManagerFactory .