package helloWorld;

/**
 * <ul>
 * <li> <b>IDL Source</b>    "HelloWorld.idl"
 * <li> <b>IDL Name</b>      ::helloWorld::GoodDay
 * <li> <b>Repository Id</b> IDL:helloWorld/GoodDay:1.0
 * </ul>
 * <b>IDL definition:</b>
 * <pre>
 * interface GoodDay {
  ...
};
 * </pre>
 */
public abstract class GoodDayPOA extends org.omg.PortableServer.Servant implements 
  org.omg.CORBA.portable.InvokeHandler, helloWorld.GoodDayOperations {

  public helloWorld.GoodDay _this () {
   return helloWorld.GoodDayHelper.narrow(super._this_object());
  }

  public helloWorld.GoodDay _this (org.omg.CORBA.ORB orb) {
    return helloWorld.GoodDayHelper.narrow(super._this_object(orb));
  }

  public java.lang.String[] _all_interfaces (final org.omg.PortableServer.POA poa, final byte[] objectId) {
    return __ids;
  }

  private static java.lang.String[] __ids = {
    "IDL:helloWorld/GoodDay:1.0"
  };

  private static java.util.Dictionary _methods = new java.util.Hashtable();

  static {
    _methods.put("hello", new int[] { 0, 0 });
  }

  public org.omg.CORBA.portable.OutputStream _invoke (java.lang.String opName,
                                                      org.omg.CORBA.portable.InputStream _input,
                                                      org.omg.CORBA.portable.ResponseHandler handler) {
    int[] method = (int[]) _methods.get(opName);
    if (method == null) {
      throw new org.omg.CORBA.BAD_OPERATION();
    }
    switch (method[0]) {
      case 0: {
        return helloWorld.GoodDayPOA._invoke(this, method[1], _input, handler);
      }
    }
    throw new org.omg.CORBA.BAD_OPERATION();
  }

  public static org.omg.CORBA.portable.OutputStream _invoke (helloWorld.GoodDayOperations _self,
                                                             int _method_id,
                                                             org.omg.CORBA.portable.InputStream _input,
                                                             org.omg.CORBA.portable.ResponseHandler _handler) {
    org.omg.CORBA.portable.OutputStream _output = null;
    {
      switch (_method_id) {
      case 0: {
        java.lang.String _result = _self.hello();
        _output = _handler.createReply();
        _output.write_string((java.lang.String)_result);
        return _output;
      }
      }
      throw new org.omg.CORBA.BAD_OPERATION();
    }
  }
}
