1 7 8 package com.sun.corba.se.spi.extension ; 9 10 import org.omg.CORBA.Policy ; 11 import org.omg.CORBA.LocalObject ; 12 import com.sun.corba.se.impl.orbutil.ORBConstants ; 13 14 16 public class ZeroPortPolicy extends LocalObject implements Policy 17 { 18 private static ZeroPortPolicy policy = new ZeroPortPolicy( true ) ; 19 20 private boolean flag = true ; 21 22 private ZeroPortPolicy( boolean type ) 23 { 24 this.flag = type ; 25 } 26 27 public String toString() 28 { 29 return "ZeroPortPolicy[" + flag + "]" ; 30 } 31 32 public boolean forceZeroPort() 33 { 34 return flag ; 35 } 36 37 public synchronized static ZeroPortPolicy getPolicy() 38 { 39 return policy ; 40 } 41 42 public int policy_type () 43 { 44 return ORBConstants.ZERO_PORT_POLICY ; 45 } 46 47 public org.omg.CORBA.Policy copy () 48 { 49 return this ; 50 } 51 52 public void destroy () 53 { 54 } 56 } 57 | Popular Tags |