1 28 29 30 package org.objectweb.ccm.runtime; 31 32 import org.objectweb.corba.runtime.*; 33 34 37 public class ComponentIdImpl 38 extends org.omg.CORBA.LocalObject 39 implements org.omg.Components.ComponentId 40 { 41 static private String _class_name = "ComponentIdImpl"; 43 private short _facet_id; 44 private short _segment_id; 45 private byte[] _object_id; 46 private org.omg.Components.SegmentDescr[] _seg_descrs; 47 48 public 50 ComponentIdImpl(short fid, short segid, 51 org.omg.Components.SegmentDescr[] descrs) 52 { 53 _facet_id = fid; 55 _segment_id = segid; 56 _seg_descrs = descrs; 57 _object_id = null; 58 } 59 60 64 final public short 65 get_facet_id() 66 { 67 return _facet_id; 68 } 69 70 final public short 71 get_segment_id() 72 { 73 return _segment_id; 74 } 75 76 final public byte[] 77 get_object_id() 78 { 79 if (_object_id==null) { 80 org.omg.Components.SegmentDescr[] descrs = _seg_descrs; 82 for (int i=0;i<descrs.length;i++) { 83 if (descrs[i].segment_id==_segment_id) { 84 _object_id = descrs[i].object_id; 85 break; 86 } 87 } 88 } 89 90 return _object_id; 91 } 92 93 final public org.omg.Components.SegmentDescr[] 94 get_segment_descrs() 95 { 96 return _seg_descrs; 97 } 98 99 final public org.omg.Components.ComponentId 100 create_with_new_target(short new_facet, short new_segment) 101 { 102 return new ComponentIdImpl(new_facet, new_segment, _seg_descrs); 103 } 104 } | Popular Tags |