Java Code Examples for org.apache.camel.Endpoint

The following examples show how to use org.apache.camel.Endpoint. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: funktion-connectors   Author: funktionio   File: K8NatsComponent.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
    K8NatsConfiguration config = new K8NatsConfiguration();
    setProperties(config, parameters);


    String topic = remaining.split("\\?")[0];
    if (topic != null){
        config.setTopic(topic);
    }

    String servers = config.getServiceName() + ":" + config.getPort();
    config.setServers(servers);

    NatsEndpoint endpoint = new NatsEndpoint(uri, this, config);
    return endpoint;
}
 
Example #2
Source Project: camel-quarkus   Author: apache   File: QuteComponent.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
    boolean cache = getAndRemoveParameter(parameters, "contentCache", Boolean.class, Boolean.TRUE);

    QuteEndpoint answer = new QuteEndpoint(uri, this, remaining);
    answer.setContentCache(cache);
    answer.setAllowTemplateFromHeader(allowTemplateFromHeader);
    answer.setQuteEngine(quteEngine);

    setProperties(answer, parameters);

    // if its a http resource then append any remaining parameters and update the resource uri
    if (ResourceHelper.isHttpUri(remaining)) {
        remaining = ResourceHelper.appendParameters(remaining, parameters);
        answer.setResourceUri(remaining);
    }

    return answer;
}
 
Example #3
Source Project: syncope   Author: apache   File: AbstractCamelProvisioningManager.java    License: Apache License 2.0 6 votes vote down vote up
protected PollingConsumer getConsumer(final String uri) {
    if (!knownURIs.contains(uri)) {
        knownURIs.add(uri);
        Endpoint endpoint = contextFactory.getCamelContext().getEndpoint(uri);
        PollingConsumer pollingConsumer = null;
        try {
            pollingConsumer = endpoint.createPollingConsumer();
            consumerMap.put(uri, pollingConsumer);
            pollingConsumer.start();
        } catch (Exception ex) {
            LOG.error("Unexpected error in Consumer creation ", ex);
        }
        return pollingConsumer;
    } else {
        return consumerMap.get(uri);
    }
}
 
Example #4
Source Project: activiti6-boot2   Author: dingziyang   File: ActivitiComponent.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected Endpoint createEndpoint(String s, String s1, Map<String, Object> parameters) throws Exception {
  ActivitiEndpoint ae = new ActivitiEndpoint(s, getCamelContext());
  ae.setIdentityService(identityService);
  ae.setRuntimeService(runtimeService);
  ae.setRepositoryService(repositoryService);

  ae.setCopyVariablesToProperties(this.copyVariablesToProperties);
  ae.setCopyVariablesToBodyAsMap(this.copyVariablesToBodyAsMap);
  ae.setCopyCamelBodyToBody(this.copyCamelBodyToBody);

  Map<String, Object> returnVars = IntrospectionSupport.extractProperties(parameters, "var.return.");
  if (returnVars != null && returnVars.size() > 0) {
    ae.getReturnVarMap().putAll(returnVars);
  }

  return ae;
}
 
Example #5
Source Project: syndesis   Author: syndesisio   File: SwaggerProxyComponentTest.java    License: Apache License 2.0 6 votes vote down vote up
@Test
public void testSwaggerProxyComponent() throws Exception {
    CamelContext context = new DefaultCamelContext();
    ComponentProxyFactory factory = new ConnectorFactory();
    ComponentProxyComponent proxy = factory.newInstance("swagger-1", "rest-openapi");

    try {
        proxy.setCamelContext(context);
        proxy.start();

        Endpoint endpoint = proxy.createEndpoint("swagger-1:http://foo.bar");

        assertThat(endpoint).isInstanceOfSatisfying(DelegateEndpoint.class, e -> {
            assertThat(e.getEndpoint()).isInstanceOf(RestOpenApiEndpoint.class);
            assertThat(e.getEndpoint()).hasFieldOrPropertyWithValue("componentName", SyndesisRestSwaggerComponent.COMPONENT_NAME);
        });
    } finally {
        proxy.stop();
    }
}
 
