congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
MessageSendNotAllowedException
Code IndexAdd Tabnine to your IDE (free)

How to use
MessageSendNotAllowedException
in
org.eclipse.ditto.model.messages

Best Java code snippets using org.eclipse.ditto.model.messages.MessageSendNotAllowedException (Showing top 3 results out of 315)

origin: eclipse/ditto

@Override
protected MessageSendNotAllowedException doBuild(final DittoHeaders dittoHeaders,
    @Nullable final String message,
    @Nullable final String description,
    @Nullable final Throwable cause,
    @Nullable final URI href) {
  return new MessageSendNotAllowedException(dittoHeaders, message, description, cause, href);
}
origin: eclipse/ditto

/**
 * Deserialize from a JSON object.
 *
 * @param jsonObject the JSON object to deserialize.
 * @param dittoHeaders the headers.
 * @return an instance of this class.
 * @throws NullPointerException if any argument is {@code null}.
 */
public static MessageSendNotAllowedException fromJson(final JsonObject jsonObject,
    final DittoHeaders dittoHeaders) {
  return new Builder()
      .loadJson(jsonObject)
      .dittoHeaders(dittoHeaders)
      .message(readMessage(jsonObject))
      .description(readDescription(jsonObject).orElse(DEFAULT_DESCRIPTION))
      .href(readHRef(jsonObject).orElse(null))
      .build();
}
origin: eclipse/ditto

private void rejectMessageCommand(final MessageCommand command, final ActorRef sender) {
  final MessageSendNotAllowedException error =
      MessageSendNotAllowedException.newBuilder(command.getThingId())
          .dittoHeaders(command.getDittoHeaders())
          .build();
  log(command).info(
      "The command <{}> was not forwarded due to insufficient rights {}: {} - AuthorizationSubjects: {}",
      command.getType(), error.getClass().getSimpleName(), error.getMessage(),
      command.getDittoHeaders().getAuthorizationSubjects());
  replyToSender(error, sender);
}
org.eclipse.ditto.model.messagesMessageSendNotAllowedException

Javadoc

Thrown if a message cannot be send because the affected thing does not exist or because of a missing permission.

Most used methods

  • <init>
  • getMessage
  • newBuilder
    A mutable builder for a MessageNotSendableException.
  • readDescription
  • readHRef
  • readMessage

Popular in Java

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • getContentResolver (Context)
  • getApplicationContext (Context)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • JTextField (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Option (scala)
  • 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