Search in sources :

Example 1 with Memento

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);
}
Also used : Memento(org.webpieces.javasm.api.Memento) State(org.webpieces.javasm.api.State)

Example 2 with Memento

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;
}
Also used : Memento(org.webpieces.javasm.api.Memento)

Example 3 with Memento

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;
}
Also used : Memento(org.webpieces.javasm.api.Memento)

Example 4 with Memento

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;
}
Also used : Memento(org.webpieces.javasm.api.Memento)

Example 5 with Memento

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;
}
Also used : Memento(org.webpieces.javasm.api.Memento)

Aggregations

Memento (org.webpieces.javasm.api.Memento)5 State (org.webpieces.javasm.api.State)1