package cc.idl;


/**
* cc/idl/UDPSvrPOA.java .
* Generated by the IDL-to-Java compiler (portable), version "3.1"
* from UDPSvr.idl
* Friday, July 25, 2003 1:35:12 PM EDT
*/

public abstract class UDPSvrPOA extends org.omg.PortableServer.Servant
 implements cc.idl.UDPSvrOperations, org.omg.CORBA.portable.InvokeHandler
{

  // Constructors

  private static java.util.Hashtable _methods = new java.util.Hashtable ();
  static
  {
    _methods.put ("request", new java.lang.Integer (0));
    _methods.put ("requestPackets", new java.lang.Integer (1));
    _methods.put ("setSize", new java.lang.Integer (2));
    _methods.put ("setDelay", new java.lang.Integer (3));
    _methods.put ("getDelay", new java.lang.Integer (4));
    _methods.put ("getSize", new java.lang.Integer (5));
    _methods.put ("stop", new java.lang.Integer (6));
    _methods.put ("alive", new java.lang.Integer (7));
  }

  public org.omg.CORBA.portable.OutputStream _invoke (String $method,
                                org.omg.CORBA.portable.InputStream in,
                                org.omg.CORBA.portable.ResponseHandler $rh)
  {
    org.omg.CORBA.portable.OutputStream out = null;
    java.lang.Integer __method = (java.lang.Integer)_methods.get ($method);
    if (__method == null)
      throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);

    switch (__method.intValue ())
    {
       case 0:  // cc/idl/UDPSvr/request
       {
         String host = in.read_string ();
         int port = in.read_long ();
         int size = in.read_long ();
         int delay = in.read_long ();
         int $result = (int)0;
         $result = this.request (host, port, size, delay);
         out = $rh.createReply();
         out.write_long ($result);
         break;
       }

       case 1:  // cc/idl/UDPSvr/requestPackets
       {
         int id = in.read_long ();
         String listOfPackets = in.read_string ();
         this.requestPackets (id, listOfPackets);
         out = $rh.createReply();
         break;
       }

       case 2:  // cc/idl/UDPSvr/setSize
       {
         int id = in.read_long ();
         int Size = in.read_long ();
         this.setSize (id, Size);
         out = $rh.createReply();
         break;
       }

       case 3:  // cc/idl/UDPSvr/setDelay
       {
         int id = in.read_long ();
         int Delay = in.read_long ();
         this.setDelay (id, Delay);
         out = $rh.createReply();
         break;
       }

       case 4:  // cc/idl/UDPSvr/getDelay
       {
         int id = in.read_long ();
         int $result = (int)0;
         $result = this.getDelay (id);
         out = $rh.createReply();
         out.write_long ($result);
         break;
       }

       case 5:  // cc/idl/UDPSvr/getSize
       {
         int id = in.read_long ();
         int $result = (int)0;
         $result = this.getSize (id);
         out = $rh.createReply();
         out.write_long ($result);
         break;
       }

       case 6:  // cc/idl/UDPSvr/stop
       {
         int id = in.read_long ();
         this.stop (id);
         out = $rh.createReply();
         break;
       }

       case 7:  // cc/idl/UDPSvr/alive
       {
         int id = in.read_long ();
         this.alive (id);
         out = $rh.createReply();
         break;
       }

       default:
         throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
    }

    return out;
  } // _invoke

  // Type-specific CORBA::Object operations
  private static String[] __ids = {
    "IDL:cc/idl/UDPSvr:1.0"};

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

  public UDPSvr _this() 
  {
    return UDPSvrHelper.narrow(
    super._this_object());
  }

  public UDPSvr _this(org.omg.CORBA.ORB orb) 
  {
    return UDPSvrHelper.narrow(
    super._this_object(orb));
  }


} // class UDPSvrPOA
