|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
isc.sensor.SessionProcessor
public class SessionProcessor
Session Processors (TCP/UDP) manage the full state lifecyle of each session. This processor runs and controls it's own thread
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected long |
currentPacketTime
The current timer according to the packets |
protected java.lang.Object |
dbh
The instance of the output writer |
protected boolean |
finish
Flag to communicate the server exit status |
protected static org.apache.log4j.Logger |
log
log4j |
protected java.util.Hashtable |
packetDB
The hashtable that keep track of flows for each session |
protected static java.lang.String |
PROP_OUTPUTWRITERCLASS
Property to specity the class of the Session record output writer |
AppProperties |
props
Application properties |
protected java.util.Hashtable |
sessions
Hashtable to keep track of all open sessions |
protected SessionTimer |
sesTimer
The session timer object |
protected java.util.Vector |
sesWorkQueue
The work queue contains packets to be associated with session |
protected java.util.Vector |
workItem
The current item to be worked on |
protected java.lang.Boolean |
writeSession
Flag to control the writing out of sessions |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
SessionProcessor()
Create a new instance of the Session processor |
|
| Method Summary | |
|---|---|
void |
addCompletedSession(java.lang.String sessionKey)
SessionTimer will add completed session to this queue when they determine a session has ended |
protected void |
close()
Close the session output writer |
boolean |
finished()
Is the server shutting down |
java.util.Enumeration |
getActiveSessions()
Get an enumeration of all the inflight active sessions |
java.util.Vector |
getSessionPackets(java.lang.String key)
Get the packet flows associated with this session |
void |
notifyProc()
Notify this thread/mutex of an event |
protected void |
open()
Open the session output writer |
protected void |
processWorkItem()
Main work routine. |
void |
run()
|
void |
setFinish()
The server is going down. |
void |
updatePacketClock(long currentPacketTime)
Update the running packet timer with the time of the current packet |
protected void |
waitProc()
Mutex wait for a time/event |
| 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 long currentPacketTime
protected java.lang.Boolean writeSession
protected volatile java.util.Vector sesWorkQueue
protected volatile boolean finish
protected java.util.Vector workItem
protected volatile java.util.Hashtable sessions
protected java.util.Hashtable packetDB
protected static java.lang.String PROP_OUTPUTWRITERCLASS
protected static org.apache.log4j.Logger log
protected java.lang.Object dbh
protected SessionTimer sesTimer
public AppProperties props
| Constructor Detail |
|---|
public SessionProcessor()
| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void notifyProc()
protected void waitProc()
protected void processWorkItem()
protected void open()
protected void close()
public void addCompletedSession(java.lang.String sessionKey)
sessionKey - The session that endedpublic void setFinish()
public boolean finished()
public java.util.Vector getSessionPackets(java.lang.String key)
throws java.lang.Exception
key - The key to this session
java.lang.Exception - Flows not foundpublic void updatePacketClock(long currentPacketTime)
currentPacketTime - The time of the current packet in millisecondspublic java.util.Enumeration getActiveSessions()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||