package demo.hello;


/**
 * Generated from IDL interface "GoodDay".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at Mar 4, 2009 1:55:17 PM
 */

public abstract class GoodDayPOA
	extends org.omg.PortableServer.Servant
	implements org.omg.CORBA.portable.InvokeHandler, demo.hello.GoodDayOperations
{
	static private final java.util.Hashtable m_opsHash = new java.util.Hashtable();
	static
	{
		m_opsHash.put ( "hello_simple", new java.lang.Integer(0));
		m_opsHash.put ( "hello_wide", new java.lang.Integer(1));
	}
	private String[] ids = {"IDL:demo/hello/GoodDay:1.0"};
	public demo.hello.GoodDay _this()
	{
		return demo.hello.GoodDayHelper.narrow(_this_object());
	}
	public demo.hello.GoodDay _this(org.omg.CORBA.ORB orb)
	{
		return demo.hello.GoodDayHelper.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: // hello_simple
			{
				_out = handler.createReply();
				_out.write_string(hello_simple());
				break;
			}
			case 1: // hello_wide
			{
				java.lang.String _arg0=_input.read_wstring();
				_out = handler.createReply();
				_out.write_wstring(hello_wide(_arg0));
				break;
			}
		}
		return _out;
	}

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