org.fudgemsg
Class FudgeMsgEnvelope

java.lang.Object
  extended by org.fudgemsg.FudgeMsgEnvelope
All Implemented Interfaces:
Serializable

public class FudgeMsgEnvelope
extends Object
implements Serializable

An envelope enclosing the top message in the Fudge system.

When Fudge communicates it typically uses an envelope to wrap the top message. The envelope is only used at the top level and cannot be embedded in a message. The additional envelope data includes a version number and processing directives.

This class makes no guarantees about the immutability or thread-safety of its content, although it holds the references in an immutable and thread-safe way.

See Also:
Serialized Form

Constructor Summary
FudgeMsgEnvelope(FudgeFieldContainer message)
          Creates an envelope wrapping the given message.
FudgeMsgEnvelope(FudgeFieldContainer message, int version)
          Creates an envelope wrapping the given message with a version.
FudgeMsgEnvelope(FudgeFieldContainer message, int version, int processingDirectives)
          Creates an envelope wrapping the given message with a version and processing directive flags.
 
Method Summary
 FudgeFieldContainer getMessage()
          Gets the underlying message.
 int getProcessingDirectives()
          Gets the processing directive flags.
 int getVersion()
          Gets the version number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FudgeMsgEnvelope

public FudgeMsgEnvelope(FudgeFieldContainer message)
Creates an envelope wrapping the given message. No version or processing directives are used.

Parameters:
message - the message to wrap, not null

FudgeMsgEnvelope

public FudgeMsgEnvelope(FudgeFieldContainer message,
                        int version)
Creates an envelope wrapping the given message with a version. No processing directives are used.

Parameters:
message - the message to wrap, not null
version - the version, from 0 to 255

FudgeMsgEnvelope

public FudgeMsgEnvelope(FudgeFieldContainer message,
                        int version,
                        int processingDirectives)
Creates an envelope wrapping the given message with a version and processing directive flags.

Parameters:
message - the message to wrap, not null
version - the version, from 0 to 255
processingDirectives - the processing directive flags, from 0 to 255
Method Detail

getMessage

public FudgeFieldContainer getMessage()
Gets the underlying message.

Returns:
the message, not null

getVersion

public int getVersion()
Gets the version number.

Returns:
the version

getProcessingDirectives

public int getProcessingDirectives()
Gets the processing directive flags.

Returns:
processing directive flags


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