Search in sources :

Example 6 with ModelEndpoint

use of org.apache.metron.maas.config.ModelEndpoint in project metron by apache.

the class ServiceDiscoveryIntegrationTest method registerService.

private void registerService(String name, String version, AtomicInteger containerId) throws Exception {
    ModelEndpoint ep = new ModelEndpoint();
    ep.setName(name);
    ep.setVersion(version);
    ep.setContainerId(containerId.incrementAndGet() + "");
    ep.setEndpoint(new Endpoint() {

        {
            setUrl("http://localhost:9080/ep1");
        }
    });
    registerService(ep);
}
Also used : ModelEndpoint(org.apache.metron.maas.config.ModelEndpoint) Endpoint(org.apache.metron.maas.config.Endpoint) ModelEndpoint(org.apache.metron.maas.config.ModelEndpoint)

Aggregations

ModelEndpoint (org.apache.metron.maas.config.ModelEndpoint)6 URL (java.net.URL)3 Endpoint (org.apache.metron.maas.config.Endpoint)3 MalformedURLException (java.net.MalformedURLException)2 RetryPolicy (org.apache.curator.RetryPolicy)2 ExponentialBackoffRetry (org.apache.curator.retry.ExponentialBackoffRetry)2 MaaSConfig (org.apache.metron.maas.config.MaaSConfig)2 File (java.io.File)1 IOException (java.io.IOException)1 CuratorFramework (org.apache.curator.framework.CuratorFramework)1 TestingServer (org.apache.curator.test.TestingServer)1 JsonInstanceSerializer (org.apache.curator.x.discovery.details.JsonInstanceSerializer)1 Model (org.apache.metron.maas.config.Model)1 ServiceDiscoverer (org.apache.metron.maas.discovery.ServiceDiscoverer)1 Context (org.apache.metron.stellar.dsl.Context)1