com.mindtree.techworks.insight.receiver
Class FileStreamReceiver

java.lang.Object
  extended by java.lang.Thread
      extended by com.mindtree.techworks.insight.receiver.AbstractReceiver
          extended by com.mindtree.techworks.insight.receiver.FileStreamReceiver
All Implemented Interfaces:
ILogEventModelMutator, ReceiverInterpreter, java.lang.Runnable

public class FileStreamReceiver
extends AbstractReceiver

The FileStreamReceiver class is a concrete implementation of the AbstractReceiver class. It supports receiving and building events from files.

Version:
1.0, 05/07/07
Author:
Regunath B
See Also:
AbstractReceiver

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class com.mindtree.techworks.insight.receiver.AbstractReceiver
interpretedEventCount
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Fields inherited from interface com.mindtree.techworks.insight.receiver.ReceiverInterpreter
FAILURE, SUCCESS
 
Fields inherited from interface com.mindtree.techworks.insight.model.ILogEventModelMutator
FAILURE, NON_TAILING_MUTATOR, SUCCESS, TAILING_MUTATOR
 
Constructor Summary
FileStreamReceiver(LogNamespace namespace, boolean isTailing)
          Constructor for this class.
 
Method Summary
protected  void deInitialize()
          Overriden superclass method
 LogNamespace[] getNamespaces()
          Overriden superclass method
protected  LogEvent[] getNextEvents()
          Overriden superclass method
protected  boolean hasMoreEvents()
          Overriden superclass method
protected  void initialize(LogNamespace namespace, boolean isTailingReceiver)
          Overriden superclass method
 boolean isTailing()
          Overriden superclass method
 
Methods inherited from class com.mindtree.techworks.insight.receiver.AbstractReceiver
addAppender, addMutatorListener, addReceiverListener, removeAppender, removeMutatorListener, removeReceiverListener, run, shutdown, startup
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileStreamReceiver

public FileStreamReceiver(LogNamespace namespace,
                          boolean isTailing)
                   throws ReceiverInitializationException
Constructor for this class.

Parameters:
namespace - the LogNamespace that contains the file information to read events from
isTailing - true if the receiver must be a tailing receiver
Throws:
ReceiverInitializationException - if the receiver is not able to initialize.
Method Detail

getNamespaces

public LogNamespace[] getNamespaces()
Overriden superclass method

Specified by:
getNamespaces in class AbstractReceiver
Returns:
Returns the namespace.
See Also:
AbstractReceiver.getNamespaces()

isTailing

public boolean isTailing()
Overriden superclass method

Specified by:
isTailing in class AbstractReceiver
Returns:
the isTailing value specified during initialization
See Also:
AbstractReceiver.isTailing()

initialize

protected void initialize(LogNamespace namespace,
                          boolean isTailingReceiver)
                   throws ReceiverInitializationException
Overriden superclass method

Specified by:
initialize in class AbstractReceiver
Parameters:
namespace - the LogNamespace that this AbstractReceiver will process events from
isTailingReceiver - determines if this AbstractReceiver tails the specified LogNamespace
Throws:
ReceiverInitializationException - if any problems occurs during the initialization of receiver.
See Also:
AbstractReceiver.initialize(com.mindtree.techworks.insight.spi.LogNamespace, boolean)

deInitialize

protected void deInitialize()
Overriden superclass method

Specified by:
deInitialize in class AbstractReceiver
See Also:
AbstractReceiver.deInitialize()

getNextEvents

protected LogEvent[] getNextEvents()
Overriden superclass method

Specified by:
getNextEvents in class AbstractReceiver
Returns:
null or the LoggingEvent instance
See Also:
AbstractReceiver.getNextEvents()

hasMoreEvents

protected boolean hasMoreEvents()
Overriden superclass method

Specified by:
hasMoreEvents in class AbstractReceiver
Returns:
true if events exist in the log namespace for processing
See Also:
AbstractReceiver.hasMoreEvents()


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