0N/A/*
157N/A * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
157N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
157N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
157N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
157N/A * or visit www.oracle.com if you need additional information or have any
157N/A * questions.
0N/A */
0N/A/*
0N/A * Licensed Materials - Property of IBM
0N/A * RMI-IIOP v1.0
0N/A * Copyright IBM Corp. 1998 1999 All Rights Reserved
0N/A *
0N/A */
0N/A
0N/Apackage javax.rmi.CORBA;
0N/A
0N/A/**
0N/A * Defines methods which allow serialization of Java objects
0N/A * to and from GIOP streams.
0N/A **/
0N/Apublic interface ValueHandler {
0N/A
0N/A /**
0N/A * Writes a value to the stream using Java semantics.
0N/A * @param out the stream to write the value to.
0N/A * @param value the value to be written to the stream.
0N/A **/
0N/A void writeValue(org.omg.CORBA.portable.OutputStream out,
0N/A java.io.Serializable value);
0N/A
0N/A /**
0N/A * Reads a value from the stream using Java semantics.
0N/A * @param in the stream to read the value from.
0N/A * @param offset the current position in the input stream.
0N/A * @param clz the type of the value to be read in.
0N/A * @param repositoryID the RepositoryId of the value to be read in.
0N/A * @param sender the sending context runtime codebase.
0N/A * @return the value read from the stream.
0N/A **/
0N/A java.io.Serializable readValue(org.omg.CORBA.portable.InputStream in,
0N/A int offset,
0N/A java.lang.Class clz,
0N/A String repositoryID,
0N/A org.omg.SendingContext.RunTime sender);
0N/A
0N/A /**
0N/A * Returns the CORBA RepositoryId for the given Java class.
0N/A * @param clz a Java class.
0N/A * @return the CORBA RepositoryId for the class.
0N/A **/
0N/A java.lang.String getRMIRepositoryID(java.lang.Class clz);
0N/A
0N/A /**
0N/A * Indicates whether the given class performs custom or
0N/A * default marshaling.
0N/A * @param clz the class to test for custom marshaling.
0N/A * @return <code>true</code> if the class performs custom marshaling, <code>false</code>
0N/A * if it does not.
0N/A **/
0N/A boolean isCustomMarshaled(java.lang.Class clz);
0N/A
0N/A /**
0N/A * Returns the CodeBase for this ValueHandler. This is used by
0N/A * the ORB runtime. The server sends the service context containing
0N/A * the IOR for this CodeBase on the first GIOP reply. The client
0N/A * does the same on the first GIOP request.
0N/A * @return the SendingContext.CodeBase of this ValueHandler.
0N/A **/
0N/A org.omg.SendingContext.RunTime getRunTimeCodeBase();
0N/A
0N/A /**
0N/A * If the value contains a <code>writeReplace</code> method then the result
0N/A * is returned. Otherwise, the value itself is returned.
0N/A * @param value the value to be marshaled.
0N/A * @return the true value to marshal on the wire.
0N/A **/
0N/A java.io.Serializable writeReplace(java.io.Serializable value);
0N/A
0N/A}