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

📄 _servermanagerimplicitstub.java

📁 直接放在eclipse环境下
💻 JAVA
字号:
package org.objectweb.ccm.demo3;

/**
 *	Generated from IDL definition of interface "ServerManagerImplicit"
 *	@author JacORB IDL compiler 
 */
public class _ServerManagerImplicitStub
	extends org.omg.CORBA.portable.ObjectImpl
	implements org.objectweb.ccm.demo3.ServerManagerImplicit
{
	private String[] ids = {"IDL:ccm.objectweb.org/demo3/ServerManagerImplicit:1.0"};
	public String[] _ids()
	{
		return ids;
	}
	public final static java.lang.Class _opsClass = org.objectweb.ccm.demo3.ServerManagerImplicitOperations.class;
	public org.objectweb.ccm.demo3.Server create(org.objectweb.ccm.demo3.NamePrimaryKey key) throws org.omg.Components.DuplicateKeyValue,org.omg.Components.CreateFailure,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( "create", true);
				((org.omg.CORBA_2_3.portable.OutputStream)_os).write_value (key );
				_is = _invoke(_os);
				org.objectweb.ccm.demo3.Server _result = org.objectweb.ccm.demo3.ServerHelper.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/DuplicateKeyValue:1.0"))
				{
					throw org.omg.Components.DuplicateKeyValueHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:omg.org/Components/CreateFailure:1.0"))
				{
					throw org.omg.Components.CreateFailureHelper.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( "create", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ServerManagerImplicitOperations _localServant = (ServerManagerImplicitOperations)_so.servant;
			org.objectweb.ccm.demo3.Server _result;			try
			{
			_result = _localServant.create(key);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public org.objectweb.ccm.demo3.NamePrimaryKey get_primary_key(org.objectweb.ccm.demo3.Server comp)	{
		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);
				org.objectweb.ccm.demo3.ServerHelper.write(_os,comp);
				_is = _invoke(_os);
				org.objectweb.ccm.demo3.NamePrimaryKey _result = (org.objectweb.ccm.demo3.NamePrimaryKey)((org.omg.CORBA_2_3.portable.InputStream)_is).read_value ("IDL:ccm.objectweb.org/demo3/NamePrimaryKey:1.0");
				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_primary_key", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ServerManagerImplicitOperations _localServant = (ServerManagerImplicitOperations)_so.servant;
			org.objectweb.ccm.demo3.NamePrimaryKey _result;			try
			{
			_result = _localServant.get_primary_key(comp);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
	public void remove(org.objectweb.ccm.demo3.NamePrimaryKey key) throws org.omg.Components.UnknownKeyValue,org.omg.Components.RemoveFailure,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( "remove", true);
				((org.omg.CORBA_2_3.portable.OutputStream)_os).write_value (key );
				_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/UnknownKeyValue:1.0"))
				{
					throw org.omg.Components.UnknownKeyValueHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:omg.org/Components/RemoveFailure:1.0"))
				{
					throw org.omg.Components.RemoveFailureHelper.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( "remove", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			ServerManagerImplicitOperations _localServant = (ServerManagerImplicitOperations)_so.servant;
			try
			{
			_localServant.remove(key);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return;
		}
		}
	}
	public org.objectweb.ccm.demo3.Server 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.Server _result = org.objectweb.ccm.demo3.ServerHelper.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!");
			ServerManagerImplicitOperations _localServant = (ServerManagerImplicitOperations)_so.servant;
			org.objectweb.ccm.demo3.Server _result;			try
			{
			_result = _localServant.find_by_primary_key(key);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}
		}
	}
}

⌨️ 快捷键说明

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