1 22 package org.jboss.iiop.codebase; 23 24 import org.omg.CORBA.Any ; 25 import org.omg.CORBA.LocalObject ; 26 import org.omg.CORBA.Policy ; 27 import org.omg.CORBA.PolicyError ; 28 import org.omg.PortableInterceptor.PolicyFactory ; 29 30 37 class CodebasePolicyFactory 38 extends LocalObject  39 implements PolicyFactory 40 { 41 public CodebasePolicyFactory() 42 { 43 } 44 45 47 public Policy create_policy(int type, Any value) 48 throws PolicyError  49 { 50 if (type != CodebasePolicy.TYPE) { 51 throw new PolicyError (); 52 } 53 String codebase = value.extract_string(); 54 return new CodebasePolicy(codebase); 55 } 56 } 57 | Popular Tags |