|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
com.mindtree.techworks.insight.receiver.AbstractReceiver
com.mindtree.techworks.insight.receiver.RemoteProtocolStreamReceiver
public class RemoteProtocolStreamReceiver
This is a concrete implementation of the
com.mindtree.techworks.insight.receiver.AbstractReceiver class. It
supports listening on an UDP port and receiving log events in the form of
DataPackets as defined in
com.mindtree.techworks.insight.remoteprotocol.spi.DataPacket.
This class supports receiving from multiple namespaces at the same time, and also from multiple sources at the same time.
AbstractReceiver,
DataPacket| Nested Class Summary | |
|---|---|
protected class |
RemoteProtocolStreamReceiver.SourceDetails
Inner class to hold the different objects in relation to a particular source including the LogNamespace,
LogInterpreter (including the ReceiverFormat)
and if a startup message has been received for this source. |
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected java.util.LinkedList |
packetQueue
The queue containing all packets that are read. |
protected int |
portListeningOn
The port on which the receiver is listening |
| 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 | |
|---|---|
RemoteProtocolStreamReceiver(ReceiverFormat[] receiverFormat,
int portListeningOn)
Creates an instance of the Receiver |
|
| Method Summary | |
|---|---|
protected void |
deInitialize()
Informs this AbstractReceiver to reset itself. |
LogNamespace[] |
getNamespaces()
Returns the LogNamespace that this AbstractReceiver was initialized with |
protected LogEvent[] |
getNextEvents()
Gets null or the next LoggingEvent(s) processed by this receiver |
protected boolean |
hasMoreEvents()
Determines if this receiver has any more events to process |
protected void |
initialize(LogNamespace namespace,
boolean isTailing)
Initializes this instance. |
boolean |
isTailing()
Always returns true since the RemoteProtocolStreamReceiver
is by nature tailing. |
| 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 |
| Field Detail |
|---|
protected java.util.LinkedList packetQueue
protected int portListeningOn
| Constructor Detail |
|---|
public RemoteProtocolStreamReceiver(ReceiverFormat[] receiverFormat,
int portListeningOn)
throws ReceiverInitializationException
receiverFormat - The Receiver format used for the receiver.portListeningOn - The port on which to listen.
ReceiverInitializationException - If the Receiver could not be initialized properly.| Method Detail |
|---|
public LogNamespace[] getNamespaces()
AbstractReceiver
getNamespaces in class AbstractReceiverAbstractReceiver.getNamespaces()public boolean isTailing()
true since the RemoteProtocolStreamReceiver
is by nature tailing.
isTailing in class AbstractReceiverAbstractReceiver.isTailing()
protected void initialize(LogNamespace namespace,
boolean isTailing)
throws ReceiverInitializationException
initialize in class AbstractReceivernamespace - the LogNamespace that this AbstractReceiver will process events fromisTailing - determines if this AbstractReceiver tails the specified LogNamespace
ReceiverInitializationException - if any problems occurs during the initialization of receiver.AbstractReceiver.initialize(com.mindtree.techworks.insight.spi.LogNamespace,
boolean)protected void deInitialize()
AbstractReceiver
deInitialize in class AbstractReceiverAbstractReceiver.deInitialize()protected LogEvent[] getNextEvents()
AbstractReceiver
getNextEvents in class AbstractReceiverAbstractReceiver.getNextEvents()protected boolean hasMoreEvents()
AbstractReceiver
hasMoreEvents in class AbstractReceiverAbstractReceiver.hasMoreEvents()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||