1 23 24 28 29 package com.sun.jts.pi; 30 31 import org.omg.CORBA.Policy ; 32 import org.omg.CORBA.LocalObject ; 33 34 import org.omg.CosTransactions.EITHER; 35 import org.omg.CosTransactions.InvocationPolicy; 36 import org.omg.CosTransactions.INVOCATION_POLICY_TYPE; 37 38 44 public class InvocationPolicyImpl 45 extends LocalObject implements InvocationPolicy { 46 47 private short value = EITHER.value; 48 49 public InvocationPolicyImpl() { 50 this.value = EITHER.value; 51 } 52 53 public InvocationPolicyImpl(short value) { 54 this.value = value; 55 } 56 57 59 public short value() { 60 return this.value; 61 } 62 63 65 public int policy_type() { 66 return INVOCATION_POLICY_TYPE.value; 67 } 68 69 public Policy copy() { 70 return new InvocationPolicyImpl(this.value); 71 } 72 73 public void destroy() { 74 value = EITHER.value; 75 } 76 77 public String toString() { 78 return "InvocationPolicy[" + this.value + "]"; 79 } 80 } 81 | Popular Tags |