use of org.webpieces.javasm.api.Memento in project webpieces by deanhiller.
the class Level5AStates method fireToStatemachineImpl.
private void fireToStatemachineImpl(Stream stream, Http2Event event) {
Memento currentState = stream.getCurrentState();
State old = currentState.getCurrentState();
State result = stateMachine.fireEvent(currentState, event);
log.info(logId + "done firing evt=" + event + " " + old + " -> " + result);
}
use of org.webpieces.javasm.api.Memento in project webpieces by deanhiller.
the class Level5ClientStateMachine method createStream.
private ClientStream createStream(int streamId, ResponseHandler responseListener) {
Memento initialState = createStateMachine("stream" + streamId);
long localWindowSize = localSettings.getInitialWindowSize();
long remoteWindowSize = remoteSettings.getInitialWindowSize();
ClientStream stream = new ClientStream(logId, streamId, initialState, responseListener, localWindowSize, remoteWindowSize);
streamState.create(stream);
return stream;
}
use of org.webpieces.javasm.api.Memento in project webpieces by deanhiller.
the class Level5ServerStateMachine method createPushStream.
private ServerPushStream createPushStream(PushStreamHandleImpl handle, int streamId) {
Memento initialState = createStateMachine("stream" + streamId);
long localWindowSize = localSettings.getInitialWindowSize();
long remoteWindowSize = remoteSettings.getInitialWindowSize();
ServerPushStream stream = new ServerPushStream(logId, handle, streamId, initialState, localWindowSize, remoteWindowSize);
streamState.create(stream);
return stream;
}
use of org.webpieces.javasm.api.Memento in project webpieces by deanhiller.
the class Level5ServerStateMachine method createStream.
private ServerStream createStream(int streamId) {
Memento initialState = createStateMachine("stream" + streamId);
long localWindowSize = localSettings.getInitialWindowSize();
long remoteWindowSize = remoteSettings.getInitialWindowSize();
ServerStream stream = new ServerStream(logId, streamId, initialState, localWindowSize, remoteWindowSize);
streamState.create(stream);
return stream;
}
use of org.webpieces.javasm.api.Memento in project webpieces by deanhiller.
the class Level5ClientStateMachine method createPushStream.
private ClientPushStream createPushStream(int streamId, ResponseHandler responseListener) {
Memento initialState = createStateMachine("stream" + streamId);
long localWindowSize = localSettings.getInitialWindowSize();
long remoteWindowSize = remoteSettings.getInitialWindowSize();
ClientPushStream stream = new ClientPushStream(logId, streamId, initialState, responseListener, localWindowSize, remoteWindowSize);
streamState.create(stream);
return stream;
}