org.graphstream.stream.netstream
Interface NetStreamDecoder

All Known Implementing Classes:
DefaultNetStreamDecoder, NetStreamReceiver

public interface NetStreamDecoder


Method Summary
 void decodeMessage(InputStream in)
          Decode one message.
 ThreadProxyPipe getDefaultStream()
          Gives the default stream (a ThreadProxyPipe) identified with the name "default".
 ThreadProxyPipe getStream(String name)
          Gives the stream (a ThreadProxyPipe) identified with this name.
 void register(String name, ThreadProxyPipe stream)
          Register a stream.
 void setDebugOn(boolean on)
          Enable or disable debugging.
 

Method Detail

getStream

ThreadProxyPipe getStream(String name)
Gives the stream (a ThreadProxyPipe) identified with this name. If no pipe exists under this name, a new one is created and returned

Parameters:
name - Identifier of the stream.
Returns:
the identified pipe

getDefaultStream

ThreadProxyPipe getDefaultStream()
Gives the default stream (a ThreadProxyPipe) identified with the name "default". It is created if it does not exist.

Returns:
the default pipe

register

void register(String name,
              ThreadProxyPipe stream)
              throws Exception
Register a stream. All events with the given stream name will be directed to it. The user has to ensure the ThreadProxyPipe can be safely written to by the Receiver's thread.

Parameters:
name - Filter only message with this name to the given message box.
stream - The ThreadProxyPipe to push the events to.
Throws:
Exception - If another Pipe is already registered at the given name.

decodeMessage

void decodeMessage(InputStream in)
                   throws IOException
Decode one message.

Throws:
IOException

setDebugOn

void setDebugOn(boolean on)
Enable or disable debugging.



Copyright © 2013. All Rights Reserved.