Example #6
Source Project: syndesis   Author: syndesisio   File: AWSS3RawOptionsTest.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected CamelContext createCamelContext() throws Exception {
    CamelContext camelContext = super.createCamelContext();
    camelContext.setAutoStartup(false);
    camelContext.addComponent("aws-s3", new S3Component() {
        @Override
        protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
            final S3Configuration configuration = new S3Configuration();
            setProperties(configuration, parameters);

            return new S3Endpoint(uri, this, configuration) {
                @Override
                public void doStart() throws Exception {
                    // don't let the endpoint to start as it would try to
                    // process the keys
                }
            };
        }
    });

    return camelContext;
}
 
Example #7
Source Project: funktion-connectors   Author: funktionio   File: K8ElasticSearchComponent.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
    K8ElasticSearchConfiguration config = new K8ElasticSearchConfiguration();
    setProperties(config, parameters);
    config.setLocal(false);

    String serviceName = config.getServiceName();
    config.setClusterName(serviceName);

    String operation = remaining;
    if (operation != null){
        config.setOperation(operation);
    }


    config.setTransportAddressesList(parseTransportAddresses(config.getTransportAddresses(), config));

    Endpoint endpoint = new ElasticsearchEndpoint(uri, this, config, getClient());
    return endpoint;
}
 
Example #8
Source Project: syndesis   Author: syndesisio   File: SalesforceStreamingConnectorFactory.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected Endpoint createDelegateEndpoint(ComponentDefinition definition, String scheme, Map<String, String> options) {
    final String sObjectName = options.get(SalesforceEndpointConfig.SOBJECT_NAME);
    final String query = "SELECT Id FROM " + sObjectName;
    final String topicName = SalesforceUtil.topicNameFor(options);

    options.put("topicName", topicName);
    options.put(SalesforceEndpointConfig.SOBJECT_QUERY, query);
    options.remove(SalesforceEndpointConfig.SOBJECT_NAME);

    if (!topicName.endsWith("_d")) {
        setBeforeConsumer(
            new Enricher(
                new ConstantExpression(scheme + ":getSObject?rawPayload=true&sObjectName=" + sObjectName)
            )
        );
    }

    return super.createDelegateEndpoint(definition, scheme, options);
}
 
Example #9
Source Project: vertx-camel-bridge   Author: vert-x3   File: InboundEndpointTest.java    License: Apache License 2.0 6 votes vote down vote up
@Test
public void testWithDirectEndpoint(TestContext context) throws Exception {
  Async async = context.async();
  Endpoint endpoint = camel.getEndpoint("direct:foo");

  bridge = CamelBridge.create(vertx, new CamelBridgeOptions(camel)
      .addInboundMapping(fromCamel("direct:foo").toVertx("test")));

  vertx.eventBus().consumer("test", message -> {
    context.assertEquals("hello", message.body());
    async.complete();
  });

  camel.start();
  BridgeHelper.startBlocking(bridge);

  ProducerTemplate producer = camel.createProducerTemplate();
  producer.asyncSendBody(endpoint, "hello");
}
 
Example #10
Source Project: vertx-camel-bridge   Author: vert-x3   File: InboundEndpointTest.java    License: Apache License 2.0 6 votes vote down vote up
@Test
public void testWithDirectEndpointAndCustomType(TestContext context) throws Exception {
  Async async = context.async();
  Endpoint endpoint = camel.getEndpoint("direct:foo");

  vertx.eventBus().registerDefaultCodec(Person.class, new PersonCodec());

  bridge = CamelBridge.create(vertx, new CamelBridgeOptions(camel)
      .addInboundMapping(fromCamel("direct:foo").toVertx("test")));

  vertx.eventBus().<Person>consumer("test", message -> {
    context.assertEquals("bob", message.body().getName());
    async.complete();
  });

  camel.start();
  BridgeHelper.startBlocking(bridge);

  ProducerTemplate producer = camel.createProducerTemplate();
  producer.asyncSendBody(endpoint, new Person().setName("bob"));
}
 
