congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Running tasks concurrently on multiple threads
  • startActivity (Activity)
  • getResourceAsStream (ClassLoader)
  • findViewById (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Join (org.hibernate.mapping)
  • Best plugins for Eclipse
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