Class AdminApiRequestHandler
java.lang.Object
io.camunda.zeebe.scheduler.Actor
io.camunda.zeebe.broker.transport.AsyncApiRequestHandler<ApiRequestReader,ApiResponseWriter>
io.camunda.zeebe.broker.transport.adminapi.AdminApiRequestHandler
- All Implemented Interfaces:
AsyncClosable,ConcurrencyControl,RequestHandler,AutoCloseable
public class AdminApiRequestHandler
extends AsyncApiRequestHandler<ApiRequestReader,ApiResponseWriter>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.camunda.zeebe.broker.transport.AsyncApiRequestHandler
AsyncApiRequestHandler.RequestReader<T extends org.agrona.sbe.MessageDecoderFlyweight>, AsyncApiRequestHandler.ResponseWriterNested classes/interfaces inherited from class io.camunda.zeebe.scheduler.Actor
Actor.ActorBuilder -
Field Summary
Fields inherited from class io.camunda.zeebe.broker.transport.AsyncApiRequestHandler
LOGFields inherited from class io.camunda.zeebe.scheduler.Actor
actor, ACTOR_PROP_NAME, ACTOR_PROP_PARTITION_ID -
Constructor Summary
ConstructorsConstructorDescriptionAdminApiRequestHandler(AtomixServerTransport transport, PartitionManagerImpl partitionManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected ActorFuture<Either<ErrorResponseWriter,ApiResponseWriter>> handleAsync(int partitionId, long requestId, ApiRequestReader requestReader, ApiResponseWriter responseWriter, ErrorResponseWriter errorWriter) Handles a request.protected voidMethods inherited from class io.camunda.zeebe.broker.transport.AsyncApiRequestHandler
onRequestMethods inherited from class io.camunda.zeebe.scheduler.Actor
buildActorName, close, closeAsync, createContext, getContext, getName, handleFailure, isActorClosed, newActor, onActorClosed, onActorCloseRequested, onActorClosing, onActorFailed, onActorStarted, run, runOnCompletion, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.zeebe.scheduler.ConcurrencyControl
createCompletedFuture, createFuture
-
Constructor Details
-
AdminApiRequestHandler
public AdminApiRequestHandler(AtomixServerTransport transport, PartitionManagerImpl partitionManager)
-
-
Method Details
-
onActorStarting
protected void onActorStarting()- Overrides:
onActorStartingin classActor
-
handleAsync
protected ActorFuture<Either<ErrorResponseWriter,ApiResponseWriter>> handleAsync(int partitionId, long requestId, ApiRequestReader requestReader, ApiResponseWriter responseWriter, ErrorResponseWriter errorWriter) Description copied from class:AsyncApiRequestHandlerHandles a request. The is populated at this point.- Specified by:
handleAsyncin classAsyncApiRequestHandler<ApiRequestReader,ApiResponseWriter> - Parameters:
partitionId- the current partition idrequestId- the current request idrequestReader- areaderthat is already populated with the request dataresponseWriter- awriterthat can be used to write successful responseserrorWriter- aErrorResponseWriterthat can be used to write error responses- Returns:
- a
ErrorResponseWriterwhen the handling failed, or aResponseWriterwhen the handling was successful. Writes to the other writer will be ignored and are not sent as a response.
-