1. /*
  2. * @(#)ValueHandlerMultiFormat.java 1.2 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 javax.rmi.CORBA;
  8. /**
  9. * Java to IDL ptc 02-01-12 1.5.1.5
  10. */
  11. public interface ValueHandlerMultiFormat extends ValueHandler {
  12. /**
  13. * Returns the maximum stream format version for
  14. * RMI/IDL custom value types that is supported
  15. * by this ValueHandler object. The ValueHandler
  16. * object must support the returned stream format version and
  17. * all lower versions.
  18. *
  19. * An ORB may use this value to include in a standard
  20. * IOR tagged component or service context to indicate to other
  21. * ORBs the maximum RMI-IIOP stream format that it
  22. * supports. If not included, the default for GIOP 1.2
  23. * is stream format version 1, and stream format version
  24. * 2 for GIOP 1.3 and higher.
  25. */
  26. byte getMaximumStreamFormatVersion();
  27. /**
  28. * Allows the ORB to pass the stream format
  29. * version for RMI/IDL custom value types. If the ORB
  30. * calls this method, it must pass a stream format version
  31. * between 1 and the value returned by the
  32. * getMaximumStreamFormatVersion method inclusive,
  33. * or else a BAD_PARAM exception with standard minor code
  34. * will be thrown.
  35. *
  36. * If the ORB calls the older ValueHandler.writeValue(OutputStream,
  37. * Serializable) method, stream format version 1 is implied.
  38. *
  39. * The ORB output stream passed to the ValueHandlerMultiFormat.writeValue
  40. * method must implement the ValueOutputStream interface, and the
  41. * ORB input stream passed to the ValueHandler.readValue method must
  42. * implement the ValueInputStream interface.
  43. */
  44. void writeValue(org.omg.CORBA.portable.OutputStream out,
  45. java.io.Serializable value,
  46. byte streamFormatVersion);
  47. }