Package org.bidib.jbidibc.debug
Class DebugMessageReceiver
- java.lang.Object
-
- org.bidib.jbidibc.debug.DebugMessageReceiver
-
- All Implemented Interfaces:
DebugMessageProcessor
public class DebugMessageReceiver extends Object implements DebugMessageProcessor
-
-
Field Summary
Fields Modifier and Type Field Description protected AtomicBooleanrunning
-
Constructor Summary
Constructors Constructor Description DebugMessageReceiver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMessageListener(DebugMessageListener listener)static StringbytesToStringUTFCustom(byte[] bytes)voiddisable()Disable the message processor.voidenable()Enable the message processor.voidprocessMessages(ByteArrayOutputStream output)Process the messages in the provided byte array output stream.protected voidpublishMessage(String message)voidremoveMessageListener(DebugMessageListener listener)
-
-
-
Field Detail
-
running
protected AtomicBoolean running
-
-
Method Detail
-
addMessageListener
public void addMessageListener(DebugMessageListener listener)
-
removeMessageListener
public void removeMessageListener(DebugMessageListener listener)
-
processMessages
public void processMessages(ByteArrayOutputStream output)
Description copied from interface:DebugMessageProcessorProcess the messages in the provided byte array output stream.- Specified by:
processMessagesin interfaceDebugMessageProcessor- Parameters:
output- the output stream that contains the messages
-
publishMessage
protected void publishMessage(String message)
-
disable
public void disable()
Description copied from interface:DebugMessageProcessorDisable the message processor.- Specified by:
disablein interfaceDebugMessageProcessor
-
enable
public void enable()
Description copied from interface:DebugMessageProcessorEnable the message processor.- Specified by:
enablein interfaceDebugMessageProcessor
-
bytesToStringUTFCustom
public static String bytesToStringUTFCustom(byte[] bytes)
-
-