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

📄 clientmanagerimplicitpoa.java

📁 直接放在eclipse环境下
💻 JAVA
字号:
package org.objectweb.ccm.demo3;
/**
 *	Generated from IDL definition of interface "ClientManagerImplicit"
 *	@author JacORB IDL compiler 
 */

public abstract class ClientManagerImplicitPOA	extends org.omg.PortableServer.Servant
	implements org.omg.CORBA.portable.InvokeHandler, org.objectweb.ccm.demo3.ClientManagerImplicitOperations
{
	static private final java.util.Hashtable m_opsHash = new java.util.Hashtable();
	static
	{
		m_opsHash.put ( "create", new java.lang.Integer(0));
		m_opsHash.put ( "get_primary_key", new java.lang.Integer(1));
		m_opsHash.put ( "remove", new java.lang.Integer(2));
		m_opsHash.put ( "find_by_primary_key", new java.lang.Integer(3));
	}
	private String[] ids = {"IDL:ccm.objectweb.org/demo3/ClientManagerImplicit:1.0"};
	public org.objectweb.ccm.demo3.ClientManagerImplicit _this()
	{
		return org.objectweb.ccm.demo3.ClientManagerImplicitHelper.narrow(_this_object());
	}
	public org.objectweb.ccm.demo3.ClientManagerImplicit _this(org.omg.CORBA.ORB orb)
	{
		return org.objectweb.ccm.demo3.ClientManagerImplicitHelper.narrow(_this_object(orb));
	}
	public org.omg.CORBA.portable.OutputStream _invoke(String method, org.omg.CORBA.portable.InputStream _input, org.omg.CORBA.portable.ResponseHandler handler)
		throws org.omg.CORBA.SystemException
	{
		org.omg.CORBA.portable.OutputStream _out = null;
		// do something
		// quick lookup of operation
		java.lang.Integer opsIndex = (java.lang.Integer)m_opsHash.get ( method );
		if ( null == opsIndex )
			throw new org.omg.CORBA.BAD_OPERATION(method + " not found");
		switch ( opsIndex.intValue() )
		{
			case 0: // create
			{
			try
			{
				org.objectweb.ccm.demo3.NamePrimaryKey _arg0=(org.objectweb.ccm.demo3.NamePrimaryKey)((org.omg.CORBA_2_3.portable.InputStream)_input).read_value ("IDL:ccm.objectweb.org/demo3/NamePrimaryKey:1.0");
				_out = handler.createReply();
				org.objectweb.ccm.demo3.ClientHelper.write(_out,create(_arg0));
			}
			catch(org.omg.Components.DuplicateKeyValue _ex0)
			{
				_out = handler.createExceptionReply();
				org.omg.Components.DuplicateKeyValueHelper.write(_out, _ex0);
			}
			catch(org.omg.Components.CreateFailure _ex1)
			{
				_out = handler.createExceptionReply();
				org.omg.Components.CreateFailureHelper.write(_out, _ex1);
			}
			catch(org.omg.Components.InvalidKey _ex2)
			{
				_out = handler.createExceptionReply();
				org.omg.Components.InvalidKeyHelper.write(_out, _ex2);
			}
				break;
			}
			case 1: // get_primary_key
			{
				org.objectweb.ccm.demo3.Client _arg0=org.objectweb.ccm.demo3.ClientHelper.read(_input);
				_out = handler.createReply();
				((org.omg.CORBA_2_3.portable.OutputStream)_out).write_value (get_primary_key(_arg0) );
				break;
			}
			case 2: // remove
			{
			try
			{
				org.objectweb.ccm.demo3.NamePrimaryKey _arg0=(org.objectweb.ccm.demo3.NamePrimaryKey)((org.omg.CORBA_2_3.portable.InputStream)_input).read_value ("IDL:ccm.objectweb.org/demo3/NamePrimaryKey:1.0");
				_out = handler.createReply();
				remove(_arg0);
			}
			catch(org.omg.Components.UnknownKeyValue _ex0)
			{
				_out = handler.createExceptionReply();
				org.omg.Components.UnknownKeyValueHelper.write(_out, _ex0);
			}
			catch(org.omg.Components.RemoveFailure _ex1)
			{
				_out = handler.createExceptionReply();
				org.omg.Components.RemoveFailureHelper.write(_out, _ex1);
			}
			catch(org.omg.Components.InvalidKey _ex2)
			{
				_out = handler.createExceptionReply();
				org.omg.Components.InvalidKeyHelper.write(_out, _ex2);
			}
				break;
			}
			case 3: // find_by_primary_key
			{
			try
			{
				org.objectweb.ccm.demo3.NamePrimaryKey _arg0=(org.objectweb.ccm.demo3.NamePrimaryKey)((org.omg.CORBA_2_3.portable.InputStream)_input).read_value ("IDL:ccm.objectweb.org/demo3/NamePrimaryKey:1.0");
				_out = handler.createReply();
				org.objectweb.ccm.demo3.ClientHelper.write(_out,find_by_primary_key(_arg0));
			}
			catch(org.omg.Components.UnknownKeyValue _ex0)
			{
				_out = handler.createExceptionReply();
				org.omg.Components.UnknownKeyValueHelper.write(_out, _ex0);
			}
			catch(org.omg.Components.FinderFailure _ex1)
			{
				_out = handler.createExceptionReply();
				org.omg.Components.FinderFailureHelper.write(_out, _ex1);
			}
			catch(org.omg.Components.InvalidKey _ex2)
			{
				_out = handler.createExceptionReply();
				org.omg.Components.InvalidKeyHelper.write(_out, _ex2);
			}
				break;
			}
		}
		return _out;
	}
	public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] obj_id)
	{
		return ids;
	}
}

⌨️ 快捷键说明

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