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

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

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

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

/**
 * 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.distributedCommandCallbackWrappergetChannelIdentifier

Javadoc

Returns the identifier of the channel over which the command message 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
  • getMessage
    Returns the command message that 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

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • getApplicationContext (Context)
  • putExtra (Intent)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • JComboBox (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • 21 Best Atom Packages for 2021
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