@POST @Produces(MediaType.APPLICATION_JSON) @GsonWithIds @Override public Response addRdfEndpoint(org.streampipes.model.client.endpoint.RdfEndpoint rdfEndpoint) { getRdfEndpointStorage() .addRdfEndpoint(rdfEndpoint); return Response.status(Response.Status.OK).build(); }
@DELETE @Path("/{rdfEndpointId}") @Produces(MediaType.APPLICATION_JSON) @GsonWithIds @Override public Response removeRdfEndpoint(@PathParam("rdfEndpointId") String rdfEndpointId) { getRdfEndpointStorage() .removeRdfEndpoint(rdfEndpointId); return Response.status(Response.Status.OK).build(); }
public List<RdfEndpoint> getEndpoints() { List<String> endpoints = ConsulUtil.getActivePEServicesEndPoints(); List<org.streampipes.model.client.endpoint.RdfEndpoint> servicerdRdfEndpoints = new LinkedList<>(); for (String endpoint : endpoints) { org.streampipes.model.client.endpoint.RdfEndpoint rdfEndpoint = new org.streampipes.model.client.endpoint.RdfEndpoint(endpoint); servicerdRdfEndpoints.add(rdfEndpoint); } List<org.streampipes.model.client.endpoint.RdfEndpoint> databasedRdfEndpoints = StorageDispatcher.INSTANCE.getNoSqlStore() .getRdfEndpointStorage() .getRdfEndpoints(); List<org.streampipes.model.client.endpoint.RdfEndpoint> concatList = Stream.of(databasedRdfEndpoints, servicerdRdfEndpoints) .flatMap(Collection::stream) .collect(Collectors.toList()); return concatList; } }
public List<RdfEndpoint> getEndpoints() { List<String> endpoints = ConsulUtil.getActivePEServicesEndPoints(); List<org.streampipes.model.client.endpoint.RdfEndpoint> servicerdRdfEndpoints = new LinkedList<>(); for (String endpoint : endpoints) { org.streampipes.model.client.endpoint.RdfEndpoint rdfEndpoint = new org.streampipes.model.client.endpoint.RdfEndpoint(endpoint); servicerdRdfEndpoints.add(rdfEndpoint); } List<org.streampipes.model.client.endpoint.RdfEndpoint> databasedRdfEndpoints = StorageDispatcher.INSTANCE.getNoSqlStore() .getRdfEndpointStorage() .getRdfEndpoints(); List<org.streampipes.model.client.endpoint.RdfEndpoint> concatList = Stream.of(databasedRdfEndpoints, servicerdRdfEndpoints) .flatMap(Collection::stream) .collect(Collectors.toList()); return concatList; } }