Class EngineControlGrpc.EngineControlStub
java.lang.Object
io.grpc.stub.AbstractStub<EngineControlGrpc.EngineControlStub>
io.grpc.stub.AbstractAsyncStub<EngineControlGrpc.EngineControlStub>
io.camunda.zeebe.process.test.engine.protocol.EngineControlGrpc.EngineControlStub
- Enclosing class:
EngineControlGrpc
public static final class EngineControlGrpc.EngineControlStub
extends io.grpc.stub.AbstractAsyncStub<EngineControlGrpc.EngineControlStub>
A stub to allow clients to do asynchronous rpc calls to service EngineControl.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub
io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>> -
Method Summary
Modifier and TypeMethodDescriptionprotected EngineControlGrpc.EngineControlStubbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions) voidgetRecords(EngineControlOuterClass.GetRecordsRequest request, io.grpc.stub.StreamObserver<EngineControlOuterClass.RecordResponse> responseObserver) Get all records from the in-memory engine.voidincreaseTime(EngineControlOuterClass.IncreaseTimeRequest request, io.grpc.stub.StreamObserver<EngineControlOuterClass.IncreaseTimeResponse> responseObserver) Increases the engine time by a specific duration.voidresetEngine(EngineControlOuterClass.ResetEngineRequest request, io.grpc.stub.StreamObserver<EngineControlOuterClass.ResetEngineResponse> responseObserver) Resets the in-memory engine.voidstartEngine(EngineControlOuterClass.StartEngineRequest request, io.grpc.stub.StreamObserver<EngineControlOuterClass.StartEngineResponse> responseObserver) Starts the in-memory engine.voidstopEngine(EngineControlOuterClass.StopEngineRequest request, io.grpc.stub.StreamObserver<EngineControlOuterClass.StopEngineResponse> responseObserver) Stops the in-memory engine.voidwaitForBusyState(EngineControlOuterClass.WaitForBusyStateRequest request, io.grpc.stub.StreamObserver<EngineControlOuterClass.WaitForBusyStateResponse> responseObserver) Waits a given timeout for the engine to have reached a busy state.voidwaitForIdleState(EngineControlOuterClass.WaitForIdleStateRequest request, io.grpc.stub.StreamObserver<EngineControlOuterClass.WaitForIdleStateResponse> responseObserver) Waits for the engine to have reached an idle state.Methods inherited from class io.grpc.stub.AbstractAsyncStub
newStub, newStubMethods inherited from class io.grpc.stub.AbstractStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady
-
Method Details
-
build
protected EngineControlGrpc.EngineControlStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) - Specified by:
buildin classio.grpc.stub.AbstractStub<EngineControlGrpc.EngineControlStub>
-
startEngine
public void startEngine(EngineControlOuterClass.StartEngineRequest request, io.grpc.stub.StreamObserver<EngineControlOuterClass.StartEngineResponse> responseObserver) Starts the in-memory engine.
-
stopEngine
public void stopEngine(EngineControlOuterClass.StopEngineRequest request, io.grpc.stub.StreamObserver<EngineControlOuterClass.StopEngineResponse> responseObserver) Stops the in-memory engine.
-
resetEngine
public void resetEngine(EngineControlOuterClass.ResetEngineRequest request, io.grpc.stub.StreamObserver<EngineControlOuterClass.ResetEngineResponse> responseObserver) Resets the in-memory engine. This is done by recreating the engine entirely. The engine should be reset before executing the next test. This prevents the tests from influencing each other. Using this while running tests concurrently will still cause issues. This is because the first test will be using the engine, whilst the second test will reset it. Therefore, the data from the first test will get lost. After resetting the engine still needs to be started.
-
increaseTime
public void increaseTime(EngineControlOuterClass.IncreaseTimeRequest request, io.grpc.stub.StreamObserver<EngineControlOuterClass.IncreaseTimeResponse> responseObserver) Increases the engine time by a specific duration. Increasing the time could be useful for when triggering timers with a date somewhere in the future.
-
waitForIdleState
public void waitForIdleState(EngineControlOuterClass.WaitForIdleStateRequest request, io.grpc.stub.StreamObserver<EngineControlOuterClass.WaitForIdleStateResponse> responseObserver) Waits for the engine to have reached an idle state. Idle state is a state in which the process engine makes no progress and is waiting for new commands or events to trigger.
-
waitForBusyState
public void waitForBusyState(EngineControlOuterClass.WaitForBusyStateRequest request, io.grpc.stub.StreamObserver<EngineControlOuterClass.WaitForBusyStateResponse> responseObserver) Waits a given timeout for the engine to have reached a busy state.
-
getRecords
public void getRecords(EngineControlOuterClass.GetRecordsRequest request, io.grpc.stub.StreamObserver<EngineControlOuterClass.RecordResponse> responseObserver) Get all records from the in-memory engine. These records will be returned in a JSON format. Client-side these should be mapped to Records. For an easy way to serialize this JSON back to a Record please refer to: https://github.com/camunda/zeebe/tree/main/protocol-jackson
-