org.fudgemsg.mapping
Class FudgeObjectWriter

java.lang.Object
  extended by org.fudgemsg.mapping.FudgeObjectWriter

public class FudgeObjectWriter
extends Object

Serialises Java objects to a target Fudge message stream.


Constructor Summary
FudgeObjectWriter(FudgeMsgWriter messageWriter)
          Creates a new FudgeObjectWriter around a FudgeMsgWriter.
 
Method Summary
 void close()
          Closes the underlying target stream.
 FudgeContext getFudgeContext()
          Returns the underlying FudgeContext.
 FudgeMsgWriter getMessageWriter()
          Returns the underlying message target.
 FudgeSerializationContext getSerialisationContext()
          Returns the current FudgeSerializationContext.
<T> void
write(T obj)
          Serialises a Java object to a Fudge message and writes it to the target stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FudgeObjectWriter

public FudgeObjectWriter(FudgeMsgWriter messageWriter)
Creates a new FudgeObjectWriter around a FudgeMsgWriter.

Parameters:
messageWriter - the target for Fudge messages
Method Detail

close

public void close()
Closes the underlying target stream.


getFudgeContext

public FudgeContext getFudgeContext()
Returns the underlying FudgeContext. This will be the context of the FudgeMsgWriter being used.

Returns:
the FudgeContext

getSerialisationContext

public FudgeSerializationContext getSerialisationContext()
Returns the current FudgeSerializationContext. This is associated with the same FudgeContext as the target message stream.

Returns:
the FudgeSerialisationContext

getMessageWriter

public FudgeMsgWriter getMessageWriter()
Returns the underlying message target.

Returns:
the FudgeMsgWriter

write

public <T> void write(T obj)
Serialises a Java object to a Fudge message and writes it to the target stream.

Type Parameters:
T - type of the Java object
Parameters:
obj - the object to write


Copyright 2009-Present by OpenGamma Inc. and individual contributors
Released under the Apache License, Version 2.0