This filter allows to register it as an output for some source of events in a source thread (hereafter called the input thread) and to register listening outputs in a destination thread (hereafter called the sink thread).
| Source ---> ThreadProxyFilter ----> Sink Thread 1 | Thread 2 |
In other words, this class allows to listen in a sink thread graph events that are produced in another source thread without any explicit synchronization on the source of events.
The only restriction is that the sink thread must regularly call the {@link #pump()} method to dispatch events coming from the source to all sinksregistered (see the explanation in {@link org.graphstream.stream.ProxyPipe}).
You can register any kind of input as source of event, but if the input is a graph, then you can choose to "replay" all the content of the graph so that at the other end of the filter, all outputs receive the complete content of the graph. This is the default behavior if this filter is constructed with a graph as input.
|
|