All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.omg.CosTransactions.OTSPolicyPOA Maven / Gradle / Ivy

There is a newer version: 4.2.5
Show newest version
package org.omg.CosTransactions;


/**
* org/omg/CosTransactions/OTSPolicyPOA.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /home/jenkins/agent/workspace/orb-release-build/omgapi/src/main/idl/CosTransactions.idl
* Sunday, February 14, 2021 7:42:42 PM GMT
*/

public abstract class OTSPolicyPOA extends org.omg.PortableServer.Servant
 implements org.omg.CosTransactions.OTSPolicyOperations, org.omg.CORBA.portable.InvokeHandler
{

  // Constructors

  private static java.util.Hashtable _methods = new java.util.Hashtable ();
  static
  {
    _methods.put ("_get_value", new java.lang.Integer (0));
    _methods.put ("_get_policy_type", new java.lang.Integer (1));
    _methods.put ("copy", new java.lang.Integer (2));
    _methods.put ("destroy", new java.lang.Integer (3));
  }

  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:  // CosTransactions/OTSPolicy/_get_value
       {
         short $result = (short)0;
         $result = this.value ();
         out = $rh.createReply();
         out.write_ushort ($result);
         break;
       }


  /** Return the constant value that corresponds to the 
                  * type of the policy object.  The values of 
                  * the polivy objectys are allocated by the OMG.
                  * New values for PolicyType should be obtained from the OMG by
                  * sending mail to [email protected].  In general the constant
                  * values that are allocated are defined in conjunction with
                  * the definition of the corresponding policy object.
                  * @return the constant value that corresponds to the type of
                  * the policy object.
                  */
       case 1:  // org/omg/CORBA/Policy/_get_policy_type
       {
         int $result = (int)0;
         $result = this.policy_type ();
         out = $rh.createReply();
         out.write_ulong ($result);
         break;
       }


  /** Copies the policy object. The copy does not retain any
                  * relationships that the policy had with any domain or object.
                  * @return the copy of the policy object.
                  */
       case 2:  // org/omg/CORBA/Policy/copy
       {
         org.omg.CORBA.Policy $result = null;
         $result = this.copy ();
         out = $rh.createReply();
         org.omg.CORBA.PolicyHelper.write (out, $result);
         break;
       }


  /** Destroys the policy object.  It is the responsibility of
                  * the policy object to determine whether it can be destroyed.
                  */
       case 3:  // org/omg/CORBA/Policy/destroy
       {
         this.destroy ();
         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:omg.org/CosTransactions/OTSPolicy:1.0", 
    "IDL:omg.org/CORBA/Policy:1.0"};

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

  public OTSPolicy _this() 
  {
    return OTSPolicyHelper.narrow(
    super._this_object());
  }

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


} // class OTSPolicyPOA




© 2015 - 2024 Weber Informatics LLC | Privacy Policy