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

java.lang.Object
  |
  +--org.objectweb.david.libs.presentation.portable.PortableMarshallerFactory
        |
        +--org.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.


Inner classes inherited from class org.objectweb.david.libs.presentation.portable.PortableMarshallerFactory
PortableMarshallerFactory.PortableMarshaller, PortableMarshallerFactory.PortableMarshallerL, PortableMarshallerFactory.PortableUnMarshaller, PortableMarshallerFactory.PortableUnMarshallerD
 
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, ContextFactory context_factory)
          Creates a new marshaller factory.
CDRMarshallerFactory(ChunkFactory chunk_factory, ContextFactory context_factory, DavidMarshallerFactory mf)
          Creates a new marshaller factory.
CDRMarshallerFactory(ChunkFactory chunk_factory, ContextFactory context_factory, DavidMarshallerFactory mf, 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,
                            ContextFactory context_factory,
                            DavidMarshallerFactory mf,
                            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,
                            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,
                            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.
Overrides:
newMarshaller in class PortableMarshallerFactory
Following copied from class: org.objectweb.david.libs.presentation.portable.PortableMarshallerFactory
Returns:
a new marshaller.

newOutputStream

public DavidOutputStream newOutputStream()
Description copied from class: PortableMarshallerFactory
Returns a (little endian) marshaller.
Overrides:
newOutputStream in class PortableMarshallerFactory
Following copied from class: org.objectweb.david.libs.presentation.portable.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.

Overrides:
newUnMarshaller in class PortableMarshallerFactory
Following copied from class: org.objectweb.david.libs.presentation.portable.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.
Overrides:
newInputStream in class PortableMarshallerFactory
Following copied from class: org.objectweb.david.libs.presentation.portable.PortableMarshallerFactory
Parameters:
message - a chunk provider.
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.
Overrides:
newUnMarshaller in class PortableMarshallerFactory
Following copied from class: org.objectweb.david.libs.presentation.portable.PortableMarshallerFactory
Parameters:
provider - a chunk provider.
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.

Overrides:
newInputStream in class PortableMarshallerFactory
Following copied from class: org.objectweb.david.libs.presentation.portable.PortableMarshallerFactory
Parameters:
chunk - a chunk;
read - the number of bytes already read from the message.
Returns:
a new input stream.