org.openorb.rmi.system
Class RMIInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--org.omg.CORBA.portable.InputStream
              |
              +--org.omg.CORBA_2_3.portable.InputStream
                    |
                    +--org.openorb.orb.io.AbstractInputStream
                          |
                          +--org.openorb.orb.iiop.CDRInputStream
                                |
                                +--org.openorb.rmi.system.RMIInputStream
All Implemented Interfaces:
org.openorb.orb.io.ExtendedInputStream, org.apache.avalon.framework.logger.LogEnabled

public class RMIInputStream
extends org.openorb.orb.iiop.CDRInputStream

This class extends the standard InputStream to unmarshal RMI specific types. The only justification for this class in the RMIoverIIOP package is the fact that the codebase is handled here. It would be easy to move codebase handling over to the CDRInputStream class.

Author:
Jerome Daniel

Constructor Summary
RMIInputStream(org.omg.CORBA.ORB orb, boolean bigEndian, org.omg.GIOP.Version version, org.openorb.orb.io.BufferSource source)
          Constructor
RMIInputStream(org.omg.CORBA.ORB orb, boolean bigEndian, org.omg.GIOP.Version version, org.openorb.orb.io.StorageBuffer buf)
          Constructor.
 
Method Summary
 void enableLogging(org.apache.avalon.framework.logger.Logger logger)
          Provide this class with a logger.
protected  java.io.Serializable value_extended_unmarshal(int offset, java.lang.Class clz, java.lang.String repo_id, java.lang.String codeBase, org.omg.SendingContext.RunTime sendingCtxt)
          This function should be overloaded by base types to allow marshaling of extended value types, RMI over IIOP for example.
 
Methods inherited from class org.openorb.orb.iiop.CDRInputStream
alignment, begin_encapsulation, bigEndian, bigEndian, end_encapsulation, getLogger, getValueCache, index, loadFactoryWithID, mark, orb, read_abstract_interface, read_abstract_interface, read_any, read_boolean_array, read_boolean, read_char_array, read_char, read_Context, read_double_array, read_double, read_fixed, read_fixed, read_fixed, read_float_array, read_float, read_long_array, read_long, read_longlong_array, read_longlong, read_Object, read_Object, read_octet_array, read_octet, read_Principal, read_short_array, read_short, read_string, read_TypeCode, read_typeids, read_ulong_array, read_ulong, read_ulonglong_array, read_ulonglong, read_ushort_array, read_ushort, read_value, read_value, read_value, read_value, read_value, read_wchar_array, read_wchar, read_wstring, reset_index, reset, setCodesets, skip, version
 
Methods inherited from class org.openorb.orb.io.AbstractInputStream
available, cancel, force_skip, get_codebase, markSupported, next, read, read, read
 
Methods inherited from class java.io.InputStream
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMIInputStream

public RMIInputStream(org.omg.CORBA.ORB orb,
                      boolean bigEndian,
                      org.omg.GIOP.Version version,
                      org.openorb.orb.io.StorageBuffer buf)
Constructor.
Parameters:
orb - The ORB to be used for the communication.
bigEndian - The endianess of the stream.
version - The GIOP version of the stream.
buf - The input buffer.

RMIInputStream

public RMIInputStream(org.omg.CORBA.ORB orb,
                      boolean bigEndian,
                      org.omg.GIOP.Version version,
                      org.openorb.orb.io.BufferSource source)
Constructor
Parameters:
orb - The ORB to be used for the communication.
bigEndian - The endianess of the stream.
version - The GIOP version of the stream.
source - The input buffer.
Method Detail

enableLogging

public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
Provide this class with a logger.
Overrides:
enableLogging in class org.openorb.orb.iiop.CDRInputStream
Parameters:
logger - The logger to be used.

value_extended_unmarshal

protected java.io.Serializable value_extended_unmarshal(int offset,
                                                        java.lang.Class clz,
                                                        java.lang.String repo_id,
                                                        java.lang.String codeBase,
                                                        org.omg.SendingContext.RunTime sendingCtxt)
This function should be overloaded by base types to allow marshaling of extended value types, RMI over IIOP for example. It should return null if the repository ID or class is not unmarshaled by the function. All calls to this function with an offset equal to a previous value must not unmarshal from the stream.
Overrides:
value_extended_unmarshal in class org.openorb.orb.iiop.CDRInputStream
Parameters:
offset - The stream buffer offset to start reading from.
clz - The class to be read from the stream.
repo_id - The CORBA repository ID of the class.
codeBase - The code base to get the implementation from.
sendingCtxt - The sending context from which to get the implementation from.
Returns:
The value read from the stream.