com.mindtree.techworks.insight.remoteprotocol.spi
Class LogMessageDataContent

java.lang.Object
  extended by com.mindtree.techworks.insight.remoteprotocol.spi.PacketDataContent
      extended by com.mindtree.techworks.insight.remoteprotocol.spi.LogMessageDataContent
All Implemented Interfaces:
java.io.Serializable

public class LogMessageDataContent
extends PacketDataContent

This the data content of a data packet containig log data. The class provides methods to retrieve the data as a String and also set the data as string. It takes care of setting the byte array representing the data.

Version:
$Revision: 1.2 $ $Date: 2005/08/09 18:39:16 $
Author:
Bindul Bhowmik
See Also:
PacketDataContent, Serialized Form

Field Summary
 
Fields inherited from class com.mindtree.techworks.insight.remoteprotocol.spi.PacketDataContent
MAX_PACKET_DATA_SIZE, messageType, packetData
 
Constructor Summary
LogMessageDataContent()
          Creates an instance of LogMessageDataContent object.
LogMessageDataContent(byte[] completePacketData, PacketHeader packetHeader)
          Creates an instance of LogMessageDataContent object
 
Method Summary
 java.lang.String getLogMessage()
          Returns the log message as a string.
 void setLogMessage(java.lang.String logMessage)
          Sets the log message in the packet data.
 
Methods inherited from class com.mindtree.techworks.insight.remoteprotocol.spi.PacketDataContent
checkPacketDataSize, getLength, getMessageType, getPacketData, setMessageType, setPacketData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogMessageDataContent

public LogMessageDataContent()
Creates an instance of LogMessageDataContent object.

See Also:
PacketDataContent.PacketDataContent()

LogMessageDataContent

public LogMessageDataContent(byte[] completePacketData,
                             PacketHeader packetHeader)
                      throws RemoteProtocolException
Creates an instance of LogMessageDataContent object

Parameters:
completePacketData - The data for the complete packet.
packetHeader - The header for the packet
Throws:
RemoteProtocolException - If the message type in the PacketHeader is not MessageType#LOG_DATA_MESSAGE
See Also:
PacketDataContent.PacketDataContent(byte[], PacketHeader)
Method Detail

getLogMessage

public java.lang.String getLogMessage()
                               throws RemoteProtocolException
Returns the log message as a string.

Returns:
The log message as a string
Throws:
RemoteProtocolException - If the log message cannot be decoded.

setLogMessage

public void setLogMessage(java.lang.String logMessage)
                   throws PacketDataSizeOverLimitsException,
                          RemoteProtocolException
Sets the log message in the packet data.

Parameters:
logMessage - The log message to set.
Throws:
PacketDataSizeOverLimitsException - If the log data exceeds the max limit.
RemoteProtocolException - If the character stream cannot be encoded


Copyright © 2003-2008 MindTree Consulting Ltd.. All Rights Reserved.