gov.nist.antd.merlin.protocol.sample
Class SimpleProtocolHeader

java.lang.Object
  |
  +--SSF.OS.ProtocolMessage
        |
        +--gov.nist.antd.merlin.protocol.sample.SimpleProtocolHeader

public class SimpleProtocolHeader
extends ProtocolMessage

This class represents the header for the protocol SimpleProtocol.

 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  java.lang.String message
          Message send
 
Fields inherited from class SSF.OS.ProtocolMessage
 
Constructor Summary
SimpleProtocolHeader(java.lang.String message)
          Default constructor
 
Method Summary
 int bytecount()
          Returns the total number of bytes in this packet.
 java.lang.String getMessage()
          Get the attached message
 void setMessage(java.lang.String message)
          set the message to send
 java.lang.String toString()
          Return the message type and message as string
 
Methods inherited from class SSF.OS.ProtocolMessage
carryPayload, copy, dropHeader, dropPayload, frombytes, fromVersion, header_bytecount, payload, previous, size, tobytes, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

message

private java.lang.String message
Message send

Constructor Detail

SimpleProtocolHeader

public SimpleProtocolHeader(java.lang.String message)
Default constructor

Parameters:
message - The message to be sent.
Method Detail

toString

public java.lang.String toString()
Return the message type and message as string

Overrides:
toString in class java.lang.Object
Returns:
The message type and message as string.

bytecount

public int bytecount()
Returns the total number of bytes in this packet.

Overrides:
bytecount in class ProtocolMessage
Returns:
the size of the message.

setMessage

public void setMessage(java.lang.String message)
set the message to send

Parameters:
message - The message to attach

getMessage

public java.lang.String getMessage()
Get the attached message

Returns:
The attached message