congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CommandCallbackWrapper.getMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
getMessage
method
in
org.axonframework.commandhandling.distributed.CommandCallbackWrapper

Best Java code snippets using org.axonframework.commandhandling.distributed.CommandCallbackWrapper.getMessage (Showing top 7 results out of 315)

origin: AxonFramework/AxonFramework

/**
 * Invokes {@link CommandCallback#onResult(CommandMessage, CommandResultMessage)} with given {@code result} on
 * the wrapped callback.
 *
 * @param result the result of the command
 */
public void reportResult(CommandResultMessage<R> result) {
  onResult(getMessage(), result);
}
origin: AxonFramework/AxonFramework

/**
 * Removes all callbacks for a given channel. Registered callbacks will receive a failure response containing a
 * {@link CommandBusConnectorCommunicationException}.
 *
 * @param channelId the channel identifier
 */
public void cancelCallbacks(A channelId) {
  Iterator<CommandCallbackWrapper> callbacks = this.callbacks.values().iterator();
  while (callbacks.hasNext()) {
    CommandCallbackWrapper wrapper = callbacks.next();
    if (wrapper.getChannelIdentifier().equals(channelId)) {
      wrapper.reportResult(asCommandResultMessage(new CommandBusConnectorCommunicationException(
          String.format("Connection error while waiting for a response on command %s",
                 wrapper.getMessage().getCommandName()))));
      callbacks.remove();
    }
  }
}
origin: org.axonframework/axon-core

/**
 * Invokes {@link CommandCallback#onSuccess(CommandMessage, Object)} with given {@code result} on the wrapped
 * callback.
 *
 * @param result the result of the command
 */
public void success(R result) {
  onSuccess(getMessage(), result);
}
origin: org.axonframework/axon-core

/**
 * Invokes {@link CommandCallback#onFailure(CommandMessage, Throwable)} with given exception on the wrapped
 * callback.
 *
 * @param e cause for the failure
 */
public void fail(Throwable e) {
  onFailure(getMessage(), e);
}
origin: org.axonframework/axon-messaging

/**
 * Invokes {@link CommandCallback#onResult(CommandMessage, CommandResultMessage)} with given {@code result} on
 * the wrapped callback.
 *
 * @param result the result of the command
 */
public void reportResult(CommandResultMessage<R> result) {
  onResult(getMessage(), result);
}
origin: org.axonframework/axon-core

/**
 * Removes all callbacks for a given channel. Registered callbacks will receive a failure response containing a
 * {@link CommandBusConnectorCommunicationException}.
 *
 * @param channelId the channel identifier
 */
public void cancelCallbacks(A channelId) {
  Iterator<CommandCallbackWrapper> callbacks = this.callbacks.values().iterator();
  while (callbacks.hasNext()) {
    CommandCallbackWrapper wrapper = callbacks.next();
    if (wrapper.getChannelIdentifier().equals(channelId)) {
      wrapper.fail(new CommandBusConnectorCommunicationException(
          String.format("Connection error while waiting for a response on command %s",
                 wrapper.getMessage().getCommandName())));
      callbacks.remove();
    }
  }
}
origin: org.axonframework/axon-messaging

/**
 * Removes all callbacks for a given channel. Registered callbacks will receive a failure response containing a
 * {@link CommandBusConnectorCommunicationException}.
 *
 * @param channelId the channel identifier
 */
public void cancelCallbacks(A channelId) {
  Iterator<CommandCallbackWrapper> callbacks = this.callbacks.values().iterator();
  while (callbacks.hasNext()) {
    CommandCallbackWrapper wrapper = callbacks.next();
    if (wrapper.getChannelIdentifier().equals(channelId)) {
      wrapper.reportResult(asCommandResultMessage(new CommandBusConnectorCommunicationException(
          String.format("Connection error while waiting for a response on command %s",
                 wrapper.getMessage().getCommandName()))));
      callbacks.remove();
    }
  }
}
org.axonframework.commandhandling.distributedCommandCallbackWrappergetMessage

Javadoc

Returns the command message that was sent.

Popular methods of CommandCallbackWrapper

  • <init>
    Initializes a CommandCallbackWrapper which wraps the original callback and holds on to the command m
  • fail
    Invokes CommandCallback#onFailure(CommandMessage,Throwable) with given exception on the wrapped call
  • getChannelIdentifier
    Returns the identifier of the channel over which the command message was sent.
  • reportResult
    Invokes CommandCallback#onResult(CommandMessage,CommandResultMessage) with given result on the wrapp
  • onFailure
  • onResult
  • onSuccess
  • success
    Invokes CommandCallback#onSuccess(CommandMessage,Object) with given result on the wrapped callback.

Popular in Java

  • Updating database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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