gov.nist.antd.ssf.os
Class MessageWrapper

java.lang.Object
  |
  +--gov.nist.antd.ssf.os.MessageWrapper

public class MessageWrapper
extends java.lang.Object

This class is used to schedule ProtocolMessages without loosing the information of the originated ProtocolSession. This class represents a wrapper that contains both, the ProtocolMessage and the ProtocolSession.

 This class was developed at the National Institute of Standards and
 Technology by employees of the Federal Government in the course of
 their official duties. Pursuant to title 17 Section 105 of the United
 States Code this software is not subject to copyright protection and
 is in the public domain.
NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.

Author:
borchert
, rouil

Field Summary
private  ProtocolSession fromSession
          The session that provided the protocol message.
private  ProtocolMessage message
          The protocol message itself.
 
Constructor Summary
MessageWrapper(ProtocolMessage msg, ProtocolSession fromSession)
          Creates the protocol wrapper.
 
Method Summary
 ProtocolSession getFromSession()
          Returns the session the messag came from.
 ProtocolMessage getMessage()
          The message itself.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fromSession

private final ProtocolSession fromSession
The session that provided the protocol message.


message

private final ProtocolMessage message
The protocol message itself.

Constructor Detail

MessageWrapper

public MessageWrapper(ProtocolMessage msg,
                      ProtocolSession fromSession)
Creates the protocol wrapper.

Parameters:
msg - The ProtocolMessage itself.
fromSession - The ProtcolMessage that send the message.
Method Detail

getMessage

public final ProtocolMessage getMessage()
The message itself.

Returns:
The ProtocolMessage.

getFromSession

public final ProtocolSession getFromSession()
Returns the session the messag came from.

Returns:
The originating protocol message.