⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _clientstub.java

📁 直接放在eclipse环境下
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
package org.objectweb.ccm.demo3;

/**
 *	Generated from IDL definition of interface "Client"
 *	@author JacORB IDL compiler 
 */
public class _ClientStub
	extends org.omg.CORBA.portable.ObjectImpl
	implements org.objectweb.ccm.demo3.Client
{
	private String[] ids = {"IDL:ccm.objectweb.org/demo3/Client:1.0","IDL:omg.org/Components/Events:1.0","IDL:omg.org/Components/Receptacles:1.0","IDL:ccm.objectweb.org/demo3/NamedComponent:1.0","IDL:omg.org/Components/CCMObject:1.0","IDL:omg.org/Components/Navigation:1.0"};
	public String[] _ids()
	{
		return ids;
	}
	public final static java.lang.Class _opsClass = org.objectweb.ccm.demo3.ClientOperations.class;
	public org.omg.CORBA.Object provide_facet(java.lang.String name) throws org.omg.Components.InvalidName	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "provide_facet", true);
				_os.write_string(name);
				_is = _invoke(_os);
				org.omg.CORBA.Object _result = _is.read_Object();
				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/InvalidName:1.0"))
				{
					throw org.omg.Components.InvalidNameHelper.read(_ax.getInputStream());
				}
				else 					throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "provide_facet", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ClientOperations _localServant = (ClientOperations)_so.servant;
			org.omg.CORBA.Object _result;			try
			{
			_result = _localServant.provide_facet(name);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public org.omg.Components.Cookie subscribe(java.lang.String publisher_name, org.omg.Components.EventConsumerBase subscriber) throws org.omg.Components.InvalidConnection,org.omg.Components.ExceededConnectionLimit,org.omg.Components.InvalidName	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "subscribe", true);
				_os.write_string(publisher_name);
				org.omg.Components.EventConsumerBaseHelper.write(_os,subscriber);
				_is = _invoke(_os);
				org.omg.Components.Cookie _result = (org.omg.Components.Cookie)((org.omg.CORBA_2_3.portable.InputStream)_is).read_value ("IDL:omg.org/Components/Cookie:1.0");
				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/InvalidConnection:1.0"))
				{
					throw org.omg.Components.InvalidConnectionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:omg.org/Components/ExceededConnectionLimit:1.0"))
				{
					throw org.omg.Components.ExceededConnectionLimitHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:omg.org/Components/InvalidName:1.0"))
				{
					throw org.omg.Components.InvalidNameHelper.read(_ax.getInputStream());
				}
				else 					throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "subscribe", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ClientOperations _localServant = (ClientOperations)_so.servant;
			org.omg.Components.Cookie _result;			try
			{
			_result = _localServant.subscribe(publisher_name,subscriber);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public org.omg.Components.PublisherDescription[] get_named_publishers(java.lang.String[] names) throws org.omg.Components.InvalidName	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_named_publishers", true);
				org.omg.Components.NameListHelper.write(_os,names);
				_is = _invoke(_os);
				org.omg.Components.PublisherDescription[] _result = org.omg.Components.PublisherDescriptionsHelper.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/InvalidName:1.0"))
				{
					throw org.omg.Components.InvalidNameHelper.read(_ax.getInputStream());
				}
				else 					throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_named_publishers", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ClientOperations _localServant = (ClientOperations)_so.servant;
			org.omg.Components.PublisherDescription[] _result;			try
			{
			_result = _localServant.get_named_publishers(names);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public org.omg.Components.EventConsumerBase disconnect_consumer(java.lang.String source_name) throws org.omg.Components.NoConnection,org.omg.Components.InvalidName	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "disconnect_consumer", true);
				_os.write_string(source_name);
				_is = _invoke(_os);
				org.omg.Components.EventConsumerBase _result = org.omg.Components.EventConsumerBaseHelper.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/NoConnection:1.0"))
				{
					throw org.omg.Components.NoConnectionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:omg.org/Components/InvalidName:1.0"))
				{
					throw org.omg.Components.InvalidNameHelper.read(_ax.getInputStream());
				}
				else 					throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "disconnect_consumer", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ClientOperations _localServant = (ClientOperations)_so.servant;
			org.omg.Components.EventConsumerBase _result;			try
			{
			_result = _localServant.disconnect_consumer(source_name);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public org.omg.Components.ConsumerDescription[] get_named_consumers(java.lang.String[] names) throws org.omg.Components.InvalidName	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_named_consumers", true);
				org.omg.Components.NameListHelper.write(_os,names);
				_is = _invoke(_os);
				org.omg.Components.ConsumerDescription[] _result = org.omg.Components.ConsumerDescriptionsHelper.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/InvalidName:1.0"))
				{
					throw org.omg.Components.InvalidNameHelper.read(_ax.getInputStream());
				}
				else 					throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_named_consumers", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ClientOperations _localServant = (ClientOperations)_so.servant;
			org.omg.Components.ConsumerDescription[] _result;			try
			{
			_result = _localServant.get_named_consumers(names);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public org.omg.Components.ReceptacleDescription[] get_all_receptacles()	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_all_receptacles", true);
				_is = _invoke(_os);
				org.omg.Components.ReceptacleDescription[] _result = org.omg.Components.ReceptacleDescriptionsHelper.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_all_receptacles", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ClientOperations _localServant = (ClientOperations)_so.servant;
			org.omg.Components.ReceptacleDescription[] _result;			try
			{
			_result = _localServant.get_all_receptacles();
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public org.omg.Components.EmitterDescription[] get_all_emitters()	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_all_emitters", true);
				_is = _invoke(_os);
				org.omg.Components.EmitterDescription[] _result = org.omg.Components.EmitterDescriptionsHelper.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_all_emitters", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ClientOperations _localServant = (ClientOperations)_so.servant;
			org.omg.Components.EmitterDescription[] _result;			try
			{
			_result = _localServant.get_all_emitters();
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public org.omg.Components.EmitterDescription[] get_named_emitters(java.lang.String[] names) throws org.omg.Components.InvalidName	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_named_emitters", true);
				org.omg.Components.NameListHelper.write(_os,names);
				_is = _invoke(_os);
				org.omg.Components.EmitterDescription[] _result = org.omg.Components.EmitterDescriptionsHelper.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/InvalidName:1.0"))
				{
					throw org.omg.Components.InvalidNameHelper.read(_ax.getInputStream());
				}
				else 					throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_named_emitters", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ClientOperations _localServant = (ClientOperations)_so.servant;
			org.omg.Components.EmitterDescription[] _result;			try
			{
			_result = _localServant.get_named_emitters(names);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public org.omg.Components.PrimaryKeyBase get_primary_key() throws org.omg.Components.NoKeyAvailable	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_primary_key", true);
				_is = _invoke(_os);
				org.omg.Components.PrimaryKeyBase _result = (org.omg.Components.PrimaryKeyBase)((org.omg.CORBA_2_3.portable.InputStream)_is).read_value ("IDL:omg.org/Components/PrimaryKeyBase:1.0");
				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/NoKeyAvailable:1.0"))
				{
					throw org.omg.Components.NoKeyAvailableHelper.read(_ax.getInputStream());
				}
				else 					throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_primary_key", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ClientOperations _localServant = (ClientOperations)_so.servant;
			org.omg.Components.PrimaryKeyBase _result;			try
			{
			_result = _localServant.get_primary_key();
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public org.omg.Components.ReceptacleDescription[] get_named_receptacles(java.lang.String[] names) throws org.omg.Components.InvalidName	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_named_receptacles", true);
				org.omg.Components.NameListHelper.write(_os,names);
				_is = _invoke(_os);
				org.omg.Components.ReceptacleDescription[] _result = org.omg.Components.ReceptacleDescriptionsHelper.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/InvalidName:1.0"))
				{
					throw org.omg.Components.InvalidNameHelper.read(_ax.getInputStream());
				}
				else 					throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_named_receptacles", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ClientOperations _localServant = (ClientOperations)_so.servant;
			org.omg.Components.ReceptacleDescription[] _result;			try
			{
			_result = _localServant.get_named_receptacles(names);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}

⌨️ 快捷键说明

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