Example #11
Source Project: vertx-camel-bridge   Author: vert-x3   File: InboundEndpointTest.java    License: Apache License 2.0 6 votes vote down vote up
@Test
public void testWithDirectEndpoint2(TestContext context) throws Exception {
  Async async = context.async();
  Endpoint endpoint = camel.getEndpoint("direct:foo");

  bridge = CamelBridge.create(vertx, new CamelBridgeOptions(camel)
      .addInboundMapping(fromCamel(endpoint).toVertx("test")));

  vertx.eventBus().consumer("test", message -> {
    context.assertEquals("hello", message.body());
    async.complete();
  });

  camel.start();
  BridgeHelper.startBlocking(bridge);

  ProducerTemplate producer = camel.createProducerTemplate();
  producer.asyncSendBody(endpoint, "hello");
}
 
Example #12
Source Project: flowable-engine   Author: flowable   File: FlowableComponent.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected Endpoint createEndpoint(String s, String s1, Map<String, Object> parameters) throws Exception {
    FlowableEndpoint ae = new FlowableEndpoint(s, getCamelContext());
    ae.setIdentityService(identityService);
    ae.setRuntimeService(runtimeService);
    ae.setRepositoryService(repositoryService);
    ae.setManagementService(managementService);

    ae.setCopyVariablesToProperties(this.copyVariablesToProperties);
    ae.setCopyVariablesToBodyAsMap(this.copyVariablesToBodyAsMap);
    ae.setCopyCamelBodyToBody(this.copyCamelBodyToBody);

    Map<String, Object> returnVars = IntrospectionSupport.extractProperties(parameters, "var.return.");
    if (returnVars != null && returnVars.size() > 0) {
        ae.getReturnVarMap().putAll(returnVars);
    }

    return ae;
}
 
Example #13
Source Project: camel-kafka-connector   Author: apache   File: CamelSourceTask.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void start(Map<String, String> props) {
    try {
        LOG.info("Starting CamelSourceTask connector task");
        Map<String, String> actualProps = TaskHelper.mergeProperties(getDefaultConfig(), props);
        config = getCamelSourceConnectorConfig(actualProps);

        maxBatchPollSize = config.getLong(CamelSourceConnectorConfig.CAMEL_SOURCE_MAX_BATCH_POLL_SIZE_CONF);
        maxPollDuration = config.getLong(CamelSourceConnectorConfig.CAMEL_SOURCE_MAX_POLL_DURATION_CONF);

        camelMessageHeaderKey = config.getString(CamelSourceConnectorConfig.CAMEL_SOURCE_MESSAGE_HEADER_KEY_CONF);

        String remoteUrl = config.getString(CamelSourceConnectorConfig.CAMEL_SOURCE_URL_CONF);
        final String unmarshaller = config.getString(CamelSourceConnectorConfig.CAMEL_SOURCE_UNMARSHAL_CONF);
        topic = config.getString(CamelSourceConnectorConfig.TOPIC_CONF);

        String localUrl = getLocalUrlWithPollingOptions(config);

        CamelContext camelContext = new DefaultCamelContext();
        if (remoteUrl == null) {
            remoteUrl = TaskHelper.buildUrl(camelContext.adapt(ExtendedCamelContext.class).getRuntimeCamelCatalog(),
                    actualProps, config.getString(CamelSourceConnectorConfig.CAMEL_SOURCE_COMPONENT_CONF),
                    CAMEL_SOURCE_ENDPOINT_PROPERTIES_PREFIX, CAMEL_SOURCE_PATH_PROPERTIES_PREFIX);
        }

        cms = new CamelMainSupport(actualProps, remoteUrl, localUrl, null, unmarshaller, 10, 500, camelContext);

        Endpoint endpoint = cms.getEndpoint(localUrl);
        consumer = endpoint.createPollingConsumer();
        consumer.start();

        cms.start();
        LOG.info("CamelSourceTask connector task started");
    } catch (Exception e) {
        throw new ConnectException("Failed to create and start Camel context", e);
    }
}
 
