Package com.sun.corba.se.impl.io
Class ValueHandlerImpl
java.lang.Object
com.sun.corba.se.impl.io.ValueHandlerImpl
- All Implemented Interfaces:
ValueHandler,ValueHandlerMultiFormat
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final shortstatic final shortstatic final short -
Method Summary
Modifier and TypeMethodDescriptiongetClassName(String id) getDefinedInId(String id) byteReturns the maximum stream format version for RMI/IDL custom value types that is supported by this ValueHandler object.getRMIRepositoryID(Class clz) Returns the repository ID for the given RMI value Class.Returns the CodeBase for this ValueHandler.booleanisAbstractBase(Class clazz) booleanisCustomMarshaled(Class clz) Indicates whether the given Class performs custom or default marshaling.booleanisSequence(String id) readValue(InputStream in, int offset, Class clazz, String repositoryID, RunTime rt) Reads a value from the stream using java semantics.booleanuseFullValueDescription(Class clazz, String repositoryID) Returns a boolean of whether or not RepositoryId indicates FullValueDescriptor.writeReplace(Serializable value) If the value contains a writeReplace method then the result is returned.voidwriteValue(OutputStream out, Serializable value) Writes the value to the stream using java semantics.voidwriteValue(OutputStream out, Serializable value, byte streamFormatVersion) Allows the ORB to pass the stream format version for RMI/IDL custom value types.
-
Field Details
-
FORMAT_VERSION_PROPERTY
- See Also:
-
kRemoteType
public static final short kRemoteType- See Also:
-
kAbstractType
public static final short kAbstractType- See Also:
-
kValueType
public static final short kValueType- See Also:
-
-
Method Details
-
getMaximumStreamFormatVersion
public byte getMaximumStreamFormatVersion()Description copied from interface:ValueHandlerMultiFormatReturns the maximum stream format version for RMI/IDL custom value types that is supported by this ValueHandler object. The ValueHandler object must support the returned stream format version and all lower versions. An ORB may use this value to include in a standard IOR tagged component or service context to indicate to other ORBs the maximum RMI-IIOP stream format that it supports. If not included, the default for GIOP 1.2 is stream format version 1, and stream format version 2 for GIOP 1.3 and higher.- Specified by:
getMaximumStreamFormatVersionin interfaceValueHandlerMultiFormat
-
writeValue
Description copied from interface:ValueHandlerMultiFormatAllows the ORB to pass the stream format version for RMI/IDL custom value types. If the ORB calls this method, it must pass a stream format version between 1 and the value returned by the getMaximumStreamFormatVersion method inclusive, or else a BAD_PARAM exception with standard minor code will be thrown. If the ORB calls the older ValueHandler.writeValue(OutputStream, Serializable) method, stream format version 1 is implied. The ORB output stream passed to the ValueHandlerMultiFormat.writeValue method must implement the ValueOutputStream interface, and the ORB input stream passed to the ValueHandler.readValue method must implement the ValueInputStream interface.- Specified by:
writeValuein interfaceValueHandlerMultiFormat
-
writeValue
Writes the value to the stream using java semantics.- Specified by:
writeValuein interfaceValueHandler- Parameters:
out- The stream to write the value tovalue- The value to be written to the stream
-
readValue
public Serializable readValue(InputStream in, int offset, Class clazz, String repositoryID, RunTime rt) Reads a value from the stream using java semantics.- Specified by:
readValuein interfaceValueHandler- Parameters:
in- The stream to read the value fromclazz- The type of the value to be read inrt- The sending context runtimeoffset- the current position in the input stream.repositoryID- the RepositoryId of the value to be read in.- Returns:
- the value read from the stream.
-
getRMIRepositoryID
Returns the repository ID for the given RMI value Class.- Specified by:
getRMIRepositoryIDin interfaceValueHandler- Parameters:
clz- The class to return a repository ID for.- Returns:
- the repository ID of the Class.
-
isCustomMarshaled
Indicates whether the given Class performs custom or default marshaling.- Specified by:
isCustomMarshaledin interfaceValueHandler- Parameters:
clz- The class to test for custom marshaling.- Returns:
- True if the class performs custom marshaling, false if it does not.
-
getRunTimeCodeBase
Returns the CodeBase for this ValueHandler. This is used by the ORB runtime. The server sends the service context containing the IOR for this CodeBase on the first GIOP reply. The clients do the same on the first GIOP request.- Specified by:
getRunTimeCodeBasein interfaceValueHandler- Returns:
- the SendingContext.CodeBase of this ValueHandler.
-
useFullValueDescription
Returns a boolean of whether or not RepositoryId indicates FullValueDescriptor. used for backward compatability- Throws:
IOException
-
getClassName
-
getClassFromType
- Throws:
ClassNotFoundException
-
getAnyClassFromType
- Throws:
ClassNotFoundException
-
createForAnyType
-
getDefinedInId
-
getUnqualifiedName
-
getSerialVersionUID
-
isAbstractBase
-
isSequence
-
writeReplace
If the value contains a writeReplace method then the result is returned. Otherwise, the value itself is returned.- Specified by:
writeReplacein interfaceValueHandler- Parameters:
value- the value to be marshaled.- Returns:
- the true value to marshal on the wire.
-