1 21 package org.jacorb.security.ssl; 22 23 import org.omg.CORBA.Any ; 24 import org.omg.CORBA.LocalObject ; 25 import org.omg.CORBA.Policy ; 26 import org.omg.CORBA.PolicyError ; 27 import org.omg.PortableInterceptor.PolicyFactory ; 28 29 import org.jacorb.ssl.SSLPolicyValueHelper; 30 import org.jacorb.ssl.SSL_POLICY_TYPE; 31 32 public class SSLPolicyFactory 33 extends LocalObject 34 implements PolicyFactory 35 { 36 37 public SSLPolicyFactory() 38 { 39 } 40 41 public Policy create_policy(int type, Any value) 42 throws PolicyError 43 { 44 if (type != SSL_POLICY_TYPE.value) 45 throw new PolicyError (); 46 47 return new SSLPolicyImpl(SSLPolicyValueHelper.extract(value)); 48 49 } 50 } 51 | Popular Tags |