1. /*
  2. * @(#)CopierManager.java 1.5 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.spi.copyobject ;
  8. /** Manager of ObjectCopier implementations used to support javax.rmi.CORBA.Util.copyObject(s).
  9. * This provides simple methods for registering all supported ObjectCopier factories.
  10. * A default copier is also supported, for use in contexts where no specific copier id
  11. * is available.
  12. */
  13. public interface CopierManager
  14. {
  15. /** Set the Id of the copier to use if no other copier has been set.
  16. */
  17. void setDefaultId( int id ) ;
  18. /** Return the copier for the default copier id. Throws a BAD_PARAM exception
  19. * if no default copier id has been set.
  20. */
  21. int getDefaultId() ;
  22. ObjectCopierFactory getObjectCopierFactory( int id ) ;
  23. ObjectCopierFactory getDefaultObjectCopierFactory() ;
  24. /** Register an ObjectCopierFactory under a particular id. This can be retrieved
  25. * later by getObjectCopierFactory.
  26. */
  27. void registerObjectCopierFactory( ObjectCopierFactory factory, int id ) ;
  28. }