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