Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

Marshaller Interface Reference

Inheritance diagram for Marshaller:

Inheritance graph
[legend]
List of all members.

Public Methods

void write (Chunk chunk)
void writeByte (byte b) throws JonathanException
void writeBoolean (boolean b) throws JonathanException
void writeChar8 (char i) throws JonathanException
void writeChar16 (char i) throws JonathanException
void writeShort (short i) throws JonathanException
void writeInt (int i) throws JonathanException
void writeLong (long i) throws JonathanException
void writeFloat (float f) throws JonathanException
void writeDouble (double d) throws JonathanException
void writeString8 (String s) throws JonathanException
void writeString16 (String s) throws JonathanException
void writeReference (Object obj) throws JonathanException
void writeValue (Object obj) throws JonathanException
void writeByteArray (byte[] array, int offset, int length) throws JonathanException
OutputStream outputStream ()
boolean sameContents (Marshaller marshaller)
boolean isLittleEndian ()
Chunk getState ()
int getOffset ()
void setOffset (int offset)
Context getContext ()
void reset ()
void close ()

Detailed Description

Marshaller is the type of basic types marshallers. They should be used by protocols.

Definition at line 40 of file Marshaller.java.


Member Function Documentation

void Marshaller::close ( )
 

This method causes the message to lose all its references to the underlying chunks, and release each of them. It also released the context.

Reimplemented in DavidOutputStream, PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by IIOPBinder::IIOPIdentifier::encode(), EBinder::EId::encode(), JRMITSHandler::encodeContext(), and TcpIpProtocol::send().

Context Marshaller::getContext ( )
 

Returns a Context associated with this marshaller.

Returns:
a Context associated with this marshaller.

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by ResponseHandlerImpl::createExceptionReply(), ResponseHandlerImpl::createReply(), GIOPProtocol::encodeReplyServices(), GIOPProtocol::encodeRequestServices(), and JStubFactory::ClientDelegate::invoke().

int Marshaller::getOffset ( )
 

Returns the current offset in the message, i.e., the position in the message at which the next byte will be written.

Returns:
the current offset in the message.

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by IORHelpers::forgeIOR(), GIOPProtocol::sendMessage(), ORBClass::CORBAMarshaller::writeTypeCodeRec(), and ORBClass::CORBAMarshaller::write_Object().

Chunk Marshaller::getState ( )
 

Returns the state of the message as a (chain of) chunk(s).

The returned chunk(s) are NOT duplicated. If the caller keeps a reference to them, it must reset the message, and not continue to use it.

Returns:
the state of the message as a (chain of) chunk(s).

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by MessageHelpers::copy(), IORHelpers::forgeIOR(), StdMarshallerFactory::StdMarshaller::sameContents(), PortableMarshallerFactory::PortableMarshaller::sameContents(), TcpIpProtocol::send(), GIOPProtocol::sendMessage(), and MessageHelpers::size().

boolean Marshaller::isLittleEndian ( )
 

Returns true if this marshaller is little-endian, false otherwise.

Returns:
true if this marshaller is little-endian, false otherwise.

Reimplemented in PortableMarshallerFactory::PortableMarshallerL, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshallerL.

Referenced by IIOPBinder::SrvIdentifier::SrvIdentifier(), IIOPBinder::IIOPIdentifier::encode(), EBinder::EId::encode(), IORHelpers::forgeIOR(), UnknownExceptionService::getReplyContext(), IIOPORB::initialize(), GIOPProtocol::ClientSession_High::prepare(), GIOPProtocol::ClientSession_High::prepareInvocation(), GIOPProtocol::prepareReplyMessage(), and GIOPProtocol::sendError().

OutputStream Marshaller::outputStream ( )
 

Returns an output stream to write into the message. Closing the output stream has the same effect as closing the marshaller itself.

Returns:
an output stream to write into the message.

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

void Marshaller::reset ( )
 

This method causes the message to lose all its references to the underlying chunks, without releasing them. This method must not be used if no reference to chunks present in the message is held by an entity in charge of their release. It also releases the context associated with the target marshaller.

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by GIOPProtocol::sendMessage().

boolean Marshaller::sameContents ( Marshaller other )
 

Checks if the target marshaller and the provided one have the same contents, i.e., they contain the same bits.

Parameters:
marshaller   a marshaller;
Returns:
true if the target marshaller and the provided one have the same contents, false otherwise.

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by AnyImpl::equal().

void Marshaller::setOffset ( int off )
 

Sets the offset in the message.

This method may be used to override data already written into the message.

Parameters:
offset   the new offset.

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by IORHelpers::forgeIOR(), GIOPProtocol::sendMessage(), and ORBClass::CORBAMarshaller::write_Object().

void Marshaller::write ( Chunk chunk )
 

Writes a chunk in the message.

The target becomes the "owner" of the provided chunk, and therefore is not supposed to duplicate it. If the entity invoking this operation wants to keep a reference to the chunk, it must be duplicated.

Parameters:
chunk   the chunk to be written.

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by GIOPProtocol::sendMessage().

void Marshaller::writeBoolean ( boolean v )
 

Writes a boolean.

Parameters:
b   a boolean;
Exceptions:
JonathanException   if a marshal error occurred.

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by IIOPBinder::SrvIdentifier::SrvIdentifier(), IIOPBinder::IIOPIdentifier::encode(), EBinder::EId::encode(), IORHelpers::forgeIOR(), ServerDelegate::handleCorbaMethods(), IIOPORB::initialize(), GIOPProtocol::ClientSession_High::prepare(), GIOPProtocol::ClientSession_High::prepareInvocation(), GIOPProtocol::prepareReplyMessage(), and GIOPProtocol::sendError().

void Marshaller::writeByte ( byte v )
 

