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

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

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

origin: org.streampipes/streampipes-wrapper-distributed

protected TransportProtocol protocol(SpDataStream stream) {
 return stream
     .getEventGrounding()
     .getTransportProtocol();
}
origin: streampipes/streampipes-ce

  public static EventGrounding getSupportedGrounding()
  {
    EventGrounding grounding = new EventGrounding();
    grounding.setTransportFormats(standardFormat());
    grounding.setTransportProtocols(standardProtocols());
    return grounding;
  }
}
origin: streampipes/streampipes-ce

 public static EventGrounding makeDummyGrounding() {
  EventGrounding grounding = new EventGrounding();
  grounding.setTransportFormats(Arrays.asList(new TransportFormat()));
  grounding.setTransportProtocol(ProtocolGenerator.makeDummyProtocol());

  return grounding;
 }
}
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

if (adapterDescription instanceof AdapterSetDescription) {
  ds = ((AdapterSetDescription) adapterDescription).getDataSet();
  EventGrounding eg = new EventGrounding();
  eg.setTransportProtocol(SupportedProtocols.kafka());
  eg.setTransportFormats(Arrays.asList(SupportedFormats.jsonFormat()));
  ((SpDataSet) ds).setSupportedGrounding(eg);
} else {
  String topic = adapterDescription.getEventGrounding().getTransportProtocol().getTopicDefinition().getActualTopicName();
  EventGrounding eg = new EventGrounding();
  eg.setTransportFormats(Arrays.asList(Formats.jsonFormat()));
  eg.setTransportProtocol(tp);
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

@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 AdapterDescription() {
    super();
    this.rules = new ArrayList<>();
    this.eventGrounding = new EventGrounding();
    this.config = new ArrayList<>();

    // TODO move to another place
    TransportProtocol tp = new KafkaTransportProtocol();
    tp.setTopicDefinition(new SimpleTopicDefinition("bb"));
    this.eventGrounding.setTransportProtocol(tp);
//        this.eventGrounding.setTransportFormats(Arrays.asList(Formats.jsonFormat()));


  }

origin: streampipes/streampipes-ce

protected AbstractProcessingElementBuilder(String id, String label, String description, T element) {
 super(id, label, description, element);
 this.streamRequirements = new ArrayList<>();
 this.stream1Properties = new ArrayList<>();
 this.stream2Properties = new ArrayList<>();
 this.supportedGrounding = new EventGrounding();
}
origin: streampipes/streampipes-ce

/**
 * Assigns a new {@link org.streampipes.model.grounding.TransportFormat} to the stream definition.
 * @param format The transport format of the stream at runtime (e.g., JSON or Thrift). Use
 * {@link org.streampipes.sdk.helpers.Formats} to use some pre-defined formats (or create a new format as
 *               described in the developer guide).
 * @return this
 */
public DataStreamBuilder format(TransportFormat format) {
  this.eventGrounding.setTransportFormats(Collections.singletonList(format));
  return this;
}
origin: streampipes/streampipes-ce

/**
 * Assigns a new {@link org.streampipes.model.grounding.TransportProtocol} to the stream definition.
 * @param protocol The transport protocol of the stream at runtime (e.g., Kafka or MQTT). Use
 * {@link org.streampipes.sdk.helpers.Protocols} to use some pre-defined protocols (or create a new protocol as
 *                 described in the developer guide).
 * @return this
 */
public DataStreamBuilder protocol(TransportProtocol protocol) {
  this.eventGrounding.setTransportProtocol(protocol);
  return this;
}
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

/**
 * Assigns supported communication/transport protocols to the pipeline elements that can be handled at runtime (e.g.,
 * Kafka or JMS).
 * @param protocols A list of supported {@link org.streampipes.model.grounding.TransportProtocol}s. Use
 *                {@link org.streampipes.sdk.helpers.SupportedProtocols} to assign protocols from some pre-defined
 *                 ones or create your own by following the developer guide.
 * @return this
 */
public BU supportedProtocols(List<TransportProtocol> protocols) {
 this.supportedGrounding.setTransportProtocols(protocols);
 return me();
}
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));
 }
}
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: org.streampipes/streampipes-connect

  public static EventGrounding createEventGrounding(String kafkaHost, int kafkaPort, EventSchema eventSchema) {
    EventGrounding eventGrounding = new EventGrounding();
    KafkaTransportProtocol transportProtocol = new KafkaTransportProtocol();
    transportProtocol.setBrokerHostname(kafkaHost);
    transportProtocol.setKafkaPort(kafkaPort);

    String topic = "org.streampipes.connect." + UUID.randomUUID();
    System.out.println("Topic: " + topic);
    TopicDefinition topicDefinition = new SimpleTopicDefinition(topic);
    transportProtocol.setTopicDefinition(topicDefinition);

    eventGrounding.setTransportProtocol(transportProtocol);


    return eventGrounding;
  }
}
origin: streampipes/streampipes-ce

protected DataSetBuilder(String id, String label, String description) {
 super(id, label, description, new SpDataSet());
 this.eventProperties = new ArrayList<>();
 this.supportedGrounding = new EventGrounding();
}
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: streampipes/streampipes-ce

public DataSetBuilder supportedFormat(TransportFormat format) {
 this.supportedGrounding.setTransportFormats(Collections.singletonList(format));
 return this;
}
origin: streampipes/streampipes-ce

public DataSetBuilder supportedProtocol(TransportProtocol protocol) {
 this.supportedGrounding.setTransportProtocol(protocol);
 return this;
}
org.streampipes.model.groundingEventGrounding

Most used methods

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

Popular in Java

  • Start an intent from android
  • setContentView (Activity)
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • JButton (javax.swing)
  • 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