Example #14
Source Project: camel-quarkus   Author: apache   File: RefResource.java    License: Apache License 2.0 5 votes vote down vote up
@Unremovable
@Singleton
@Named("my-endpoint")
@javax.enterprise.inject.Produces
public Endpoint myEndpoint() {
    return camelContext.getEndpoint("direct:start");
}
 
Example #15
Source Project: camel-quarkus   Author: apache   File: WebhookComponentProducer.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
    TestWebhookEndpoint endpoint = new TestWebhookEndpoint(uri, this);
    endpoint.setWebhookHandler(processor -> exchange -> {
        exchange.getMessage().setBody("Camel Quarkus Webhook");
        processor.process(exchange);
    });
    return endpoint;
}
 
Example #16
Source Project: quarkus-in-prod   Author: brunobat   File: CustomProcessorFactory.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public Processor createProcessor(final RouteContext routeContext, final NamedNode definition)
    throws Exception {

    if (definition instanceof SendDefinition) {
        Endpoint endpoint = resolveEndpoint(routeContext, (SendDefinition) definition);
        return new CustomSendProcessor(endpoint, ((SendDefinition) definition).getPattern());
    }

    return null;
}
 
Example #17
Source Project: wildfly-camel   Author: wildfly-extras   File: CxfDefaultBusHandler.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void onEndpointAdd(Endpoint endpoint) {
    if (endpoint instanceof CxfRsEndpoint) {
        final CxfRsEndpoint rsEndPoint = (CxfRsEndpoint) endpoint;
        /* We set the bus only if the user has not provided one himself */
        if (rsEndPoint.getBus() == null) {
            rsEndPoint.setBus(bus);
        }
    }
}
 
Example #18
Source Project: camel-k-runtime   Author: apache   File: KnativeHttpProducer.java    License: Apache License 2.0 5 votes vote down vote up
public KnativeHttpProducer(
        KnativeHttpTransport transport,
        Endpoint endpoint,
        KnativeEnvironment.KnativeServiceDefinition serviceDefinition,
        Vertx vertx,
        WebClientOptions clientOptions) {
    super(endpoint);

    this.transport = transport;
    this.serviceDefinition = serviceDefinition;
    this.vertx = ObjectHelper.notNull(vertx, "vertx");
    this.clientOptions = ObjectHelper.supplyIfEmpty(clientOptions, WebClientOptions::new);
    this.headerFilterStrategy = new KnativeHttpHeaderFilterStrategy();
    this.uri = Suppliers.memorize(() -> computeUrl(serviceDefinition));
}
 
Example #19
Source Project: camel-k-runtime   Author: apache   File: KnativeHttpTransport.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public Consumer createConsumer(Endpoint endpoint, KnativeTransportConfiguration config, KnativeEnvironment.KnativeServiceDefinition service, Processor processor) {
    Processor next = KnativeHttpSupport.remapCloudEventHeaders(processor, config.getCloudEvent());

    if (config.isRemoveCloudEventHeadersInReply()) {
        next = KnativeHttpSupport.withoutCloudEventHeaders(next, config.getCloudEvent());
    }

    return new KnativeHttpConsumer(this, endpoint, service, this.router, next);
}
 
Example #20
Source Project: flowable-engine   Author: flowable   File: CamelBehavior.java    License: Apache License 2.0 5 votes vote down vote up
protected FlowableEndpoint getEndpoint(String key) {
    for (Endpoint e : camelContextObj.getEndpoints()) {
        if (e.getEndpointKey().equals(key) && (e instanceof FlowableEndpoint)) {
            return (FlowableEndpoint) e;
        }
    }
    throw new FlowableException("Endpoint not defined for " + key);
}
 
