1 7 8 package com.sun.corba.se.spi.copyobject ; 9 10 import com.sun.corba.se.spi.orb.ORB ; 11 12 import com.sun.corba.se.impl.copyobject.ReferenceObjectCopierImpl ; 13 import com.sun.corba.se.impl.copyobject.FallbackObjectCopierImpl ; 14 import com.sun.corba.se.impl.copyobject.ORBStreamObjectCopierImpl ; 15 import com.sun.corba.se.impl.copyobject.JavaStreamObjectCopierImpl ; 16 17 public abstract class CopyobjectDefaults 18 { 19 private CopyobjectDefaults() { } 20 21 26 public static ObjectCopierFactory makeORBStreamObjectCopierFactory( final ORB orb ) 27 { 28 return new ObjectCopierFactory() { 29 public ObjectCopier make( ) 30 { 31 return new ORBStreamObjectCopierImpl( orb ) ; 32 } 33 } ; 34 } 35 36 public static ObjectCopierFactory makeJavaStreamObjectCopierFactory( final ORB orb ) 37 { 38 return new ObjectCopierFactory() { 39 public ObjectCopier make( ) 40 { 41 return new JavaStreamObjectCopierImpl( orb ) ; 42 } 43 } ; 44 } 45 46 private static final ObjectCopier referenceObjectCopier = new ReferenceObjectCopierImpl() ; 47 48 private static ObjectCopierFactory referenceObjectCopierFactory = 49 new ObjectCopierFactory() { 50 public ObjectCopier make() 51 { 52 return referenceObjectCopier ; 53 } 54 } ; 55 56 59 public static ObjectCopierFactory getReferenceObjectCopierFactory() 60 { 61 return referenceObjectCopierFactory ; 62 } 63 64 70 public static ObjectCopierFactory makeFallbackObjectCopierFactory( 71 final ObjectCopierFactory f1, final ObjectCopierFactory f2 ) 72 { 73 return new ObjectCopierFactory() { 74 public ObjectCopier make() 75 { 76 ObjectCopier c1 = f1.make() ; 77 ObjectCopier c2 = f2.make() ; 78 return new FallbackObjectCopierImpl( c1, c2 ) ; 79 } 80 } ; 81 } 82 } 83 | Popular Tags |