1 26 27 package org.objectweb.openccm.pss.runtime.common.lib; 28 29 30 38 public class IDLTypeCodec 39 { 40 46 private static org.omg.IOP.Codec codec = null; 47 48 54 57 public IDLTypeCodec() 58 { 59 } 60 61 67 static 68 { 69 org.omg.IOP.CodecFactory cf = null; 70 org.omg.IOP.Encoding enc = null; 71 72 try{ 73 cf = (org.omg.IOP.CodecFactory ) org.objectweb.openccm.corba.TheORB.getORB(). 74 resolve_initial_references("CodecFactory"); 75 }catch(org.omg.CORBA.ORBPackage.InvalidName ex){ 76 ex.printStackTrace(); 77 } 78 79 try{ 80 enc = new org.omg.IOP.Encoding ( 82 org.omg.IOP.ENCODING_CDR_ENCAPS.value, (byte) 1, (byte) 2); 83 codec = cf.create_codec(enc); 84 }catch(org.omg.IOP.CodecFactoryPackage.UnknownEncoding ex1){ 85 try{ 86 enc = new org.omg.IOP.Encoding ( 88 org.omg.IOP.ENCODING_CDR_ENCAPS.value, (byte) 1, (byte) 1); 89 codec = cf.create_codec(enc); 90 }catch(org.omg.IOP.CodecFactoryPackage.UnknownEncoding ex2){ 91 enc = new org.omg.IOP.Encoding ( 93 org.omg.IOP.ENCODING_CDR_ENCAPS.value, (byte) 1, (byte) 0); 94 try{ 95 codec = cf.create_codec(enc); 96 }catch(org.omg.IOP.CodecFactoryPackage.UnknownEncoding ex3){ 97 ex3.printStackTrace(); 98 } 99 } 100 } 101 } 102 103 109 114 public static org.omg.IOP.Codec 115 getCodec() 116 { 117 return codec; 118 } 119 } 120 | Popular Tags |