Tabnine Logo
AggregateAnnotationCommandHandler$Builder.aggregateType
Code IndexAdd Tabnine to your IDE (free)

How to use
aggregateType
method
in
org.axonframework.modelling.command.AggregateAnnotationCommandHandler$Builder

Best Java code snippets using org.axonframework.modelling.command.AggregateAnnotationCommandHandler$Builder.aggregateType (Showing top 2 results out of 315)

origin: AxonFramework/AxonFramework

@SuppressWarnings("unchecked")
@Before
public void setUp() {
  eventStore = spy(EmbeddedEventStore.builder().storageEngine(new InMemoryEventStorageEngine()).build());
  Repository<MyAggregate> myAggregateRepository = EventSourcingRepository.builder(MyAggregate.class)
                                      .eventStore(eventStore)
                                      .build();
  CommandBus commandBus = SimpleCommandBus.builder().build();
  commandGateway = DefaultCommandGateway.builder().commandBus(commandBus).build();
  AggregateAnnotationCommandHandler<MyAggregate> myAggregateCommandHandler =
      AggregateAnnotationCommandHandler.<MyAggregate>builder()
          .aggregateType(MyAggregate.class)
          .repository(myAggregateRepository)
          .build();
  myAggregateCommandHandler.subscribe(commandBus);
}
origin: AxonFramework/AxonFramework

private void registerAggregateCommandHandlers() {
  ensureRepositoryConfiguration();
  if (!explicitCommandHandlersSet) {
    AggregateAnnotationCommandHandler.Builder<T> builder = AggregateAnnotationCommandHandler.<T>builder()
        .aggregateType(aggregateType)
        .parameterResolverFactory(parameterResolverFactory)
        .repository(this.repository);
    if (commandTargetResolver != null) {
      builder.commandTargetResolver(commandTargetResolver);
    }
    AggregateAnnotationCommandHandler<T> handler = builder.build();
    handler.subscribe(commandBus);
  }
}
org.axonframework.modelling.commandAggregateAnnotationCommandHandler$BuilderaggregateType

Javadoc

Sets the aggregateType as a Class, specifying the type of aggregate an AggregateModelshould be created for. Either this field or the #aggregateModel(AggregateModel) should be provided to correctly instantiate an AggregateAnnotationCommandHandler.

Popular methods of AggregateAnnotationCommandHandler$Builder

  • build
    Initializes a AggregateAnnotationCommandHandler as specified through this Builder.
  • repository
    Sets the Repository used to add and load Aggregate instances of generic type T upon handling command
  • commandTargetResolver
    Sets the CommandTargetResolver used to resolve the command handling target. Defaults to an Annotatio
  • <init>
  • aggregateModel
    Sets the AggregateModel of generic type T, describing the structure of the aggregate the AnnotationC
  • inspectAggregateModel
  • parameterResolverFactory
    Sets the ParameterResolverFactory used to resolve parameters for annotated handlers contained in the
  • validate
    Validates whether the fields contained in this Builder are set accordingly.

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now