org.objectweb.david.libs.presentation.portable
Class CDRMarshallerFactory

java.lang.Object
  extended byorg.objectweb.david.libs.presentation.portable.PortableMarshallerFactory
      extended byorg.objectweb.david.libs.presentation.portable.CDRMarshallerFactory
All Implemented Interfaces:
org.objectweb.david.libs.presentation.portable.Constants, DavidStreamFactory, MarshallerFactory

public final class CDRMarshallerFactory
extends PortableMarshallerFactory

CORBA CDR extension of PortableMarshallerFactory.


Nested Class Summary
 
Nested classes inherited from class org.objectweb.david.libs.presentation.portable.PortableMarshallerFactory
PortableMarshallerFactory.PortableMarshaller, PortableMarshallerFactory.PortableMarshallerL, PortableMarshallerFactory.PortableUnMarshaller, PortableMarshallerFactory.PortableUnMarshallerD
 
Field Summary
 
Fields inherited from class org.objectweb.david.libs.presentation.portable.PortableMarshallerFactory
chunk_factory, CHUNKS, CODEBASE, context_factory, corba_marshaller, corba_unmarshaller, INDIRECTION_TAG, MULTIPLE_TYPES, NULL_TAG, SINGLE_TYPE, VALUE_TAG
 
Constructor Summary
CDRMarshallerFactory(ChunkFactory chunk_factory)
          Creates a new marshaller factory.
CDRMarshallerFactory(ChunkFactory chunk_factory, org.objectweb.jonathan.apis.kernel.ContextFactory context_factory)
          Creates a new marshaller factory.
CDRMarshallerFactory(ChunkFactory chunk_factory, org.objectweb.jonathan.apis.kernel.ContextFactory context_factory, DavidMarshallerFactory mf)
          Creates a new marshaller factory.
CDRMarshallerFactory(ChunkFactory chunk_factory, org.objectweb.jonathan.apis.kernel.ContextFactory context_factory, DavidMarshallerFactory mf, org.omg.CORBA.ORB orb)
          Creates a new CDRMarshallerFactory
CDRMarshallerFactory(ChunkFactory chunk_factory, DavidMarshallerFactory mf)
          Creates a new marshaller factory.
 
Method Summary
 DavidInputStream newInputStream(Chunk chunk, int read)
          Creates a new input stream, reading data from the specified chunk provider.
 DavidInputStream newInputStream(ChunkProvider message)
          Creates a new input stream, reading data from the provided chunk.
 Marshaller newMarshaller()
          Returns a new (little endian) marshaller.
 DavidOutputStream newOutputStream()
          Returns a (little endian) marshaller.
 UnMarshaller newUnMarshaller(Chunk chunk, int read)
          Returns a new unmarshaller, using the provided chunk(s) as a data source.
 UnMarshaller newUnMarshaller(ChunkProvider message)
          Returns a new unmarshaller, using the provided chunk provider as a data source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CDRMarshallerFactory

public CDRMarshallerFactory(ChunkFactory chunk_factory,
                            org.objectweb.jonathan.apis.kernel.ContextFactory context_factory,
                            DavidMarshallerFactory mf,
                            org.omg.CORBA.ORB orb)
Creates a new CDRMarshallerFactory

Parameters:
chunk_factory - the chunk factory to be used by the new marshaller factory.
context_factory - a context factory
mf - a David marshaller factory, only used to initialize corba_marshaller and corba_unmarshaller.
orb - an ORB instance.

CDRMarshallerFactory

public CDRMarshallerFactory(ChunkFactory chunk_factory,
                            org.objectweb.jonathan.apis.kernel.ContextFactory context_factory,
                            DavidMarshallerFactory mf)
Creates a new marshaller factory.

Parameters:
chunk_factory - the chunk factory to be used by the new marshaller factory.
context_factory - a context factory
mf - a David marshaller factory, only used to initialize corba_marshaller and corba_unmarshaller.

CDRMarshallerFactory

public CDRMarshallerFactory(ChunkFactory chunk_factory,
                            org.objectweb.jonathan.apis.kernel.ContextFactory context_factory)
Creates a new marshaller factory.

If this constructor is used,corba_marshaller and corba_unmarshaller are left null.

Parameters:
chunk_factory - the chunk factory to be used by the new marshaller factory.
context_factory - a context factory

CDRMarshallerFactory

public CDRMarshallerFactory(ChunkFactory chunk_factory,
                            DavidMarshallerFactory mf)
Creates a new marshaller factory.

Parameters:
chunk_factory - the chunk factory to be used by the new marshaller factory.
mf - a David marshaller factory, only used to initialize corba_marshaller and corba_unmarshaller.

CDRMarshallerFactory

public CDRMarshallerFactory(ChunkFactory chunk_factory)
Creates a new marshaller factory.

If this constructor is used,corba_marshaller and corba_unmarshaller are left null.

Parameters:
chunk_factory - the chunk factory to be used by the new marshaller factory.
Method Detail

newMarshaller

public Marshaller newMarshaller()
Description copied from class: PortableMarshallerFactory
Returns a new (little endian) marshaller.

Specified by:
newMarshaller in interface MarshallerFactory
Overrides:
newMarshaller in class PortableMarshallerFactory
Returns:
a new marshaller.

newOutputStream

public DavidOutputStream newOutputStream()
Description copied from class: PortableMarshallerFactory
Returns a (little endian) marshaller.

Specified by:
newOutputStream in interface DavidStreamFactory
Overrides:
newOutputStream in class PortableMarshallerFactory
Returns:
a new marshaller.

newUnMarshaller

public UnMarshaller newUnMarshaller(Chunk chunk,
                                    int read)
Description copied from class: PortableMarshallerFactory
Returns a new unmarshaller, using the provided chunk(s) as a data source.

The read parameters is used to initialise the number of bytes read from the message.

Specified by:
newUnMarshaller in interface MarshallerFactory
Overrides:
newUnMarshaller in class PortableMarshallerFactory
Parameters:
chunk - a (chain of) chunk(s)
read - the number of bytes already read from the message.
Returns:
an unmarshaller.

newInputStream

public DavidInputStream newInputStream(Chunk chunk,
                                       int read)
Description copied from class: PortableMarshallerFactory
Creates a new input stream, reading data from the specified chunk provider.

Specified by:
newInputStream in interface DavidStreamFactory
Overrides:
newInputStream in class PortableMarshallerFactory
Returns:
a new input stream.

newUnMarshaller

public UnMarshaller newUnMarshaller(ChunkProvider message)
Description copied from class: PortableMarshallerFactory
Returns a new unmarshaller, using the provided chunk provider as a data source.

Specified by:
newUnMarshaller in interface MarshallerFactory
Overrides:
newUnMarshaller in class PortableMarshallerFactory
Returns:
a new unmarshaller.

newInputStream

public DavidInputStream newInputStream(ChunkProvider message)
Description copied from class: PortableMarshallerFactory
Creates a new input stream, reading data from the provided chunk.

The read parameters indicates the number of bytes read since the beginning of the message.

Specified by:
newInputStream in interface DavidStreamFactory
Overrides:
newInputStream in class PortableMarshallerFactory
Returns:
a new input stream.