Example #21
Source Project: wildfly-camel   Author: wildfly-extras   File: DnsIntegrationTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testDnsComponent() throws Exception {
    CamelContext camelctx = new DefaultCamelContext();
    Endpoint endpoint = camelctx.getEndpoint("dns:lookup");
    Assert.assertNotNull(endpoint);
    Assert.assertEquals(endpoint.getClass().getName(), "org.apache.camel.component.dns.DnsEndpoint");
}
 
Example #22
Source Project: camel-k-runtime   Author: apache   File: KnativeComponent.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
    if (ObjectHelper.isEmpty(remaining)) {
        throw new IllegalArgumentException("Expecting URI in the form of: 'knative:type/name', got '" + uri + "'");
    }

    final String type = ObjectHelper.supplyIfEmpty(StringHelper.before(remaining, "/"), () -> remaining);
    final String name = StringHelper.after(remaining, "/");
    final KnativeConfiguration conf = getKnativeConfiguration();

    conf.getFilters().putAll(
        PropertiesHelper.extractProperties(parameters, "filter.", true)
    );
    conf.getTransportOptions().putAll(
        PropertiesHelper.extractProperties(parameters, "transport.", true)
    );
    conf.getCeOverride().putAll(
        PropertiesHelper.extractProperties(parameters, "ce.override.", true)
    );

    // set properties from the endpoint uri
    PropertyBindingSupport.bindProperties(getCamelContext(), conf, parameters);

    if (ObjectHelper.isEmpty(conf.getServiceName())) {
        conf.setServiceName(name);
    }

    return new KnativeEndpoint(uri, this, Knative.Type.valueOf(type), name, conf);
}
 
Example #23
Source Project: camel-k-runtime   Author: apache   File: KnativeTransportNoop.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public Producer createProducer(Endpoint endpoint, KnativeTransportConfiguration configuration, KnativeEnvironment.KnativeServiceDefinition service) {
    return new DefaultProducer(endpoint) {
        @Override
        public void process(Exchange exchange) throws Exception {
        }
    };
}
 
Example #24
Source Project: Ardulink-2   Author: Ardulink   File: ArdulinkComponent.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected Endpoint createEndpoint(String uri, String remaining,
		Map<String, Object> parameters) throws Exception {
	EndpointConfig config = new EndpointConfig()
			.type(remaining)
			.listenTo(parsePins(getOptional(parameters, "listenTo").or("")))
			.linkParams(parameters);
	parameters.clear();
	ArdulinkEndpoint endpoint = new ArdulinkEndpoint(uri, this, config);
	setProperties(endpoint, parameters);
	return endpoint;
}
 
Example #25
Source Project: syndesis   Author: syndesisio   File: ComponentProxyComponent.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) {
    // merge parameters
    final Map<String, Object> options = new HashMap<>();
    doAddOptions(options, this.remainingOptions);
    doAddOptions(options, parameters);

    // create the uri of the base component, DO NOT log the computed delegate
    final Map<String, String> endpointOptions = buildEndpointOptions(remaining, options);
    final String endpointScheme = componentSchemeAlias.orElse(componentScheme);
    ComponentDefinition definition = getDefinition();
    final Endpoint delegate = createDelegateEndpoint(definition, endpointScheme, endpointOptions);

    LOGGER.info("Connector resolved: {} -> {}", URISupport.sanitizeUri(uri), URISupport.sanitizeUri(delegate.getEndpointUri()));

    // remove options already set on the endpoint
    options.keySet().removeIf(endpointOptions::containsKey);

    // Configure the delegated endpoint
    configureDelegateEndpoint(definition, delegate, options);

    final ComponentProxyEndpoint answer = new ComponentProxyEndpoint(uri, this, delegate);
    answer.setBeforeProducer(CamelContextAware.trySetCamelContext(getBeforeProducer(), getCamelContext()));
    answer.setAfterProducer(CamelContextAware.trySetCamelContext(getAfterProducer(), getCamelContext()));
    answer.setBeforeConsumer(CamelContextAware.trySetCamelContext(getBeforeConsumer(), getCamelContext()));
    answer.setAfterConsumer(CamelContextAware.trySetCamelContext(getAfterConsumer(), getCamelContext()));

    // clean-up parameters so that validation won't fail later on
    // in DefaultConnectorComponent.validateParameters()
    parameters.clear();

    // remove temporary options
    this.remainingOptions.clear();

    return answer;
}
 
