|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opcfoundation.ua.utils.AbstractState<BufferMonitorState,IOException>
org.opcfoundation.ua.utils.asyncsocket.BufferMonitor
public abstract class BufferMonitor
BufferMonitor is a monitor that triggers when a specific position is reached. The position to monitor in AsyncSocketInputStream is the number of bytes received (buffered, not read) and in AsyncSocketOutputStream the number of bytes flushed to TCP Stack.
User can set event listeners or wait for a state change. E.g. // Block until stream has buffered 1000 bytes inputStream. createAlarm(inputStream.getPosition() + 1000, null). waitForState(AlarmState.FINAL_STATES);
| Method Summary | |
|---|---|
void |
cancel()
cancel. |
int |
compareTo(BufferMonitor o)
|
long |
getTriggerPos()
Getter for the field triggerPos. |
protected void |
setError(IOException e)
setError. |
| Methods inherited from class org.opcfoundation.ua.utils.AbstractState |
|---|
addStateListener, addStateNotifiable, assertNoError, attemptSetState, clearError, getError, getState, hasError, isStateTransitionAllowed, onListenerException, onStateTransition, removeStateListener, removeStateNotifiable, setState, setState, waitForState, waitForState, waitForStateUninterruptibly |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public long getTriggerPos()
Getter for the field triggerPos.
public int compareTo(BufferMonitor o)
compareTo in interface Comparable<BufferMonitor>public void cancel()
cancel.
protected void setError(IOException e)
setError.
setError in class AbstractState<BufferMonitorState,IOException>e - a IOException object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||