Writes a byte.

Parameters:
b   a byte;
Exceptions:
JonathanException   if a marshal error occurred.

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by GIOPProtocol::ClientSession_High::prepare(), GIOPProtocol::ClientSession_High::prepareInvocation(), GIOPProtocol::prepareReplyMessage(), and GIOPProtocol::sendError().

void Marshaller::writeByteArray ( byte array[],
int off,
int len )
 

Writes an array of bytes.

Parameters:
array   an array of bytes;
Exceptions:
JonathanException   if a marshal error occurred.

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by IIOPBinder::IIOPIdentifier::encode(), GIOPProtocol::encodeServices(), IORHelpers::forgeIOR(), GIOPProtocol::ClientSession_High::prepare(), GIOPProtocol::ClientSession_High::prepareInvocation(), GIOPProtocol::prepareReplyMessage(), and GIOPProtocol::sendError().

void Marshaller::writeChar16 ( char v )
 

Writes a 16 bits char.

Parameters:
i   a char;
Exceptions:
JonathanException   if a marshal error occurred.

Reimplemented in PortableMarshallerFactory::PortableMarshallerL, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshallerL.

void Marshaller::writeChar8 ( char v )
 

Writes an 8 bits char.

The method used to translate the provided char into an 8 bits entity is not specified.

Parameters:
i   a char;
Exceptions:
JonathanException   if a marshal error occurred.

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by IIOPBinder::IIOPIdentifier::encode(), and IORHelpers::forgeIOR().

void Marshaller::writeDouble ( double v )
 

Writes a double.

Parameters:
d   a double;
Exceptions:
JonathanException   if a marshal error occurred.

Reimplemented in PortableMarshallerFactory::PortableMarshallerL, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshallerL.

void Marshaller::writeFloat ( float v )
 

Writes a float.

Parameters:
f   a float;
Exceptions:
JonathanException   if a marshal error occurred.

Reimplemented in PortableMarshallerFactory::PortableMarshallerL, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshallerL.

void Marshaller::writeInt ( int v )
 

Writes an int.

Parameters:
i   an int;
Exceptions:
JonathanException   if a marshal error occurred.

Reimplemented in PortableMarshallerFactory::PortableMarshallerL, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshallerL.

Referenced by RegistryImpl_Stub::bind(), IIOPBinder::IIOPIdentifier::encode(), EBinder::EId::encode(), GIOPProtocol::encodeServices(), IORHelpers::forgeIOR(), JRMIReferenceImpl_Stub::getReference(), RegistryImpl_Stub::list(), RegistryImpl_Stub::lookup(), GIOPProtocol::ClientSession_High::prepare(), GIOPProtocol::ClientSession_High::prepareInvocation(), GIOPProtocol::prepareReplyMessage(), RegistryImpl_Stub::rebind(), JStubFactory::ClientDelegate::request(), GIOPProtocol::sendError(), GIOPProtocol::sendMessage(), GIOPProtocol::ServerSession_Low::sendSystemException(), RegistryImpl_Stub::unbind(), ORBClass::CORBAMarshaller::writeEncapsulatedTypeCodeRec(), ORBClass::CORBAMarshaller::writeTypeCodeRec(), and ORBClass::CORBAMarshaller::write_Object().

void Marshaller::writeLong ( long v )
 

Writes a long.

Parameters:
i   a long;
Exceptions:
JonathanException   if a marshal error occurred.

Reimplemented in PortableMarshallerFactory::PortableMarshallerL, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshallerL.

void Marshaller::writeReference ( Object value )
 

Writes an object reference in the marshaller.

Parameters:
obj   an object reference
Exceptions:
JonathanException   if a marshal error occurred.

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by GIOPProtocol::ServerSession_Low::send().

void Marshaller::writeShort ( short v )
 

Writes a short.

Parameters:
i   a short;
Exceptions:
JonathanException   if a marshal error occurred.

Reimplemented in PortableMarshallerFactory::PortableMarshallerL, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshallerL.

Referenced by IIOPBinder::IIOPIdentifier::encode(), IORHelpers::forgeIOR(), and ORBClass::CORBAMarshaller::writeEncapsulatedTypeCodeRec().

void Marshaller::writeString16 ( String v )
 

Writes a string of 16 bits chars.

Parameters:
s   a string;
Exceptions:
JonathanException   if a marshal error occurred.

Reimplemented in PortableMarshallerFactory::PortableMarshallerL, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshallerL.

void Marshaller::writeString8 ( String str )
 

Writes a string of 8 bits chars.

Parameters:
s   a string;
Exceptions:
JonathanException   if a marshal error occurred.

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by IIOPBinder::SrvIdentifier::SrvIdentifier(), IIOPBinder::IIOPIdentifier::encode(), EBinder::EId::encode(), IORHelpers::forgeIOR(), IIOPORB::initialize(), JStubFactory::ClientDelegate::request(), GIOPProtocol::ServerSession_Low::sendSystemException(), ORBClass::CORBAMarshaller::writeEncapsulatedTypeCodeRec(), and ORBClass::CORBAMarshaller::write_Object().

void Marshaller::writeValue ( Object value )
 

Writes a value in the marshaller.

Parameters:
obj   an object
Exceptions:
JonathanException   if a marshal error occurred.
Since:
3.0 a2

Reimplemented in PortableMarshallerFactory::PortableMarshaller, ObjectStreamMarshaller, and StdMarshallerFactory::StdMarshaller.

Referenced by RegistryImpl_Stub::bind(), JRMITSHandler::encodeContext(), RegistryImpl_Stub::lookup(), RegistryImpl_Stub::rebind(), RegistryImpl_Skel::send(), JRMIReferenceImpl_Skel::send(), and RegistryImpl_Stub::unbind().


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