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

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

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

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: streampipes/streampipes-ce

public DataSetBuilder supportedProtocol(TransportProtocol protocol) {
 this.supportedGrounding.setTransportProtocol(protocol);
 return this;
}
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

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

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

  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

 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: 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

ds = ((AdapterSetDescription) adapterDescription).getDataSet();
EventGrounding eg = new EventGrounding();
eg.setTransportProtocol(SupportedProtocols.kafka());
eg.setTransportFormats(Arrays.asList(SupportedFormats.jsonFormat()));
((SpDataSet) ds).setSupportedGrounding(eg);
EventGrounding eg = new EventGrounding();
eg.setTransportFormats(Arrays.asList(Formats.jsonFormat()));
eg.setTransportProtocol(tp);
org.streampipes.model.groundingEventGroundingsetTransportProtocol

Popular methods of EventGrounding

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • notifyDataSetChanged (ArrayAdapter)
  • runOnUiThread (Activity)
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Join (org.hibernate.mapping)
  • Table (org.hibernate.mapping)
    A relational table
  • 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