congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
AnnotatedAggregate.publish
Code IndexAdd Tabnine to your IDE (free)

How to use
publish
method
in
org.axonframework.modelling.command.inspection.AnnotatedAggregate

Best Java code snippets using org.axonframework.modelling.command.inspection.AnnotatedAggregate.publish (Showing top 4 results out of 315)

origin: AxonFramework/AxonFramework

@Override
protected <P> ApplyMore doApply(P payload, MetaData metaData) {
  if (!applying && aggregateRoot != null) {
    applying = true;
    try {
      publish(createMessage(payload, metaData));
      while (!delayedTasks.isEmpty()) {
        delayedTasks.remove().run();
      }
    } finally {
      delayedTasks.clear();
      applying = false;
    }
  } else {
    delayedTasks.add(() -> publish(createMessage(payload, metaData)));
  }
  return this;
}
origin: AxonFramework/AxonFramework

@Override
protected void publish(EventMessage<?> msg) {
  super.publish(msg);
  snapshotTrigger.eventHandled(msg);
  if (identifierAsString() == null) {
    throw new IncompatibleAggregateException("Aggregate identifier must be non-null after applying an event. " +
                             "Make sure the aggregate identifier is initialized at " +
                             "the latest when handling the creation event.");
  }
}
origin: org.axonframework/axon-modelling

@Override
protected <P> ApplyMore doApply(P payload, MetaData metaData) {
  if (!applying && aggregateRoot != null) {
    applying = true;
    try {
      publish(createMessage(payload, metaData));
      while (!delayedTasks.isEmpty()) {
        delayedTasks.remove().run();
      }
    } finally {
      delayedTasks.clear();
      applying = false;
    }
  } else {
    delayedTasks.add(() -> publish(createMessage(payload, metaData)));
  }
  return this;
}
origin: org.axonframework/axon-eventsourcing

@Override
protected void publish(EventMessage<?> msg) {
  super.publish(msg);
  snapshotTrigger.eventHandled(msg);
  if (identifierAsString() == null) {
    throw new IncompatibleAggregateException("Aggregate identifier must be non-null after applying an event. " +
                             "Make sure the aggregate identifier is initialized at " +
                             "the latest when handling the creation event.");
  }
}
org.axonframework.modelling.command.inspectionAnnotatedAggregatepublish

Javadoc

Publish an event to the aggregate root and its entities first and external event handlers (using the given event bus) later.

Popular methods of AnnotatedAggregate

  • initialize
    Initialize an aggregate created by the given aggregateFactory which is described in the given aggreg
  • getAggregateRoot
    Get the annotated aggregate instance. Note that this method should probably never be used in normal
  • handle
  • publishOnEventBus
    Publish an event to external event handlers using the given event bus.
  • <init>
    Initialize an Aggregate instance for the given aggregateRoot, described by the given aggregateModel
  • andThen
  • apply
  • applyMessageOrPayload
    Apply a new event message to the aggregate and then publish this message to external systems. If the
  • createMessage
    Creates an EventMessage with given payload and metaData.
  • doApply
  • execute
  • executeWithResult
  • execute,
  • executeWithResult,
  • identifier,
  • identifierAsString,
  • initSequence,
  • isDeleted,
  • registerRoot,
  • type,
  • version

Popular in Java

  • Making http requests using okhttp
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JLabel (javax.swing)
  • From CI to AI: The AI layer in your organization
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