1 22 package org.jboss.iiop.csiv2; 23 24 import org.omg.CORBA.LocalObject ; 25 import org.omg.PortableInterceptor.ORBInitializer ; 26 import org.omg.PortableInterceptor.ORBInitInfo ; 27 28 import org.omg.IOP.Codec ; 29 import org.omg.IOP.Encoding ; 30 import org.omg.IOP.ENCODING_CDR_ENCAPS ; 31 32 import org.jacorb.ssl.SSL_POLICY_TYPE; 33 import org.jacorb.security.ssl.SSLPolicyFactory; 34 35 43 public class CSIv2Initializer 44 extends LocalObject 45 implements ORBInitializer 46 { 47 48 public CSIv2Initializer() 49 { 50 } 52 53 55 public void pre_init(ORBInitInfo info) 56 { 57 } 59 60 public void post_init(ORBInitInfo info) 61 { 62 try { 63 Encoding encoding = new Encoding (ENCODING_CDR_ENCAPS.value, 65 (byte)1, 66 (byte)0 ); 67 Codec codec = info.codec_factory().create_codec(encoding); 68 69 info.add_ior_interceptor(new CSIv2IORInterceptor(codec)); 71 72 info.register_policy_factory(CSIv2Policy.TYPE, 74 new CSIv2PolicyFactory(codec)); 75 info.register_policy_factory(SSL_POLICY_TYPE.value, 76 new SSLPolicyFactory()); 77 } 78 catch (Exception e) { 79 throw new RuntimeException ("Unexpected " + e); 80 } 81 } 82 } 83 | Popular Tags |