Package org.graphstream.stream.binary
Interface ByteEncoder
- All Superinterfaces:
AttributeSink,ElementSink,Sink
- All Known Implementing Classes:
NetStreamEncoder
public interface ByteEncoder extends Sink
Define an encoder that transform received events into a binary buffer.
A ByteEncoder is a sink that will produce a
ByteBuffer from each
received event. Then these buffer can be sent to an end-point using a
ByteEncoder.Transport.
This is a generic way to define the encoding of events into bytes buffer. The
main protocol used in GraphStream to do such things is NetStream, with is
dedicated encoder NetStreamEncoder.- Since:
- 31/01/16.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceByteEncoder.TransportDefine the object that will be called after an event has been transformed into a binary buffer. -
Method Summary
Modifier and Type Method Description voidaddTransport(ByteEncoder.Transport transport)Add a new transport to this encoder.voidremoveTransport(ByteEncoder.Transport transport)Remove an existing transport from this encoder.Methods inherited from interface org.graphstream.stream.AttributeSink
edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemovedMethods inherited from interface org.graphstream.stream.ElementSink
edgeAdded, edgeRemoved, graphCleared, nodeAdded, nodeRemoved, stepBegins
-
Method Details
-
addTransport
Add a new transport to this encoder.- Parameters:
transport- the new transport
-
removeTransport
Remove an existing transport from this encoder.- Parameters:
transport- the transport to remove
-