|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.io.OutputStream
|
+--org.objectweb.jeremie.libs.presentation.std.StdMarshallerFactory.StdMarshaller
StdMarshaller is an (abstract) implementation of Marshaller.
| Field Summary | |
protected Context |
context
|
protected Chunk |
current
|
protected Chunk |
first
|
protected int |
offset
|
protected org.objectweb.jeremie.libs.presentation.std.StdMarshallerFactory.JRMIOutputStream |
os
|
protected int |
top
|
| Constructor Summary | |
StdMarshallerFactory.StdMarshaller()
|
|
| Method Summary | |
void |
close()
This method causes the message to lose all its references to the underlying chunks, and release each
of them. |
Context |
getContext()
Returns a Context associated with this marshaller. |
int |
getOffset()
Returns the current offset in the message, i.e., the position in the message at which the next byte will be written. |
Chunk |
getState()
Returns the state of the message as a (chain of) chunk(s). |
OutputStream |
outputStream()
Returns an output stream to write into the message. |
protected void |
prepare()
|
void |
reset()
This method causes the message to lose all its references to the underlying chunks, without releasing
them. |
boolean |
sameContents(Marshaller other)
Checks if the target marshaller and the provided one have the same contents, i.e., they contain the same bits. |
void |
setOffset(int off)
Sets the offset in the message. |
void |
write(byte[] array,
int off,
int len)
Writes 'len' bytes from the specified byte array starting at offset 'off' to this output message. |
void |
write(Chunk chunk)
Writes a chunk in the message. |
void |
write(int b)
Writes the specified byte to this message. |
void |
writeBoolean(boolean v)
Writes a boolean in a message. |
void |
writeByte(byte v)
Writes a byte in a message. |
void |
writeByteArray(byte[] array,
int off,
int len)
Writes an array of bytes in a message. |
void |
writeChar8(char v)
Writes a char in a message. |
void |
writeException(Exception ex)
Writes an exception thrown by a remote method invocation to an underlying stream. |
void |
writeMethod(Method method)
Writes the method in a remote method invocation to an underlying stream. |
void |
writeParameters(Object[] params)
Writes the arguments in a remote method invocation to an underlying stream. |
void |
writeReference(Object value)
Method used by stubs when they need to send interfaces references. |
void |
writeResult(Object result)
Writes the result of a remote method invocation to an underlying stream. |
void |
writeString8(String str)
Writes a string in a message. |
void |
writeValue(Object value)
Writes a value in the marshaller. |
| Methods inherited from class java.io.OutputStream |
flush, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.objectweb.jonathan.apis.presentation.Marshaller |
isLittleEndian, writeChar16, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeString16 |
| Field Detail |
protected Chunk first
protected Chunk current
protected int offset
protected int top
protected org.objectweb.jeremie.libs.presentation.std.StdMarshallerFactory.JRMIOutputStream os
protected Context context
| Constructor Detail |
public StdMarshallerFactory.StdMarshaller()
| Method Detail |
public void write(Chunk chunk)
MarshallerThe 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.
write in interface Marshallerorg.objectweb.jonathan.apis.presentation.Marshallerchunk - the chunk to be written.public Chunk getState()
Marshaller
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.
getState in interface Marshallerorg.objectweb.jonathan.apis.presentation.Marshallerpublic int getOffset()
MarshallergetOffset in interface Marshallerorg.objectweb.jonathan.apis.presentation.Marshallerpublic void setOffset(int off)
MarshallerThis method may be used to override data already written into the message.
setOffset in interface Marshallerorg.objectweb.jonathan.apis.presentation.Marshalleroffset - the new offset.public void reset()
Marshallerreleasing
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.reset in interface Marshallerpublic void close()
Marshallerrelease each
of them. It also released the context.close in interface Marshallerclose in class OutputStreampublic OutputStream outputStream()
MarshalleroutputStream in interface Marshallerorg.objectweb.jonathan.apis.presentation.Marshallerpublic final Context getContext()
MarshallerContext associated with this marshaller.getContext in interface Marshallerorg.objectweb.jonathan.apis.presentation.MarshallerContext associated with this marshaller.public final boolean sameContents(Marshaller other)
MarshallersameContents in interface Marshallerorg.objectweb.jonathan.apis.presentation.Marshallermarshaller - a marshaller;
public void writeByte(byte v)
throws JonathanException
writeByte in interface Marshallerv - a byte;JonathanException - if an error occurs.
public void writeBoolean(boolean v)
throws JonathanException
writeBoolean in interface Marshallerv - a boolean;JonathanException - if an error occurs.
public void writeChar8(char v)
throws JonathanException
writeChar8 in interface Marshallerv - a char;JonathanException - if an error occurs.
public void writeString8(String str)
throws JonathanException
writeString8 in interface Marshallerstr - a string;JonathanException - if an error occurs.
public final void writeReference(Object value)
throws JonathanException
writeReference in interface Marshallerexp - the surrogate that must be sent;
public final void writeValue(Object value)
throws JonathanException
MarshallerwriteValue in interface Marshallerorg.objectweb.jonathan.apis.presentation.Marshallerobj - an objectJonathanException - if a marshal error occurred.
public void writeByteArray(byte[] array,
int off,
int len)
throws JonathanException
writeByteArray in interface Marshallerarray - an array of bytes;JonathanException - if an error occurs.
public final void write(int b)
throws IOException
This method calls the write(byte) method.
write in class OutputStreamb - the byte.IOException - if no buffer to write to could be obtained.
public final void write(byte[] array,
int off,
int len)
throws IOException
write in class OutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.
public void writeMethod(Method method)
throws MarshalException
JRMIMarshallerwriteMethod in interface JRMIMarshallerorg.objectweb.jeremie.apis.presentation.JRMIMarshallerm - the method to be written.MarshalException - if something goes wrong.
public void writeParameters(Object[] params)
throws MarshalException
JRMIMarshallerwriteParameters in interface JRMIMarshallerorg.objectweb.jeremie.apis.presentation.JRMIMarshallerp - the objects representing the arguments.MarshalException - if something goes wrong.
public void writeResult(Object result)
throws MarshalException
JRMIMarshallerwriteResult in interface JRMIMarshallerorg.objectweb.jeremie.apis.presentation.JRMIMarshallero - the object representing the result.MarshalException - if something goes wrong.
public void writeException(Exception ex)
throws MarshalException
JRMIMarshallerwriteException in interface JRMIMarshallerorg.objectweb.jeremie.apis.presentation.JRMIMarshallere - the thrown exception.MarshalException - if something goes wrong.
protected void prepare()
throws JonathanException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||