Ejemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void destroy() throws Exception
		public virtual void destroy()
		{
			reloadableProperties = null;
		}
Ejemplo n.º 2
0
		/// <summary>
		/// createInstance 废弃了
		/// </summary>
		/// <exception cref="IOException"> </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: protected Object createMyInstance() throws java.io.IOException
		protected internal virtual object createMyInstance()
		{
			// would like to uninherit from AbstractFactoryBean (but it's final!)
			if (!Singleton)
			{
				throw new Exception("ReloadablePropertiesFactoryBean only works as singleton");
			}

			// set listener
			reloadableProperties = new ReloadablePropertiesImpl(this);
			if (preListeners != null)
			{
				reloadableProperties.Listeners = preListeners;
			}

			// reload
			reload(true);

			// add for monitor
			ReloadConfigurationMonitor.addReconfigurableBean((ReconfigurableBean) reloadableProperties);

			return reloadableProperties;
		}