package test.interop.bidir;


/**
 * Generated from IDL interface "CallbackServer".
 *
 * @author JacORB IDL compiler V @project.version@
 * @version generated at 25-Feb-2014 13:44:20
 */

public abstract class CallbackServerPOA
	extends org.omg.PortableServer.Servant
	implements org.omg.CORBA.portable.InvokeHandler, test.interop.bidir.CallbackServerOperations
{
	static private final java.util.HashMap<String,Integer> m_opsHash = new java.util.HashMap<String,Integer>();
	static
	{
		m_opsHash.put ( "callback_hello", Integer.valueOf(0));
	}
	private String[] ids = {"IDL:test/interop/bidir/CallbackServer:1.0"};
	public test.interop.bidir.CallbackServer _this()
	{
		org.omg.CORBA.Object __o = _this_object() ;
		test.interop.bidir.CallbackServer __r = test.interop.bidir.CallbackServerHelper.narrow(__o);
		return __r;
	}
	public test.interop.bidir.CallbackServer _this(org.omg.CORBA.ORB orb)
	{
		org.omg.CORBA.Object __o = _this_object(orb) ;
		test.interop.bidir.CallbackServer __r = test.interop.bidir.CallbackServerHelper.narrow(__o);
		return __r;
	}
	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: // callback_hello
			{
				test.interop.bidir.ClientCallback _arg0=test.interop.bidir.ClientCallbackHelper.read(_input);
				java.lang.String _arg1=_input.read_string();
				_out = handler.createReply();
				callback_hello(_arg0,_arg1);
				break;
			}
		}
		return _out;
	}

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