public class DefaultNetStreamDecoder extends Object implements NetStreamDecoder
Modifier and Type | Field and Description |
---|---|
protected ThreadProxyPipe |
currentStream
The current pipe commands are being written to.
|
protected boolean |
debug
Show debugging messages.
|
protected HashMap<String,ThreadProxyPipe> |
streams
Pairs (key,value) where the key is the listener ID and the value the MBox
of the listener.
|
Constructor and Description |
---|
DefaultNetStreamDecoder() |
protected boolean debug
protected ThreadProxyPipe currentStream
protected HashMap<String,ThreadProxyPipe> streams
register(String,ThreadProxyPipe)
public DefaultNetStreamDecoder()
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
protected void serve_EVENT_DEL_EDGE_ATTR(InputStream in)
in
- NetStreamConstants.EVENT_DEL_EDGE
protected void serve_EVENT_CHG_EDGE_ATTR(InputStream in)
NetStreamConstants.EVENT_CHG_EDGE_ATTR
protected void serve_EVENT_ADD_EDGE_ATTR(InputStream in)
NetStreamConstants.EVENT_ADD_EDGE_ATTR
protected void serve_EVENT_DEL_NODE_ATTR(InputStream in)
NetStreamConstants.EVENT_DEL_NODE_ATTR
protected void serve_EVENT_CHG_NODE_ATTR(InputStream in)
NetStreamConstants.EVENT_CHG_NODE_ATTR
protected void serve_EVENT_ADD_NODE_ATTR(InputStream in)
NetStreamConstants.EVENT_ADD_NODE_ATTR
protected void serve_EVENT_DEL_GRAPH_ATTR(InputStream in)
NetStreamConstants.EVENT_DEL_GRAPH_ATTR
protected void serve_EVENT_CHG_GRAPH_ATTR(InputStream in)
NetStreamConstants.EVENT_CHG_GRAPH_ATTR
protected void serve_EVENT_ADD_GRAPH_ATTR(InputStream in)
NetStreamConstants.EVENT_ADD_GRAPH_ATTR
protected void serve_EVENT_CLEARED(InputStream in)
NetStreamConstants.EVENT_CLEARED
protected void serve_EVENT_STEP(InputStream in)
NetStreamConstants.EVENT_STEP
protected void serve_EVENT_DEL_EDGE(InputStream in)
NetStreamConstants.EVENT_DEL_EDGE
protected void serve_EVENT_ADD_EDGE(InputStream in)
NetStreamConstants.EVENT_ADD_EDGE
protected void serve_DEL_NODE(InputStream in)
NetStreamConstants.DEL_NODE
protected void serve_EVENT_ADD_NODE(InputStream in)
NetStreamConstants.EVENT_ADD_NODE
protected int readType(InputStream in)
in
- protected Object readValue(InputStream in, int valueType)
protected Object[] readArray(InputStream in)
in
- protected String readString(InputStream in)
protected Boolean readBoolean(InputStream in)
protected Byte readByte(InputStream in)
protected long readUnsignedVarint(InputStream in)
protected long readVarint(InputStream in)
protected Short readShort(InputStream in)
protected Integer readInt(InputStream in)
protected Long readLong(InputStream in)
protected Float readFloat(InputStream in)
protected Double readDouble(InputStream in)
protected Integer[] readIntArray(InputStream in)
in
- IOException
protected Boolean[] readBooleanArray(InputStream in)
protected Byte[] readByteArray(InputStream in)
protected Double[] readDoubleArray(InputStream in)
protected Float[] readFloatArray(InputStream in)
protected Long[] readLongArray(InputStream in)
protected Short[] readShortArray(InputStream in)
public void setDebugOn(boolean on)
NetStreamDecoder
setDebugOn
in interface NetStreamDecoder
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses