|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.eventd.adaptors.tcp.TcpStreamHandler
Provides the logic and context of execution necessary to actually process a client's event XML document. When a new stream handler is created and assigned to an execution context it will unmarshall the remote document. The events from the remote document are then passed to the registered event handlers. All successfully processed events are acknowledged to the client by the generation of an XML event receipt.
Field Summary | |
private java.net.Socket |
m_connection
The socket connection to receive and process events from. |
private java.lang.Thread |
m_context
The thread context this runnable is executing in |
private java.util.List |
m_handlers
The registered list of event handlers. |
private Fiber |
m_parent
The parent of this stream handler. |
private int |
m_recsPerConn
The number of records per connection |
private boolean |
m_stop
Set to stop the thread context. |
Constructor Summary | |
(package private) |
TcpStreamHandler(Fiber parent,
java.net.Socket sock,
java.util.List handlers,
int number)
Constructs a new TCP/IP stream handler to process the remote document. |
Method Summary | |
(package private) boolean |
isAlive()
Returns true if the context is alive. |
void |
run()
The main execution context for processing a remote XML document. |
(package private) void |
stop()
Stops and joins the context. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.List m_handlers
private volatile boolean m_stop
private Fiber m_parent
private java.net.Socket m_connection
private java.lang.Thread m_context
private int m_recsPerConn
Constructor Detail |
TcpStreamHandler(Fiber parent, java.net.Socket sock, java.util.List handlers, int number)
parent
- The parent fibersock
- The socket connectionhandlers
- The list of event handlers.number
- The number of event records to processMethod Detail |
boolean isAlive()
void stop() throws java.lang.InterruptedException
java.lang.InterruptedException
public void run()
run
in interface java.lang.Runnable
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |