package org.dbxml.core.corba.db;

/**
 *	Generated from IDL definition of interface "ServantManagement"
 *	@author JacORB IDL compiler 
 */

public abstract class ServantManagementPOA
	extends org.omg.PortableServer.Servant
	implements org.omg.CORBA.portable.InvokeHandler, org.dbxml.core.corba.db.ServantManagementOperations
{
	static private final java.util.Hashtable m_opsHash = new java.util.Hashtable();
	static
	{
		m_opsHash.put ( "remove", new java.lang.Integer(0));
	}
	private String[] ids = {"IDL:org/dbxml/core/corba/db/ServantManagement:1.0","IDL:omg.org/CORBA/Object:1.0"};
	public org.dbxml.core.corba.db.ServantManagement _this()
	{
		return org.dbxml.core.corba.db.ServantManagementHelper.narrow(_this_object());
	}
	public org.dbxml.core.corba.db.ServantManagement _this(org.omg.CORBA.ORB orb)
	{
		return org.dbxml.core.corba.db.ServantManagementHelper.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: // remove
			{
				_out = handler.createReply();
				remove();
				break;
			}
		}
		return _out;
	}

	public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] obj_id)
	{
		return ids;
	}
}
