public abstract class AbstractStatefulDecoder extends Object implements StatefulDecoder
Constructor and Description |
---|
AbstractStatefulDecoder()
Creates a stateful decoder where the callback and monitor must be set.
|
AbstractStatefulDecoder(DecoderCallback cb)
Creates a stateful decoder with a callback.
|
AbstractStatefulDecoder(DecoderCallback cb,
DecoderMonitor monitor)
Creates a stateful decoder.
|
AbstractStatefulDecoder(DecoderMonitor monitor)
Creates a stateful decoder with a monitor but no callback.
|
Modifier and Type | Method and Description |
---|---|
protected void |
decodeOccurred(Object decoded)
Notifies via the callback if one has been set that this decoder has
decoded a unit of encoded data.
|
protected DecoderMonitor |
getDecoderMonitor()
Gets the decoder's monitor.
|
void |
setCallback(DecoderCallback cb)
Sets the callback for this StatefulDecoder.
|
void |
setDecoderMonitor(DecoderMonitor monitor)
Monitors all kinds of events that occur during processing.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decode
public AbstractStatefulDecoder()
public AbstractStatefulDecoder(DecoderCallback cb)
cb
- the callback to use for this decoderpublic AbstractStatefulDecoder(DecoderMonitor monitor)
monitor
- the monitor to use for this decoderpublic AbstractStatefulDecoder(DecoderCallback cb, DecoderMonitor monitor)
cb
- the callback to use for this decodermonitor
- the monitor to use for this decoderpublic void setCallback(DecoderCallback cb)
StatefulDecoder
setCallback
in interface StatefulDecoder
cb
- the callback to inform of a complete decode operationpublic void setDecoderMonitor(DecoderMonitor monitor)
StatefulDecoder
setDecoderMonitor
in interface StatefulDecoder
monitor
- to set for this StatefulDecoderprotected void decodeOccurred(Object decoded)
decoded
- the decoded byproduct.protected DecoderMonitor getDecoderMonitor()
Copyright © 2003–2015 The Apache Software Foundation. All rights reserved.