org.objectweb.jeremie.libs.presentation.std
Class StdMarshallerFactory

java.lang.Object
  extended byorg.objectweb.jeremie.libs.presentation.std.StdMarshallerFactory
All Implemented Interfaces:
MarshallerFactory

public class StdMarshallerFactory
extends java.lang.Object
implements MarshallerFactory

Provides a factory for creating Jeremie marshallers and unmarshallers.


Nested Class Summary
 class StdMarshallerFactory.StdMarshaller
          StdMarshaller is an (abstract) implementation of Marshaller.
 class StdMarshallerFactory.StdMarshallerL
          StdMarshallerL is a little endian implementation of Marshaller extending StdMarshaller.
 class StdMarshallerFactory.StdUnMarshaller
          StdUnMarshaller is an (abstract) implementation of UnMarshaller.
 class StdMarshallerFactory.StdUnMarshallerD
          StdUnMarshaller is an (abstract) implementation of UnMarshaller.
 
Field Summary
protected  ChunkFactory chunk_factory
          The chunk factory parameter used to form messages.
protected  org.objectweb.jonathan.apis.kernel.ContextFactory context_factory
          The context factory.
protected  NamingContext domain
          The domain parameter used to encode references.
static Chunk empty_chunk
          An empty chunk.
 
Constructor Summary
StdMarshallerFactory(ChunkFactory chunk_factory, NamingContext domain, org.objectweb.jonathan.apis.kernel.ContextFactory context_factory)
           
 
Method Summary
 Marshaller newMarshaller()
          Returns a new 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
 

Field Detail

chunk_factory

protected ChunkFactory chunk_factory
The chunk factory parameter used to form messages.


domain

protected NamingContext domain
The domain parameter used to encode references.


context_factory

protected org.objectweb.jonathan.apis.kernel.ContextFactory context_factory
The context factory.


empty_chunk

public static final Chunk empty_chunk
An empty chunk.

Constructor Detail

StdMarshallerFactory

public StdMarshallerFactory(ChunkFactory chunk_factory,
                            NamingContext domain,
                            org.objectweb.jonathan.apis.kernel.ContextFactory context_factory)
Method Detail

newMarshaller

public Marshaller newMarshaller()
Returns a new marshaller.

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

newUnMarshaller

public UnMarshaller newUnMarshaller(ChunkProvider message)
Returns a new unmarshaller using the provided chunk provider as a data source.

Specified by:
newUnMarshaller in interface MarshallerFactory
Parameters:
message - a chunk provider.
Returns:
a new unmarshaller.

newUnMarshaller

public UnMarshaller newUnMarshaller(Chunk chunk,
                                    int read)
Returns a new unmarshaller using the provided chunk(s) as a data source.

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