Added get/setState() to ReplayingDecoder
This commit is contained in:
parent
5bed9f4bc4
commit
e8b1a2862e
@ -247,6 +247,24 @@ public abstract class ReplayingDecoder<T extends Enum<T>> extends SimpleChannelH
|
||||
checkpoint = cumulation.readerIndex();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current state of this decoder.
|
||||
* @return the current state of this decoder
|
||||
*/
|
||||
protected T getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the current state of this decoder.
|
||||
* @return the old state of this decoder
|
||||
*/
|
||||
protected T setState(T newState) {
|
||||
T oldState = state;
|
||||
state = newState;
|
||||
return oldState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decodes the received packets so far into a frame.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user