com.mindtree.techworks.insight.receiver
Class LogInterpreter

java.lang.Object
  extended by com.mindtree.techworks.insight.receiver.LogInterpreter

public class LogInterpreter
extends java.lang.Object

The LogInterpreter class is an abstraction of functionality which is used for creating log events out of the given resource.

Version:
$Revision: 27 $ $Date: 2007-12-16 04:58:03 -0700 (Sun, 16 Dec 2007) $
Author:
Shailesh Sinha

Constructor Summary
LogInterpreter(LogNamespace logNamespace)
          Creates an Instace of this class using the specified ReceiverFormat and Source String
 
Method Summary
 ReceiverFormat[] getReceiverFormat()
           
 java.lang.String getSourceString()
           
 LogEvent[] parseLogMessage(java.lang.String line)
          This method tries to convert a line to Log event.
 void setLogNamespace(LogNamespace logNamespace)
          Sets the log namespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogInterpreter

public LogInterpreter(LogNamespace logNamespace)
Creates an Instace of this class using the specified ReceiverFormat and Source String

Parameters:
logNamespace - The namespace to use for this interpreter
Method Detail

parseLogMessage

public LogEvent[] parseLogMessage(java.lang.String line)
This method tries to convert a line to Log event. A single line can be interpreted as multiple log events , so it returns an array of Log Events.

Parameters:
line - Line which needs to be converted to LogEvent.
Returns:
Array of Log Events.

setLogNamespace

public void setLogNamespace(LogNamespace logNamespace)
Sets the log namespace. This method is added to help the RemoteProtocolStreamReceiver as it might receive the startup message later than the first message from a source.

Parameters:
logNamespace -

getReceiverFormat

public ReceiverFormat[] getReceiverFormat()
Returns:
Returns the receiverFormat.

getSourceString

public java.lang.String getSourceString()
Returns:
Returns the sourceString.


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