public class DefaultNetStreamDecoder extends Object implements NetStreamDecoder
Constructor and Description |
---|
DefaultNetStreamDecoder() |
Modifier and Type | Method and Description |
---|---|
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.
|
public ThreadProxyPipe getStream(String name)
NetStreamDecoder
getStream
in interface NetStreamDecoder
name
- Identifier of the stream.public ThreadProxyPipe getDefaultStream()
NetStreamDecoder
getDefaultStream
in interface NetStreamDecoder
public void register(String name, ThreadProxyPipe stream) throws Exception
NetStreamDecoder
register
in interface NetStreamDecoder
name
- Filter only message with this name to the given message box.stream
- The ThreadProxyPipe to push the events to.Exception
- If another Pipe is already registered at the given name.public void decodeMessage(InputStream in) throws IOException
NetStreamDecoder
decodeMessage
in interface NetStreamDecoder
IOException
public void setDebugOn(boolean on)
NetStreamDecoder
setDebugOn
in interface NetStreamDecoder
Copyright © 2015. All rights reserved.