Interface AdminChannel

  • All Known Implementing Classes:
    AdminChannelImpl

    public interface AdminChannel
    Communication channel with AxonServer for Administration related interactions.
    Since:
    4.6.0
    Author:
    Sara Pellegrini
    • Method Detail

      • eventProcessors

        ResultStream<EventProcessor> eventProcessors()
        Returns all the event processor registered to AxonServer.
        Returns:
        the stream of all event processor registered to AxonServer.
      • eventProcessorsByComponent

        ResultStream<EventProcessor> eventProcessorsByComponent​(String component)
        Returns all the event processor registered by the specified application.
        Parameters:
        component - the component name
        Returns:
        the stream of all event processor registered to AxonServer by the specified application.
      • pauseEventProcessor

        default CompletableFuture<Result> pauseEventProcessor​(String eventProcessorName,
                                                              String tokenStoreIdentifier)
        Request to pause a specific event processor. Returns a CompletableFuture that completes when the pause has been performed. The CompletableFuture completes with Result ACCEPTED, if the client application running the event processor is using a version of the connector prior to 4.6.0.
        Parameters:
        eventProcessorName - the name of the event processor to pause
        tokenStoreIdentifier - the token store identifier of the processor to pause
        Returns:
        a CompletableFuture that completes when the pause has been performed
      • pauseEventProcessor

        CompletableFuture<Result> pauseEventProcessor​(String eventProcessorName,
                                                      String tokenStoreIdentifier,
                                                      String contextName)
        Request to pause a specific event processor in a specific context. Returns a CompletableFuture that completes when the pause has been performed. The CompletableFuture completes with Result ACCEPTED, if the client application running the event processor is using a version of the connector prior to 4.6.0.
        Parameters:
        eventProcessorName - the name of the event processor to pause
        tokenStoreIdentifier - the token store identifier of the processor to pause
        contextName - the name of the context where the event processor is
        Returns:
        a CompletableFuture that completes when the pause has been performed
      • startEventProcessor

        default CompletableFuture<Result> startEventProcessor​(String eventProcessorName,
                                                              String tokenStoreIdentifier)
        Request to start a specific event processor. Returns a CompletableFuture that completes when the start has been performed The CompletableFuture completes with Result ACCEPTED, if the client application running the event processor is using a version of the connector prior to 4.6.0.
        Parameters:
        eventProcessorName - the name of the event processor to start
        tokenStoreIdentifier - the token store identifier of the processor to start
        Returns:
        a CompletableFuture that completes when the start has been performed
      • startEventProcessor

        CompletableFuture<Result> startEventProcessor​(String eventProcessorName,
                                                      String tokenStoreIdentifier,
                                                      String contextName)
        Request to start a specific event processor in a specific context. Returns a CompletableFuture that completes when the start has been performed The CompletableFuture completes with Result ACCEPTED, if the client application running the event processor is using a version of the connector prior to 4.6.0.
        Parameters:
        eventProcessorName - the name of the event processor to start
        tokenStoreIdentifier - the token store identifier of the processor to start
        contextName - the name of the context where the event processor is
        Returns:
        a CompletableFuture that completes when the start has been performed
      • splitEventProcessor

        default CompletableFuture<Result> splitEventProcessor​(String eventProcessorName,
                                                              String tokenStoreIdentifier)
        Request to split the biggest segment of a specific event processor. Returns a CompletableFuture that completes when the split has been performed The CompletableFuture completes with Result ACCEPTED, if the client application running the event processor is using a version of the connector prior to 4.6.0.
        Parameters:
        eventProcessorName - the name of the event processor to split
        tokenStoreIdentifier - the token store identifier of the processor to split
        Returns:
        a CompletableFuture that completes when the split has been performed
      • splitEventProcessor

        CompletableFuture<Result> splitEventProcessor​(String eventProcessorName,
                                                      String tokenStoreIdentifier,
                                                      String contextName)
        Request to split the biggest segment of a specific event processor in a specific context. Returns a CompletableFuture that completes when the split has been performed The CompletableFuture completes with Result ACCEPTED, if the client application running the event processor is using a version of the connector prior to 4.6.0.
        Parameters:
        eventProcessorName - the name of the event processor to split
        tokenStoreIdentifier - the token store identifier of the processor to split
        contextName - the name of the context where the event processor is
        Returns:
        a CompletableFuture that completes when the split has been performed
      • mergeEventProcessor

        default CompletableFuture<Result> mergeEventProcessor​(String eventProcessorName,
                                                              String tokenStoreIdentifier)
        Request to merge the two smallest segments of a specific event processor. Returns a CompletableFuture that completes when the merge has been performed The CompletableFuture completes with Result ACCEPTED, if the client application running the event processor is using a version of the connector prior to 4.6.0.
        Parameters:
        eventProcessorName - the name of the event processor to merge
        tokenStoreIdentifier - the token store identifier of the processor to merge
        Returns:
        a CompletableFuture that completes when the merge has been performed
      • mergeEventProcessor

        CompletableFuture<Result> mergeEventProcessor​(String eventProcessorName,
                                                      String tokenStoreIdentifier,
                                                      String contextName)
        Request to merge the two smallest segments of a specific event processor in a specific context. Returns a CompletableFuture that completes when the merge has been performed The CompletableFuture completes with Result ACCEPTED, if the client application running the event processor is using a version of the connector prior to 4.6.0.
        Parameters:
        eventProcessorName - the name of the event processor to merge
        tokenStoreIdentifier - the token store identifier of the processor to merge
        contextName - the name of the context where the event processor is
        Returns:
        a CompletableFuture that completes when the merge has been performed
      • loadBalanceEventProcessor

        CompletableFuture<Void> loadBalanceEventProcessor​(String eventProcessorName,
                                                          String tokenStoreIdentifier,
                                                          String strategy)
        Request to balance the load for the given eventProcessorName within the connected client. Returns a CompletableFuture that completes when the request has been received by Axon Server. Note that this doesn't imply that the processor is balanced, but only that the request has been properly delivered.
        Parameters:
        eventProcessorName - the name of the event processor to balance the load for
        tokenStoreIdentifier - the token store identifier of the processor to balance the load for
        strategy - the balancing strategy to use
        Returns:
        a CompletableFuture that completes when the request is delivered to Axon Server
      • setAutoLoadBalanceStrategy

        CompletableFuture<Void> setAutoLoadBalanceStrategy​(String eventProcessorName,
                                                           String tokenStoreIdentifier,
                                                           String strategy)
        Updates the autoloadbalance strategy for a eventProcessorName within the connected client. Returns a CompletableFuture that completes when the request has been received by Axon Server. Note that this doesn't imply that the processor is balanced, but only that the request has been properly delivered.
        Parameters:
        eventProcessorName - the name of the event processor to balance the load for
        tokenStoreIdentifier - the token store identifier of the processor to balance the load for
        strategy - the balancing strategy to use
        Returns:
        a CompletableFuture that completes when the request is delivered to Axon Server
      • getBalancingStrategies

        CompletableFuture<List<LoadBalancingStrategy>> getBalancingStrategies()
        Returns all available load balance strategies registered to AxonServer.
        Returns:
        the list of all available load balance strategies registered to AxonServer.
      • moveEventProcessorSegment

        CompletableFuture<Result> moveEventProcessorSegment​(String eventProcessorName,
                                                            String tokenStoreIdentifier,
                                                            int segmentId,
                                                            String targetClientIdentifier)
        Requests to move a specific event processor segment to a certain client. Returns a CompletableFuture that completes when all clients other than the targetClientIdentifier release or disregard the segment for claiming. There is no guarantee that the target client has already claimed the segment when the result completes.
        Parameters:
        eventProcessorName - the name of the event processor to move
        tokenStoreIdentifier - the token store identifier of the processor to move
        segmentId - the identifier of the segment to move
        targetClientIdentifier - the desired destination for the segment
        Returns:
        a CompletableFuture that completes when all the other clients released the segment or disregard the segment for claiming. There is no guarantee that the target client has already claimed the segment when the result completes.
      • deleteUser

        CompletableFuture<Void> deleteUser​(String username)
        Request to delete a user in Axon Server.
        Parameters:
        username - is the username of the user to delete
        Returns:
        a CompletableFuture that completes when the user has been deleted
      • refreshToken

        CompletableFuture<Token> refreshToken​(String applicationName)
        Request to refresh token of application in Axon Server.
        Parameters:
        applicationName - is the name of the application to refresh token
        Returns:
        a CompletableFuture containing new Token
      • deleteApplication

        CompletableFuture<Void> deleteApplication​(String applicationName)
        Request to delete application in Axon Server.
        Parameters:
        applicationName - is the name of the application to delete
        Returns:
        a CompletableFuture that completes when application has been deleted
      • addNodeToReplicationGroup

        CompletableFuture<Void> addNodeToReplicationGroup​(JoinReplicationGroup request)
        Request to add a node to a replication group. Returns a CompletableFuture that completes when the request has been processed by AxonServer.
        Parameters:
        request - JoinReplicationGroup to add a node to replication group, containing the replication group name, the node name, role...
        Returns:
        a CompletableFuture that completes when the request has been processed to AxonServer
      • authenticateUser

        CompletableFuture<UserRoles> authenticateUser​(String username,
                                                      String password)
        Authenticate a user against the information available in Axon Server. Returns a UserRoles object containing the roles for the user. Completes with an exception if the username/password combination is invalid. Requires Axon Server 2023.0 or higher.
        Parameters:
        username - the login name of the user
        password - the password of the user
        Returns:
        roles for the user
      • authenticateToken

        CompletableFuture<ApplicationRoles> authenticateToken​(String token)
        Authenticate an application token against the information available in Axon Server. Returns a ApplicationRoles object containing the roles for the application. Completes with an exception if the token is invalid. Requires Axon Server 2023.0 or higher.
        Parameters:
        token - the application token
        Returns:
        roles for the application