Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

StdMarshallerFactory Class Reference

Inheritance diagram for StdMarshallerFactory:

Inheritance graph
[legend]
Collaboration diagram for StdMarshallerFactory:

Collaboration graph
[legend]
List of all members.

Public Methods

Marshaller newMarshaller ()
UnMarshaller newUnMarshaller (ChunkProvider message)
UnMarshaller newUnMarshaller (Chunk chunk, int read)

Static Public Attributes

final Chunk empty_chunk = new Chunk(new byte[0],0,0)

Protected Methods

 StdMarshallerFactory (Object[] used_components)

Protected Attributes

ChunkFactory chunk_factory
NamingContext domain
ContextFactory context_factory

Private Methods

 StdMarshallerFactory (Context _c, Object[] used_components) throws JonathanException
void initialize (Object[] used_components)

Static Private Methods

Class primitiveClass (String name)

Detailed Description

Provides a factory for creating Jeremie marshallers and unmarshallers.

Definition at line 70 of file StdMarshallerFactory.java.


Constructor & Destructor Documentation

StdMarshallerFactory::StdMarshallerFactory ( Object used_components[] ) [inline, protected]
 

Creates a standard marshaller factory instance. used_components must be an array of two elements, the first being of type ChunkFactory, the second of type NamingContext. The latter must be a valid domain

Parameters:
used_components   the components to use to initialize the marshaller factory.

Definition at line 94 of file StdMarshallerFactory.java.

00094                                                             {
00095       initialize(used_components);
00096    }

StdMarshallerFactory::StdMarshallerFactory ( Context _c,
Object used_components[] ) [inline, private]
 

Definition at line 98 of file StdMarshallerFactory.java.

00099                                {
00100       this(used_components);
00101    }


Member Function Documentation

void StdMarshallerFactory::initialize ( Object used_components[] ) [inline, private]
 

Definition at line 103 of file StdMarshallerFactory.java.

00103                                                      {
00104       chunk_factory = (ChunkFactory) used_components[0];
00105       domain = (NamingContext) used_components[1];
00106       context_factory = (ContextFactory) used_components[2];
00107    }

Marshaller StdMarshallerFactory::newMarshaller ( ) [inline]
 

Returns a new marshaller.

Returns:
a new marshaller.

Reimplemented from MarshallerFactory.

Definition at line 114 of file StdMarshallerFactory.java.

00114                                      {
00115       return new StdMarshallerL();
00116    }

UnMarshaller StdMarshallerFactory::newUnMarshaller ( Chunk chunk,
int read ) [inline]
 

Returns a new unmarshaller using the provided chunk(s) as a data source.

Parameters:
chunk   a (chain of) chunk(s);
read   the number of bytes already read.
Returns:
an unmarshaller.

Reimplemented from MarshallerFactory.

Definition at line 136 of file StdMarshallerFactory.java.

00136                                                              {
00137       return new StdUnMarshaller(chunk,read);
00138    }

UnMarshaller StdMarshallerFactory::newUnMarshaller ( ChunkProvider message ) [inline]
 

Returns a new unmarshaller using the provided chunk provider as a data source.

Parameters:
provider   a chunk provider.
Returns:
a new unmarshaller.

Reimplemented from MarshallerFactory.

Definition at line 125 of file StdMarshallerFactory.java.

00125                                                               {
00126       return new StdUnMarshallerD(message);
00127    }

Class StdMarshallerFactory::primitiveClass ( String name ) [inline, static, private]
 

Definition at line 141 of file StdMarshallerFactory.java.

00141                                             {
00142       switch (name.charAt(0)) {
00143          case 'b':
00144             switch (name.charAt(1)) {
00145                case 'o':
00146                   return boolean.class;
00147                default:
00148                   return byte.class;
00149             }
00150          case 'c':
00151             return char.class;
00152          case 'd':
00153             return double.class;
00154          case 'f':
00155             return float.class;
00156          case 'i':
00157             return int.class;
00158          case 'l':
00159             return long.class;
00160          case 's':
00161             return short.class;
00162          default:
00163             return void.class;
00164       }
00165    }   


Member Data Documentation

ChunkFactory StdMarshallerFactory::chunk_factory [protected]
 

The chunk factory parameter used to form messages.

Definition at line 73 of file StdMarshallerFactory.java.

ContextFactory StdMarshallerFactory::context_factory [protected]
 

The context factory.

Definition at line 79 of file StdMarshallerFactory.java.

NamingContext StdMarshallerFactory::domain [protected]
 

The domain parameter used to encode references.

Definition at line 76 of file StdMarshallerFactory.java.

final Chunk StdMarshallerFactory::empty_chunk = new Chunk(new byte[0],0,0) [static]
 

An empty chunk.

Definition at line 82 of file StdMarshallerFactory.java.


The documentation for this class was generated from the following file:
Generated at Fri May 31 19:25:27 2002 for Jonathan by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001