Tabnine Logo
Signal.getId
Code IndexAdd Tabnine to your IDE (free)

How to use
getId
method
in
org.eclipse.ditto.signals.base.Signal

Best Java code snippets using org.eclipse.ditto.signals.base.Signal.getId (Showing top 11 results out of 315)

origin: eclipse/ditto

  @Override
  public void accept(final ExternalMessage externalMessage, final Signal<?> signal) {
    externalMessage.getEnforcementFilter().ifPresent(enforcementFilter -> {
      log.debug("Connection Signal ID Enforcement enabled - matching Signal ID <{}> with filter: {}",
          signal.getId(), enforcementFilter);
      enforcementFilter.match(signal.getId(), signal.getDittoHeaders());
    });
  }
}
origin: eclipse/ditto

/**
 * Wrap a signal in a sharded message envelope addressed to the correct {@code EnforcerActor}.
 *
 * @param signal the signal to wrap.
 * @return the sharded message envelope.
 */
public static ShardedMessageEnvelope wrapForEnforcer(final Signal<?> signal) {
  final EntityId entityId;
  if (MessageCommand.RESOURCE_TYPE.equals(signal.getResourceType())) {
    entityId = EntityId.of(ThingCommand.RESOURCE_TYPE, signal.getId());
  } else {
    entityId = EntityId.of(signal.getResourceType(), signal.getId());
  }
  return createEnvelope(entityId, signal);
}
origin: org.eclipse.ditto/ditto-services-connectivity-messaging

  @Override
  public void accept(final ExternalMessage externalMessage, final Signal<?> signal) {
    externalMessage.getEnforcementFilter().ifPresent(enforcementFilter -> {
      log.debug("Connection Signal ID Enforcement enabled: {}", enforcementFilter);
      enforcementFilter.match(signal.getId(), signal.getDittoHeaders());
    });
  }
}
origin: org.eclipse.ditto/ditto-services-connectivity-messaging

@Override
public DittoHeaders apply(final InboundExternalMessage inboundExternalMessage) {
  final Signal<?> signal = inboundExternalMessage.getSignal();
  final ExternalMessage externalMessage = inboundExternalMessage.getSource();
  return externalMessage.getHeaderMapping().map(mapping -> {
    final DittoHeaders dittoHeaders = signal.getDittoHeaders();
    final String thingId = signal.getId();
    final DittoHeadersBuilder dittoHeadersBuilder = dittoHeaders.toBuilder();
    mapping.getMapping().entrySet().stream()
        .map(e -> newEntry(e.getKey(),
            PlaceholderFilter.apply(e.getValue(), dittoHeaders, HEADERS_PLACEHOLDER, true))
        )
        .map(e -> newEntry(e.getKey(),
            PlaceholderFilter.apply(e.getValue(), thingId, THING_PLACEHOLDER, true))
        )
        .map(e -> newEntry(e.getKey(),
            PlaceholderFilter.apply(e.getValue(),
                inboundExternalMessage.getTopicPath(),
                TOPIC_PLACEHOLDER, true))
        )
        .forEach(e -> dittoHeadersBuilder.putHeader(e.getKey(), e.getValue()));
    LogUtil.enhanceLogWithCorrelationId(log, signal);
    final DittoHeaders newHeaders = dittoHeadersBuilder.build();
    log.debug("Result of header mapping <{}> are these headers: {}", mapping, newHeaders);
    return newHeaders;
  }).orElse(signal.getDittoHeaders());
}
origin: eclipse/ditto

@Override
public DittoHeaders apply(final InboundExternalMessage inboundExternalMessage) {
  final Signal<?> signal = inboundExternalMessage.getSignal();
  final ExternalMessage externalMessage = inboundExternalMessage.getSource();
  return externalMessage.getHeaderMapping().map(mapping -> {
    final DittoHeaders dittoHeaders = signal.getDittoHeaders();
    final String thingId = signal.getId();
    final DittoHeadersBuilder dittoHeadersBuilder = dittoHeaders.toBuilder();
    mapping.getMapping().entrySet().stream()
        .map(e -> newEntry(e.getKey(),
            PlaceholderFilter.apply(e.getValue(), dittoHeaders, HEADERS_PLACEHOLDER, true))
        )
        .map(e -> newEntry(e.getKey(),
            PlaceholderFilter.apply(e.getValue(), thingId, THING_PLACEHOLDER, true))
        )
        .map(e -> newEntry(e.getKey(),
            PlaceholderFilter.apply(e.getValue(),
                inboundExternalMessage.getTopicPath(),
                TOPIC_PLACEHOLDER, true))
        )
        .forEach(e -> dittoHeadersBuilder.putHeader(e.getKey(), e.getValue()));
    LogUtil.enhanceLogWithCorrelationId(log, signal);
    final DittoHeaders newHeaders = dittoHeadersBuilder.build();
    log.debug("Result of header mapping <{}> are these headers: {}", mapping, newHeaders);
    return newHeaders;
  }).orElse(signal.getDittoHeaders());
}
origin: org.eclipse.ditto/ditto-services-connectivity-messaging

PlaceholderFilter.apply(e.getValue(), sourceSignal.getId(), THING_PLACEHOLDER, true))
origin: eclipse/ditto

PlaceholderFilter.apply(e.getValue(), sourceSignal.getId(), THING_PLACEHOLDER, true))
origin: org.eclipse.ditto/ditto-services-connectivity-messaging

PlaceholderFilter.filterTargets(subscribedAndAuthorizedTargets, signal.getId(),
    unresolvedPlaceholder -> log.info(UNRESOLVED_PLACEHOLDERS_MESSAGE, unresolvedPlaceholder));
origin: eclipse/ditto

PlaceholderFilter.filterTargets(subscribedAndAuthorizedTargets, signal.getId(),
    unresolvedPlaceholder -> log.info(UNRESOLVED_PLACEHOLDERS_MESSAGE, unresolvedPlaceholder));
origin: eclipse/ditto

final String signalId = transformedSignal.getId();
final String signalType = transformedSignal.getType();
if (signalId.isEmpty()) {
origin: eclipse/ditto

    signal.getId());
final ThingNotAccessibleException error = ThingNotAccessibleException.newBuilder(entityId().getId())
    .dittoHeaders(signal.getDittoHeaders())
org.eclipse.ditto.signals.baseSignalgetId

Popular methods of Signal

  • getDittoHeaders
  • getType
  • setDittoHeaders
  • getImplementedSchemaVersion
  • getName
    Returns the name of the signal. This is gathered by the type of the signal by default.
  • getResourcePath
  • getResourceType
  • toJson

Popular in Java

  • Reading from database using SQL prepared statement
  • runOnUiThread (Activity)
  • setScale (BigDecimal)
  • compareTo (BigDecimal)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Collectors (java.util.stream)
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Top plugins for WebStorm
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