Example #26
Source Project: syncope   Author: apache   File: StatusProducer.java    License: Apache License 2.0 5 votes vote down vote up
public StatusProducer(
        final Endpoint endpoint,
        final AnyTypeKind anyTypeKind,
        final UserDAO userDAO,
        final UserWorkflowAdapter uwfAdapter) {

    super(endpoint, anyTypeKind);
    this.userDAO = userDAO;
    this.uwfAdapter = uwfAdapter;
}
 
Example #27
Source Project: syndesis   Author: syndesisio   File: CustomComponentTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testCustomComponentEndpoint() throws Exception {
    final CamelContext context = new DefaultCamelContext();

    final ComponentProxyComponent component = new ComponentProxyComponent("acme-1", "acme", AcmeComponent.class);
    component.setCamelContext(context);
    component.setOptions(CollectionHelper.mapOf("name", "test", "param", "p1"));
    component.start();

    final Endpoint endpoint = component.createEndpoint("acme");

    assertThat(endpoint).isInstanceOf(ComponentProxyEndpoint.class);
    assertThat(endpoint).hasFieldOrPropertyWithValue("delegateEndpointUri", "acme://test?param=p1");
}
 
Example #28
Source Project: ignite   Author: apache   File: IgniteCamelStreamerTest.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * @throws Exception
 */
@Test
public void testUserSpecifiedCamelContext() throws Exception {
    final AtomicInteger cnt = new AtomicInteger();

    // Create a CamelContext with a probe that'll help us know if it has been used.
    CamelContext context = new DefaultCamelContext();
    context.setTracing(true);
    context.addLifecycleStrategy(new LifecycleStrategySupport() {
        @Override public void onEndpointAdd(Endpoint endpoint) {
            cnt.incrementAndGet();
        }
    });

    streamer.setSingleTupleExtractor(singleTupleExtractor());
    streamer.setCamelContext(context);

    // Subscribe to cache PUT events.
    CountDownLatch latch = subscribeToPutEvents(50);

    // Action time.
    streamer.start();

    // Send messages.
    sendMessages(0, 50, false);

    // Assertions.
    assertTrue(latch.await(10, TimeUnit.SECONDS));
    assertCacheEntriesLoaded(50);
    assertTrue(cnt.get() > 0);
}
 
Example #29
Source Project: incubator-batchee   Author: apache   File: TestComponent.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected Endpoint createEndpoint(final String uri, final String remaining, final Map<String, Object> parameters) throws Exception {
    final String value = String.class.cast(parameters.remove("value"));
    return new DefaultEndpoint() {
        @Override
        protected String createEndpointUri() {
            return uri;
        }

        @Override
        public Producer createProducer() throws Exception {
            return new DefaultProducer(this) {
                @Override
                public void process(final Exchange exchange) throws Exception {
                    exchange.getIn().setBody(exchange.getIn().getBody(String.class) + value);
                }
            };
        }

        @Override
        public Consumer createConsumer(final Processor processor) throws Exception {
            throw new UnsupportedOperationException();
        }

        @Override
        public boolean isSingleton() {
            return true;
        }
    };
}
 
Example #30
Source Project: DataVec   Author: deeplearning4j   File: DataVecComponent.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
    DataVecEndpoint endpoint = new DataVecEndpoint(uri, this);
    setProperties(endpoint, parameters);
    endpoint.setInputFormat(remaining);
    return endpoint;
}