Package org.graphstream.stream
Interface Source
- All Known Subinterfaces:
ByteDecoder,FileSource,Graph,Layout,Pipe,ProxyPipe,Replayable.Controller,URLSource
- All Known Implementing Classes:
AbstractGraph,AdjacencyListGraph,AttributePipe,BarnesHutLayout,ByteProxy,DefaultGraph,FileSinkGEXF2,FileSourceBase,FileSourceDGS,FileSourceDGS1And2,FileSourceDOT,FileSourceEdge,FileSourceGEXF,FileSourceGML,FileSourceGPX,FileSourceGraphML,FileSourceLGL,FileSourceNCol,FileSourcePajek,FileSourceParser,FileSourceTLP,FileSourceXML,GEXF,GraphicGraph,GraphListeners,GraphReplay,LinLog,MultiGraph,NetStreamDecoder,OldFileSourceDGS,PipeAdapter,PipeBase,RMISource,SingleGraph,SourceAdapter,SourceBase,SpringBox,ThreadProxyPipe,Timeline,ViewerPipe
public interface Source
Source of graph events.
An source is something that produces graph events (attributes and elements), but does not contain a graph instance.
-
Method Summary
Modifier and Type Method Description voidaddAttributeSink(AttributeSink sink)Add a sink for attribute events only.voidaddElementSink(ElementSink sink)Add a sink for elements events only.voidaddSink(Sink sink)Add a sink for all graph events (attributes and graph elements) coming from this source.voidclearAttributeSinks()Remove all listener attribute sinks.voidclearElementSinks()Remove all listener element sinks.voidclearSinks()Remove all listener sinks.voidremoveAttributeSink(AttributeSink sink)Remove an attribute sink.voidremoveElementSink(ElementSink sink)Remove an element sink.voidremoveSink(Sink sink)Remove a sink.
-
Method Details
-
addSink
Add a sink for all graph events (attributes and graph elements) coming from this source. This is similar to registering a sink for attributes an another for elements.- Parameters:
sink- The sink to register.
-
removeSink
Remove a sink.- Parameters:
sink- The sink to remove, if it does not exist, this is ignored silently.
-
addAttributeSink
Add a sink for attribute events only. Attribute events include attribute addition change and removal.- Parameters:
sink- The sink to register.
-
removeAttributeSink
Remove an attribute sink.- Parameters:
sink- The sink to remove, if it does not exist, this is ignored silently.
-
addElementSink
Add a sink for elements events only. Elements events include, addition and removal of nodes and edges, as well as step events.- Parameters:
sink- The sink to register.
-
removeElementSink
Remove an element sink.- Parameters:
sink- The sink to remove, if it does not exist, this is ignored silently.
-
clearElementSinks
void clearElementSinks()Remove all listener element sinks. -
clearAttributeSinks
void clearAttributeSinks()Remove all listener attribute sinks. -
clearSinks
void clearSinks()Remove all listener sinks.
-