_consumermanagerstub.java

来自「直接放在eclipse环境下」· Java 代码 · 共 636 行 · 第 1/2 页

JAVA
636
字号
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public org.omg.Components.Deployment.Container get_container()	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_container", true);
				_is = _invoke(_os);
				org.omg.Components.Deployment.Container _result = org.omg.Components.Deployment.ContainerHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_container", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ConsumerManagerOperations _localServant = (ConsumerManagerOperations)_so.servant;
			org.omg.Components.Deployment.Container _result;			try
			{
			_result = _localServant.get_container();
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public void remove_component(org.omg.Components.CCMObject comp) throws org.omg.Components.RemoveFailure	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "remove_component", true);
				org.omg.Components.CCMObjectHelper.write(_os,comp);
				_is = _invoke(_os);
				return;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:omg.org/Components/RemoveFailure:1.0"))
				{
					throw org.omg.Components.RemoveFailureHelper.read(_ax.getInputStream());
				}
				else 					throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "remove_component", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ConsumerManagerOperations _localServant = (ConsumerManagerOperations)_so.servant;
			try
			{
			_localServant.remove_component(comp);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return;
		}
		}
	}
	public org.objectweb.ccm.demo3.Consumer create_consumer(java.lang.String name) throws org.omg.Components.CreateFailure	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "create_consumer", true);
				_os.write_string(name);
				_is = _invoke(_os);
				org.objectweb.ccm.demo3.Consumer _result = org.objectweb.ccm.demo3.ConsumerHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:omg.org/Components/CreateFailure:1.0"))
				{
					throw org.omg.Components.CreateFailureHelper.read(_ax.getInputStream());
				}
				else 					throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "create_consumer", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ConsumerManagerOperations _localServant = (ConsumerManagerOperations)_so.servant;
			org.objectweb.ccm.demo3.Consumer _result;			try
			{
			_result = _localServant.create_consumer(name);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public org.omg.Components.CCMObject[] get_components()	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_components", true);
				_is = _invoke(_os);
				org.omg.Components.CCMObject[] _result = org.omg.Components.CCMObjectsHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_components", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ConsumerManagerOperations _localServant = (ConsumerManagerOperations)_so.servant;
			org.omg.Components.CCMObject[] _result;			try
			{
			_result = _localServant.get_components();
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public org.objectweb.ccm.demo3.Consumer find_consumer(java.lang.String name) throws org.omg.Components.FinderFailure	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "find_consumer", true);
				_os.write_string(name);
				_is = _invoke(_os);
				org.objectweb.ccm.demo3.Consumer _result = org.objectweb.ccm.demo3.ConsumerHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:omg.org/Components/FinderFailure:1.0"))
				{
					throw org.omg.Components.FinderFailureHelper.read(_ax.getInputStream());
				}
				else 					throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "find_consumer", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ConsumerManagerOperations _localServant = (ConsumerManagerOperations)_so.servant;
			org.objectweb.ccm.demo3.Consumer _result;			try
			{
			_result = _localServant.find_consumer(name);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public org.objectweb.ccm.demo3.Consumer find_by_primary_key(org.objectweb.ccm.demo3.NamePrimaryKey key) throws org.omg.Components.UnknownKeyValue,org.omg.Components.FinderFailure,org.omg.Components.InvalidKey	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "find_by_primary_key", true);
				((org.omg.CORBA_2_3.portable.OutputStream)_os).write_value (key );
				_is = _invoke(_os);
				org.objectweb.ccm.demo3.Consumer _result = org.objectweb.ccm.demo3.ConsumerHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:omg.org/Components/UnknownKeyValue:1.0"))
				{
					throw org.omg.Components.UnknownKeyValueHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:omg.org/Components/FinderFailure:1.0"))
				{
					throw org.omg.Components.FinderFailureHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:omg.org/Components/InvalidKey:1.0"))
				{
					throw org.omg.Components.InvalidKeyHelper.read(_ax.getInputStream());
				}
				else 					throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "find_by_primary_key", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ConsumerManagerOperations _localServant = (ConsumerManagerOperations)_so.servant;
			org.objectweb.ccm.demo3.Consumer _result;			try
			{
			_result = _localServant.find_by_primary_key(key);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?