Tabnine Logo
EventGrounding.getTransportFormats
Code IndexAdd Tabnine to your IDE (free)

How to use
getTransportFormats
method
in
org.streampipes.model.grounding.EventGrounding

Best Java code snippets using org.streampipes.model.grounding.EventGrounding.getTransportFormats (Showing top 12 results out of 315)

origin: org.streampipes/streampipes-pipeline-management

  public <T extends TransportFormat> boolean supportsFormat(String format) {
    List<InvocableStreamPipesEntity> elements = buildInvocables();
    return elements
        .stream()
        .allMatch(e -> e
            .getSupportedGrounding()
            .getTransportFormats()
            .stream()
            .anyMatch(s -> s.getRdfType().contains(format)));
  }
}
origin: streampipes/streampipes-ce

  public <T extends TransportFormat> boolean supportsFormat(String format) {
    List<InvocableStreamPipesEntity> elements = buildInvocables();
    return elements
        .stream()
        .allMatch(e -> e
            .getSupportedGrounding()
            .getTransportFormats()
            .stream()
            .anyMatch(s -> s.getRdfType().contains(format)));
  }
}
origin: streampipes/streampipes-ce

@Override
public boolean match(EventGrounding offer, EventGrounding requirement, List<MatchingResultMessage> errorLog) {
 boolean match = MatchingUtils.nullCheckRightNullDisallowed(offer, requirement) ||
     (matchProtocols(offer.getTransportProtocols(), requirement.getTransportProtocols(), errorLog) &&
         matchFormats(offer.getTransportFormats(), requirement.getTransportFormats(), errorLog));
 return match;
}
origin: org.streampipes/streampipes-pipeline-management

@Override
public boolean match(EventGrounding offer, EventGrounding requirement, List<MatchingResultMessage> errorLog) {
 boolean match = MatchingUtils.nullCheckRightNullDisallowed(offer, requirement) ||
     (matchProtocols(offer.getTransportProtocols(), requirement.getTransportProtocols(), errorLog) &&
         matchFormats(offer.getTransportFormats(), requirement.getTransportFormats(), errorLog));
 return match;
}
origin: streampipes/streampipes-ce

@Override
public List<SpInputCollector> getInputCollectors() throws SpRuntimeException {
 List<SpInputCollector> inputCollectors = new ArrayList<>();
 for (SpDataStream is : bindingParams.getGraph().getInputStreams()) {
  inputCollectors.add(ProtocolManager.findInputCollector(is.getEventGrounding()
      .getTransportProtocol(), is.getEventGrounding().getTransportFormats().get(0),
      singletonEngine));
 }
 return inputCollectors;
}
origin: streampipes/streampipes-ce

@Override
public List<SpInputCollector> getInputCollectors() throws SpRuntimeException {
 List<SpInputCollector> inputCollectors = new ArrayList<>();
 for (SpDataStream is : bindingParams.getGraph().getInputStreams()) {
  inputCollectors.add(ProtocolManager.findInputCollector(is.getEventGrounding()
          .getTransportProtocol(), is.getEventGrounding().getTransportFormats().get(0),
      singletonEngine));
 }
 return inputCollectors;
}
origin: streampipes/streampipes-ce

public TransportFormat getTransportFormat() {
  if (source instanceof SpDataStream) {
    return ((SpDataStream) source)
        .getEventGrounding()
        .getTransportFormats()
        .get(0);
  } else {
    if (supportsFormat(MessageFormat.Json)) {
      return new TransportFormat(MessageFormat.Json);
    } else if (supportsFormat(MessageFormat.Thrift)) {
      return new TransportFormat(MessageFormat.Thrift);
    }
  }
  return new TransportFormat(MessageFormat.Json);
}
origin: org.streampipes/streampipes-pipeline-management

public TransportFormat getTransportFormat() {
  if (source instanceof SpDataStream) {
    return ((SpDataStream) source)
        .getEventGrounding()
        .getTransportFormats()
        .get(0);
  } else {
    if (supportsFormat(MessageFormat.Json)) {
      return new TransportFormat(MessageFormat.Json);
    } else if (supportsFormat(MessageFormat.Thrift)) {
      return new TransportFormat(MessageFormat.Thrift);
    }
  }
  return new TransportFormat(MessageFormat.Json);
}
origin: streampipes/streampipes-ce

public EventGrounding(EventGrounding other) {
  super(other);
  this.transportProtocols = new Cloner().protocols(other.getTransportProtocols());
  this.transportFormats = new Cloner().transportFormats(other.getTransportFormats());
}
origin: streampipes/streampipes-ce

@Override
public SpOutputCollector getOutputCollector() throws SpRuntimeException {
 return ProtocolManager.findOutputCollector(bindingParams.getGraph().getOutputStream()
     .getEventGrounding().getTransportProtocol(), bindingParams.getGraph().getOutputStream
     ().getEventGrounding().getTransportFormats().get(0));
}
origin: org.streampipes/streampipes-pipeline-management

 public DataSetModificationMessage selectGrounding() {
  // TODO grounding negotiation
  TransportProtocol protocol = new KafkaTransportProtocol(BackendConfig.INSTANCE.getKafkaHost(),
      BackendConfig.INSTANCE.getKafkaPort(),
      TopicGenerator.generateRandomTopic(),
      BackendConfig.INSTANCE.getZookeeperHost(),
      BackendConfig.INSTANCE.getZookeeperPort());
  TransportFormat format = spDataSet.getSupportedGrounding().getTransportFormats().get(0);

  EventGrounding outputGrounding = new EventGrounding();
  outputGrounding.setTransportProtocol(protocol);
  outputGrounding.setTransportFormats(Arrays.asList(format));

  return new DataSetModificationMessage(outputGrounding,RandomStringUtils.randomAlphanumeric(10));
 }
}
origin: streampipes/streampipes-ce

 public DataSetModificationMessage selectGrounding() {
  // TODO grounding negotiation
  TransportProtocol protocol = new KafkaTransportProtocol(BackendConfig.INSTANCE.getKafkaHost(),
      BackendConfig.INSTANCE.getKafkaPort(),
      TopicGenerator.generateRandomTopic(),
      BackendConfig.INSTANCE.getZookeeperHost(),
      BackendConfig.INSTANCE.getZookeeperPort());
  TransportFormat format = spDataSet.getSupportedGrounding().getTransportFormats().get(0);

  EventGrounding outputGrounding = new EventGrounding();
  outputGrounding.setTransportProtocol(protocol);
  outputGrounding.setTransportFormats(Arrays.asList(format));

  return new DataSetModificationMessage(outputGrounding,RandomStringUtils.randomAlphanumeric(10));
 }
}
org.streampipes.model.groundingEventGroundinggetTransportFormats

Popular methods of EventGrounding

  • getTransportProtocol
  • <init>
  • setTransportProtocol
  • setTransportFormats
  • setTransportProtocols
  • getTransportProtocols

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • setScale (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Github Copilot alternatives
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