1 7 8 package com.sun.corba.se.impl.copyobject ; 9 10 import com.sun.corba.se.spi.orb.ORB ; 11 12 import com.sun.corba.se.impl.orbutil.DenseIntMapImpl ; 13 14 import com.sun.corba.se.spi.copyobject.ObjectCopierFactory ; 15 import com.sun.corba.se.spi.copyobject.CopierManager ; 16 import com.sun.corba.se.spi.copyobject.ObjectCopierFactory ; 17 18 public class CopierManagerImpl implements CopierManager 19 { 20 private int defaultId ; 21 private DenseIntMapImpl map ; 22 private ORB orb ; 23 24 public CopierManagerImpl( ORB orb ) 25 { 26 defaultId = 0 ; 27 map = new DenseIntMapImpl() ; 28 this.orb = orb ; 29 } 30 31 public void setDefaultId( int id ) 32 { 33 defaultId = id ; 34 } 35 36 public int getDefaultId() 37 { 38 return defaultId ; 39 } 40 41 public ObjectCopierFactory getObjectCopierFactory( int id ) 42 { 43 return (ObjectCopierFactory)(map.get( id )) ; 44 } 45 46 public ObjectCopierFactory getDefaultObjectCopierFactory() 47 { 48 return (ObjectCopierFactory)(map.get( defaultId )) ; 49 } 50 51 public void registerObjectCopierFactory( ObjectCopierFactory factory, int id ) 52 { 53 map.set( id, factory ) ; 54 } 55 } 56 57 | Popular Tags |