Class CopyobjectDefaults

java.lang.Object
com.sun.corba.ee.spi.copyobject.CopyobjectDefaults

public abstract class CopyobjectDefaults extends Object
  • Field Details

    • referenceObjectCopier

      private static final org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopier referenceObjectCopier
    • referenceObjectCopierFactory

      private static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory referenceObjectCopierFactory
  • Constructor Details

    • CopyobjectDefaults

      private CopyobjectDefaults()
  • Method Details

    • makeORBStreamObjectCopierFactory

      public static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory makeORBStreamObjectCopierFactory(ORB orb)
      Obtain the ORB stream copier factory. Note that this version behaves differently than the others: each ObjectCopier produced by the factory only preserves aliasing within a single call to copy. The others copiers all preserve aliasing across all calls to copy (on the same ObjectCopier instance).
      Parameters:
      orb - ORB to use for remote instances
      Returns:
      CopierFactory
    • makeJavaStreamObjectCopierFactory

      public static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory makeJavaStreamObjectCopierFactory(ORB orb)
    • getReferenceObjectCopierFactory

      public static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory getReferenceObjectCopierFactory()
      Obtain the reference object "copier". This does no copies: it just returns whatever is passed to it.
      Returns:
      the reference copier
    • makeFallbackObjectCopierFactory

      public static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory makeFallbackObjectCopierFactory(org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory f1, org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory f2)
      Create a fallback copier factory from the two ObjectCopierFactory arguments. This copier makes an ObjectCopierFactory that creates instances of a fallback copier that first tries an ObjectCopier created from f1, then tries one created from f2, if the first throws a ReflectiveCopyException.
      Parameters:
      f1 - Factory to try first
      f2 - Factory to try second
      Returns:
      CopierFactory
    • makeOldReflectObjectCopierFactory

      public static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory makeOldReflectObjectCopierFactory(ORB orb)
      Obtain the old version of the reflective copier factory. This is provided only for benchmarking purposes.
      Parameters:
      orb - ORB to use for remote instances
      Returns:
      CopierFactory
    • makeReflectObjectCopierFactory

      public static org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory makeReflectObjectCopierFactory(ORB orb)
      Obtain the new reflective copier factory. This is 3-4 times faster than the stream copier, and about 10% faster than the old reflective copier. It should normally be used with a fallback copier, as there are some classes that simply cannot be copied reflectively.
      Parameters:
      orb - ORB to use for remote instances
      Returns:
      CopierFactory