Interface AdminChannel
-
- All Known Implementing Classes:
AdminChannelImpl
public interface AdminChannelCommunication channel with AxonServer for Administration related interactions.- Since:
- 4.6.0
- Author:
- Sara Pellegrini
-
-
Field Summary
Fields Modifier and Type Field Description static StringCHANNEL_CONTEXT
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description CompletableFuture<Void>addNodeToReplicationGroup(JoinReplicationGroup request)Request to add a node to a replication group.CompletableFuture<ApplicationRoles>authenticateToken(String token)Authenticate an application token against the information available in Axon Server.CompletableFuture<UserRoles>authenticateUser(String username, String password)Authenticate a user against the information available in Axon Server.CompletableFuture<Void>createContext(CreateContextRequest request)Request to create an Axon Server context.CompletableFuture<Token>createOrUpdateApplication(ApplicationRequest request)Request to create an Axon Server application, or update it if it's already present.CompletableFuture<Void>createOrUpdateUser(CreateOrUpdateUserRequest request)Request to create an Axon Server user, or update it if it's already present.CompletableFuture<Void>createReplicationGroup(CreateReplicationGroupRequest request)Request to create a replication group.CompletableFuture<Void>deleteApplication(String applicationName)Request to delete application in Axon Server.CompletableFuture<Void>deleteContext(DeleteContextRequest request)Request to delete a context in Axon Server.CompletableFuture<Void>deleteReplicationGroup(DeleteReplicationGroupRequest request)Request to delete a replication group in Axon Server.CompletableFuture<Void>deleteUser(String username)Request to delete a user in Axon Server.ResultStream<EventProcessor>eventProcessors()Returns all the event processor registered to AxonServer.ResultStream<EventProcessor>eventProcessorsByComponent(String component)Returns all the event processor registered by the specified application.CompletableFuture<List<ApplicationOverview>>getAllApplications()Request to list all applications in Axon Server.CompletableFuture<ConnectedApplicationOverview>getAllConnectedApplications(String contextName)Request to list all connected applications in Axon Server.CompletableFuture<List<ContextOverview>>getAllContexts()Request to list all contexts in Axon Server.CompletableFuture<List<NodeOverview>>getAllNodes()Request to list all nodes in Axon Server.CompletableFuture<List<ReplicationGroupOverview>>getAllReplicationGroups()Request to list all replication groups in Axon Server.CompletableFuture<List<UserOverview>>getAllUsers()Request to list all users in Axon Server.CompletableFuture<ApplicationOverview>getApplication(String applicationName)Request to retrieve application overview in Axon Server.CompletableFuture<List<LoadBalancingStrategy>>getBalancingStrategies()Returns all available load balance strategies registered to AxonServer.CompletableFuture<ContextOverview>getContextOverview(String context)Request to retrieve aContextOverviewfrom Axon Server.CompletableFuture<ReplicationGroupOverview>getReplicationGroup(String replicationGroup)Request to retrieve replication group overview in Axon Server.CompletableFuture<Void>loadBalanceEventProcessor(String eventProcessorName, String tokenStoreIdentifier, String strategy)Request to balance the load for the giveneventProcessorNamewithin the connected client.default CompletableFuture<Result>mergeEventProcessor(String eventProcessorName, String tokenStoreIdentifier)Request to merge the two smallest segments of a specific event processor.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.CompletableFuture<Result>moveEventProcessorSegment(String eventProcessorName, String tokenStoreIdentifier, int segmentId, String targetClientIdentifier)Requests to move a specific event processor segment to a certain client.default CompletableFuture<Result>pauseEventProcessor(String eventProcessorName, String tokenStoreIdentifier)Request to pause a specific event processor.CompletableFuture<Result>pauseEventProcessor(String eventProcessorName, String tokenStoreIdentifier, String contextName)Request to pause a specific event processor in a specific context.CompletableFuture<Token>refreshToken(String applicationName)Request to refresh token of application in Axon Server.CompletableFuture<Void>removeNodeFromReplicationGroup(LeaveReplicationGroup request)Request to remove a node from a replication group.CompletableFuture<Void>setAutoLoadBalanceStrategy(String eventProcessorName, String tokenStoreIdentifier, String strategy)Updates the autoloadbalance strategy for aeventProcessorNamewithin the connected client.default CompletableFuture<Result>splitEventProcessor(String eventProcessorName, String tokenStoreIdentifier)Request to split the biggest segment of a specific event processor.CompletableFuture<Result>splitEventProcessor(String eventProcessorName, String tokenStoreIdentifier, String contextName)Request to split the biggest segment of a specific event processor in a specific context.default CompletableFuture<Result>startEventProcessor(String eventProcessorName, String tokenStoreIdentifier)Request to start a specific event processor.CompletableFuture<Result>startEventProcessor(String eventProcessorName, String tokenStoreIdentifier, String contextName)Request to start a specific event processor in a specific context.ResultStream<ContextUpdate>subscribeToContextUpdates()Subscribes and listens to context updates from Axon Server, like when a context is created or deleted.CompletableFuture<Void>updateContextProperties(UpdateContextPropertiesRequest request)Request to update the properties for an Axon Server context.
-
-
-
Field Detail
-
CHANNEL_CONTEXT
static final String CHANNEL_CONTEXT
- See Also:
- Constant Field Values
-
-
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 aCompletableFuturethat completes when the pause has been performed. TheCompletableFuturecompletes withResultACCEPTED, 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 pausetokenStoreIdentifier- the token store identifier of the processor to pause- Returns:
- a
CompletableFuturethat 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 aCompletableFuturethat completes when the pause has been performed. TheCompletableFuturecompletes withResultACCEPTED, 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 pausetokenStoreIdentifier- the token store identifier of the processor to pausecontextName- the name of the context where the event processor is- Returns:
- a
CompletableFuturethat completes when the pause has been performed
-
startEventProcessor
default CompletableFuture<Result> startEventProcessor(String eventProcessorName, String tokenStoreIdentifier)
Request to start a specific event processor. Returns aCompletableFuturethat completes when the start has been performed TheCompletableFuturecompletes withResultACCEPTED, 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 starttokenStoreIdentifier- the token store identifier of the processor to start- Returns:
- a
CompletableFuturethat 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 aCompletableFuturethat completes when the start has been performed TheCompletableFuturecompletes withResultACCEPTED, 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 starttokenStoreIdentifier- the token store identifier of the processor to startcontextName- the name of the context where the event processor is- Returns:
- a
CompletableFuturethat 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 aCompletableFuturethat completes when the split has been performed TheCompletableFuturecompletes withResultACCEPTED, 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 splittokenStoreIdentifier- the token store identifier of the processor to split- Returns:
- a
CompletableFuturethat 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 aCompletableFuturethat completes when the split has been performed TheCompletableFuturecompletes withResultACCEPTED, 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 splittokenStoreIdentifier- the token store identifier of the processor to splitcontextName- the name of the context where the event processor is- Returns:
- a
CompletableFuturethat 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 aCompletableFuturethat completes when the merge has been performed TheCompletableFuturecompletes withResultACCEPTED, 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 mergetokenStoreIdentifier- the token store identifier of the processor to merge- Returns:
- a
CompletableFuturethat 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 aCompletableFuturethat completes when the merge has been performed TheCompletableFuturecompletes withResultACCEPTED, 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 mergetokenStoreIdentifier- the token store identifier of the processor to mergecontextName- the name of the context where the event processor is- Returns:
- a
CompletableFuturethat completes when the merge has been performed
-
loadBalanceEventProcessor
CompletableFuture<Void> loadBalanceEventProcessor(String eventProcessorName, String tokenStoreIdentifier, String strategy)
Request to balance the load for the giveneventProcessorNamewithin the connected client. Returns aCompletableFuturethat 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 fortokenStoreIdentifier- the token store identifier of the processor to balance the load forstrategy- the balancing strategy to use- Returns:
- a
CompletableFuturethat completes when the request is delivered to Axon Server
-
setAutoLoadBalanceStrategy
CompletableFuture<Void> setAutoLoadBalanceStrategy(String eventProcessorName, String tokenStoreIdentifier, String strategy)
Updates the autoloadbalance strategy for aeventProcessorNamewithin the connected client. Returns aCompletableFuturethat 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 fortokenStoreIdentifier- the token store identifier of the processor to balance the load forstrategy- the balancing strategy to use- Returns:
- a
CompletableFuturethat 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 aCompletableFuturethat completes when all clients other than thetargetClientIdentifierrelease 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 movetokenStoreIdentifier- the token store identifier of the processor to movesegmentId- the identifier of the segment to movetargetClientIdentifier- the desired destination for the segment- Returns:
- a
CompletableFuturethat 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.
-
createOrUpdateUser
CompletableFuture<Void> createOrUpdateUser(CreateOrUpdateUserRequest request)
Request to create an Axon Server user, or update it if it's already present. Returns aCompletableFuturethat completes when the request has been processed by AxonServer.- Parameters:
request-CreateOrUpdateUserRequestto create the user, containing the username, password and user roles- Returns:
- a
CompletableFuturethat completes when the request has been processed by Axon Server
-
getAllUsers
CompletableFuture<List<UserOverview>> getAllUsers()
Request to list all users in Axon Server.- Returns:
- a
CompletableFuturethat contains list of allUserOverviewin Axon Server.
-
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
CompletableFuturethat completes when the user has been deleted
-
createOrUpdateApplication
CompletableFuture<Token> createOrUpdateApplication(ApplicationRequest request)
Request to create an Axon Server application, or update it if it's already present. Returns aCompletableFuturethat completes when the request has been processed by Axon Server.- Parameters:
request-ApplicationRequestto create the application- Returns:
- a
CompletableFuturethat contains applicationTokenand completes when the request has been processed by Axon Server
-
getApplication
CompletableFuture<ApplicationOverview> getApplication(String applicationName)
Request to retrieve application overview in Axon Server.- Parameters:
applicationName- is the name of the application to retrieve- Returns:
- a
CompletableFuturecontainingApplicationOverviewwith data such as name, roles, etc.
-
getAllApplications
CompletableFuture<List<ApplicationOverview>> getAllApplications()
Request to list all applications in Axon Server.- Returns:
- a
CompletableFuturethat contains list of allApplicationOverviewin Axon Server.
-
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
CompletableFuturecontaining newToken
-
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
CompletableFuturethat completes when application has been deleted
-
getAllConnectedApplications
CompletableFuture<ConnectedApplicationOverview> getAllConnectedApplications(String contextName)
Request to list all connected applications in Axon Server.- Returns:
- a
CompletableFuturethat containsConnectedApplicationOverviewin Axon Server.
-
createContext
CompletableFuture<Void> createContext(CreateContextRequest request)
Request to create an Axon Server context. Returns aCompletableFuturethat completes when the request has been processed by Axon Server.- Parameters:
request-CreateContextRequestto create the context- Returns:
- a
CompletableFuturethat completes when the request has been processed by Axon Server
-
updateContextProperties
CompletableFuture<Void> updateContextProperties(UpdateContextPropertiesRequest request)
Request to update the properties for an Axon Server context. Returns aCompletableFuturethat completes when the request has been processed by Axon Server.- Parameters:
request-UpdateContextPropertiesRequestto update the context properties- Returns:
- a
CompletableFuturethat completes when the request has been processed by Axon Server
-
deleteContext
CompletableFuture<Void> deleteContext(DeleteContextRequest request)
Request to delete a context in Axon Server.- Parameters:
request-DeleteContextRequestto delete the context, containing the context name and option to preserve event store.- Returns:
- a
CompletableFuturethat completes when context has been deleted
-
getContextOverview
CompletableFuture<ContextOverview> getContextOverview(String context)
Request to retrieve aContextOverviewfrom Axon Server.- Parameters:
context- the name of theContextOverviewto retrieve- Returns:
- a
CompletableFuturecontainingContextOverviewdata such as name, roles, etc.
-
getAllContexts
CompletableFuture<List<ContextOverview>> getAllContexts()
Request to list all contexts in Axon Server.- Returns:
- a
CompletableFuturethat contains a list of allContextOverviewin Axon Server.
-
subscribeToContextUpdates
ResultStream<ContextUpdate> subscribeToContextUpdates()
Subscribes and listens to context updates from Axon Server, like when a context is created or deleted.- Returns:
- a
ResultStreamthat streamsContextUpdate.
-
createReplicationGroup
CompletableFuture<Void> createReplicationGroup(CreateReplicationGroupRequest request)
Request to create a replication group. Returns aCompletableFuturethat completes when the request has been processed by Axon Server.- Parameters:
request-CreateReplicationGroupRequestto create replication group, containing the replication group name, the node name, role...- Returns:
- a
CompletableFuturethat completes when the request has been processed to AxonServer
-
deleteReplicationGroup
CompletableFuture<Void> deleteReplicationGroup(DeleteReplicationGroupRequest request)
Request to delete a replication group in Axon Server.- Parameters:
request-DeleteReplicationGroupRequestto delete the replication group, containing the replication group name and option to preserve event store.- Returns:
- a
CompletableFuturethat completes when the replication group has been deleted
-
getReplicationGroup
CompletableFuture<ReplicationGroupOverview> getReplicationGroup(String replicationGroup)
Request to retrieve replication group overview in Axon Server.- Parameters:
replicationGroup- is the name of the replication group to retrieve- Returns:
- a
CompletableFuturecontainingReplicationGroupOverviewdata such as members, contexts roles, etc.
-
getAllReplicationGroups
CompletableFuture<List<ReplicationGroupOverview>> getAllReplicationGroups()
Request to list all replication groups in Axon Server.- Returns:
- a
CompletableFuturethat contains list of allReplicationGroupOverviewin Axon Server.
-
getAllNodes
CompletableFuture<List<NodeOverview>> getAllNodes()
Request to list all nodes in Axon Server.- Returns:
- a
CompletableFuturethat contains list of allNodeOverviewin Axon Server.
-
addNodeToReplicationGroup
CompletableFuture<Void> addNodeToReplicationGroup(JoinReplicationGroup request)
Request to add a node to a replication group. Returns aCompletableFuturethat completes when the request has been processed by AxonServer.- Parameters:
request-JoinReplicationGroupto add a node to replication group, containing the replication group name, the node name, role...- Returns:
- a
CompletableFuturethat completes when the request has been processed to AxonServer
-
removeNodeFromReplicationGroup
CompletableFuture<Void> removeNodeFromReplicationGroup(LeaveReplicationGroup request)
Request to remove a node from a replication group. Returns aCompletableFuturethat completes when the request has been processed by Axon Server.- Parameters:
request-LeaveReplicationGroupto a node to be removed from replication group- Returns:
- a
CompletableFuturethat completes when the request has been processed by Axon Server
-
authenticateUser
CompletableFuture<UserRoles> authenticateUser(String username, String password)
Authenticate a user against the information available in Axon Server. Returns aUserRolesobject 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 userpassword- 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 aApplicationRolesobject 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
-
-