public class AdminChannelImpl extends AbstractAxonServerChannel<Void> implements AdminChannel
AdminChannel GRPC implementation to allow a client application sending and receiving administration related
messages to and from Axon Server.CHANNEL_CONTEXT| Constructor and Description |
|---|
AdminChannelImpl(ClientIdentification clientIdentification,
ScheduledExecutorService executor,
AxonServerManagedChannel channel) |
| Modifier and Type | Method and 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.
|
void |
connect()
Connect this channel with AxonServer.
|
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.
|
void |
disconnect()
Disconnect this channel from AxonServer.
|
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 a
ContextOverview from Axon Server. |
CompletableFuture<ReplicationGroupOverview> |
getReplicationGroup(String replicationGroup)
Request to retrieve replication group overview in Axon Server.
|
boolean |
isReady()
Validate whether this channel has all required streams connected with AxonServer.
|
CompletableFuture<Void> |
loadBalanceEventProcessor(String eventProcessorName,
String tokenStoreIdentifier,
String strategy)
Request to balance the load for the given
eventProcessorName within the connected client. |
CompletableFuture<Result> |
mergeEventProcessor(String eventProcessorName,
String tokenStoreIdentifier,
String context)
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.
|
CompletableFuture<Result> |
pauseEventProcessor(String eventProcessorName,
String tokenStoreIdentifier,
String contextName)
Request to pause a specific event processor in a specific context.
|
void |
reconnect()
Reconnect this channel with AxonServer.
|
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 a
eventProcessorName within the connected client. |
CompletableFuture<Result> |
splitEventProcessor(String eventProcessorName,
String tokenStoreIdentifier,
String context)
Request to split the biggest segment of a specific event processor in a specific context.
|
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.
|
processAck, scheduleImmediateReconnect, scheduleReconnect, sendInstructionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmergeEventProcessor, pauseEventProcessor, splitEventProcessor, startEventProcessorpublic AdminChannelImpl(ClientIdentification clientIdentification, ScheduledExecutorService executor, AxonServerManagedChannel channel)
public ResultStream<EventProcessor> eventProcessors()
AdminChanneleventProcessors in interface AdminChannelpublic ResultStream<EventProcessor> eventProcessorsByComponent(String component)
AdminChanneleventProcessorsByComponent in interface AdminChannelcomponent - the component namepublic CompletableFuture<Result> pauseEventProcessor(String eventProcessorName, String tokenStoreIdentifier, String contextName)
AdminChannelCompletableFuture 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.pauseEventProcessor in interface AdminChanneleventProcessorName - 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 isCompletableFuture that completes when the pause has been performedpublic CompletableFuture<Result> startEventProcessor(String eventProcessorName, String tokenStoreIdentifier, String contextName)
AdminChannelCompletableFuture 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.startEventProcessor in interface AdminChanneleventProcessorName - 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 isCompletableFuture that completes when the start has been performedpublic CompletableFuture<Result> splitEventProcessor(String eventProcessorName, String tokenStoreIdentifier, String context)
AdminChannelCompletableFuture 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.splitEventProcessor in interface AdminChanneleventProcessorName - the name of the event processor to splittokenStoreIdentifier - the token store identifier of the processor to splitcontext - the name of the context where the event processor isCompletableFuture that completes when the split has been performedpublic CompletableFuture<Result> mergeEventProcessor(String eventProcessorName, String tokenStoreIdentifier, String context)
AdminChannelCompletableFuture 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.mergeEventProcessor in interface AdminChanneleventProcessorName - the name of the event processor to mergetokenStoreIdentifier - the token store identifier of the processor to mergecontext - the name of the context where the event processor isCompletableFuture that completes when the merge has been performedpublic CompletableFuture<Result> moveEventProcessorSegment(String eventProcessorName, String tokenStoreIdentifier, int segmentId, String targetClientIdentifier)
AdminChannelCompletableFuture 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.moveEventProcessorSegment in interface AdminChanneleventProcessorName - 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 segmentCompletableFuture 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.public CompletableFuture<Void> loadBalanceEventProcessor(String eventProcessorName, String tokenStoreIdentifier, String strategy)
AdminChanneleventProcessorName 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.loadBalanceEventProcessor in interface AdminChanneleventProcessorName - 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 useCompletableFuture that completes when the request is delivered to Axon Serverpublic CompletableFuture<Void> setAutoLoadBalanceStrategy(String eventProcessorName, String tokenStoreIdentifier, String strategy)
AdminChanneleventProcessorName 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.setAutoLoadBalanceStrategy in interface AdminChanneleventProcessorName - 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 useCompletableFuture that completes when the request is delivered to Axon Serverpublic CompletableFuture<List<LoadBalancingStrategy>> getBalancingStrategies()
AdminChannelgetBalancingStrategies in interface AdminChannelpublic CompletableFuture<Void> createOrUpdateUser(CreateOrUpdateUserRequest request)
AdminChannelCompletableFuture
that completes when the request has been processed by AxonServer.createOrUpdateUser in interface AdminChannelrequest - CreateOrUpdateUserRequest to create the user, containing the username, password and user
rolesCompletableFuture that completes when the request has been processed by Axon Serverpublic CompletableFuture<List<UserOverview>> getAllUsers()
AdminChannelgetAllUsers in interface AdminChannelCompletableFuture that contains list of all UserOverview in Axon Server.public CompletableFuture<List<NodeOverview>> getAllNodes()
AdminChannelgetAllNodes in interface AdminChannelCompletableFuture that contains list of all NodeOverview in Axon Server.public CompletableFuture<Void> deleteUser(String username)
AdminChanneldeleteUser in interface AdminChannelusername - is the username of the user to deleteCompletableFuture that completes when the user has been deletedpublic CompletableFuture<Token> createOrUpdateApplication(ApplicationRequest request)
AdminChannelCompletableFuture that completes when the request has been processed by Axon Server.createOrUpdateApplication in interface AdminChannelrequest - ApplicationRequest to create the applicationCompletableFuture that contains application Token and completes
when the request has been processed by Axon Serverpublic CompletableFuture<List<ApplicationOverview>> getAllApplications()
AdminChannelgetAllApplications in interface AdminChannelCompletableFuture that contains list of all ApplicationOverview in Axon Server.public CompletableFuture<ApplicationOverview> getApplication(String applicationName)
AdminChannelgetApplication in interface AdminChannelapplicationName - is the name of the application to retrieveCompletableFuture containing ApplicationOverview with data such as name, roles, etc.public CompletableFuture<Token> refreshToken(String applicationName)
AdminChannelrefreshToken in interface AdminChannelapplicationName - is the name of the application to refresh tokenCompletableFuture containing new Tokenpublic CompletableFuture<Void> deleteApplication(String applicationName)
AdminChanneldeleteApplication in interface AdminChannelapplicationName - is the name of the application to deleteCompletableFuture that completes when application has been deletedpublic CompletableFuture<ConnectedApplicationOverview> getAllConnectedApplications(String contextName)
AdminChannelgetAllConnectedApplications in interface AdminChannelCompletableFuture that contains ConnectedApplicationOverview in Axon Server.public CompletableFuture<Void> createContext(CreateContextRequest request)
AdminChannelCompletableFuture that completes when the request has
been processed by Axon Server.createContext in interface AdminChannelrequest - CreateContextRequest to create the contextCompletableFuture that completes when the request has been processed by Axon Serverpublic CompletableFuture<Void> updateContextProperties(UpdateContextPropertiesRequest request)
AdminChannelCompletableFuture that completes
when the request has been processed by Axon Server.updateContextProperties in interface AdminChannelrequest - UpdateContextPropertiesRequest to update the context propertiesCompletableFuture that completes when the request has been processed by Axon Serverpublic CompletableFuture<Void> deleteContext(DeleteContextRequest request)
AdminChanneldeleteContext in interface AdminChannelrequest - DeleteContextRequest to delete the context, containing the context name and option to
preserve event store.CompletableFuture that completes when context has been deletedpublic CompletableFuture<ContextOverview> getContextOverview(String context)
AdminChannelContextOverview from Axon Server.getContextOverview in interface AdminChannelcontext - the name of the ContextOverview to retrieveCompletableFuture containing ContextOverview data such as name, roles, etc.public CompletableFuture<List<ContextOverview>> getAllContexts()
AdminChannelgetAllContexts in interface AdminChannelCompletableFuture that contains a list of all ContextOverview in Axon Server.public ResultStream<ContextUpdate> subscribeToContextUpdates()
AdminChannelsubscribeToContextUpdates in interface AdminChannelResultStream that streams ContextUpdate.public CompletableFuture<Void> addNodeToReplicationGroup(JoinReplicationGroup request)
AdminChannelCompletableFuture that completes when the request has been processed by AxonServer.addNodeToReplicationGroup in interface AdminChannelrequest - JoinReplicationGroup to add a node to replication group,
containing the replication group name, the node name, role...CompletableFuture that completes when the request has been processed to AxonServerpublic CompletableFuture<Void> createReplicationGroup(CreateReplicationGroupRequest request)
AdminChannelCompletableFuture that completes when the request has been processed by Axon Server.createReplicationGroup in interface AdminChannelrequest - CreateReplicationGroupRequest to create replication group,
containing the replication group name, the node name, role...CompletableFuture that completes when the request has been processed to AxonServerpublic CompletableFuture<Void> deleteReplicationGroup(DeleteReplicationGroupRequest request)
AdminChanneldeleteReplicationGroup in interface AdminChannelrequest - DeleteReplicationGroupRequest to delete the replication group,
containing the replication group name and option to preserve event store.CompletableFuture that completes when the replication group has been deletedpublic CompletableFuture<ReplicationGroupOverview> getReplicationGroup(String replicationGroup)
AdminChannelgetReplicationGroup in interface AdminChannelreplicationGroup - is the name of the replication group to retrieveCompletableFuture containing ReplicationGroupOverview data such as members, contexts
roles, etc.public CompletableFuture<Void> removeNodeFromReplicationGroup(LeaveReplicationGroup request)
AdminChannelCompletableFuture that completes when the
request has been processed by Axon Server.removeNodeFromReplicationGroup in interface AdminChannelrequest - LeaveReplicationGroup to a node to be removed from replication groupCompletableFuture that completes when the request has been processed by Axon Serverpublic CompletableFuture<List<ReplicationGroupOverview>> getAllReplicationGroups()
AdminChannelgetAllReplicationGroups in interface AdminChannelCompletableFuture that contains list of all ReplicationGroupOverview in Axon Server.public CompletableFuture<UserRoles> authenticateUser(String username, String password)
AdminChannelUserRoles 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.authenticateUser in interface AdminChannelusername - the login name of the userpassword - the password of the userpublic CompletableFuture<ApplicationRoles> authenticateToken(String token)
AdminChannelApplicationRoles object containing the roles for the application. Completes with an exception if the
token is invalid. Requires Axon Server 2023.0 or higher.authenticateToken in interface AdminChanneltoken - the application tokenpublic void connect()
AbstractAxonServerChannelconnect in class AbstractAxonServerChannel<Void>public void reconnect()
AbstractAxonServerChannelreconnect in class AbstractAxonServerChannel<Void>public void disconnect()
AbstractAxonServerChanneldisconnect in class AbstractAxonServerChannel<Void>public boolean isReady()
AbstractAxonServerChanneltrue.isReady in class AbstractAxonServerChannel<Void>true if this channel is connected with AxonServer or does not require any active connections,
false otherwiseCopyright © 2020–2023 AxonIQ BV. All rights reserved.