repo_name
stringlengths
7
104
file_path
stringlengths
13
198
context
stringlengths
67
7.15k
import_statement
stringlengths
16
4.43k
code
stringlengths
40
6.98k
prompt
stringlengths
227
8.27k
next_line
stringlengths
8
795
twak/campskeleton
src/org/twak/camp/ui/Marker.java
// Path: src/org/twak/camp/Tag.java // public class Tag // { // static Rainbow rainbow; // public Color color; // public String name; // String colorName; // // public Tag() // { // this ("unnamed"); // } // // public Tag (String name) // { // color = Rainbow.next( ...
import java.util.HashMap; import java.util.Map; import javax.vecmath.Point2d; import org.twak.camp.Tag;
package org.twak.camp.ui; /** * marks the locatino of a feature on a Bar * @author twak */ public class Marker extends Point2d { @Deprecated
// Path: src/org/twak/camp/Tag.java // public class Tag // { // static Rainbow rainbow; // public Color color; // public String name; // String colorName; // // public Tag() // { // this ("unnamed"); // } // // public Tag (String name) // { // color = Rainbow.next( ...
public Tag feature;
twak/campskeleton
src/org/twak/camp/Machine.java
// Path: src/org/twak/camp/ui/DirectionHeightEvent.java // public class DirectionHeightEvent implements HeightEvent // { // protected double height; // // newAngle is the angle that this edge will turn towards at the above height // // length is the distance until the next event (only used for horizontal di...
import java.awt.Color; import java.util.ArrayList; import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import org.twak.camp.ui.DirectionHeightEvent;
package org.twak.camp; /** * A machine controls the angle of it's set of edges over time (height...) * * superclass of all machines * * idea is to add all directions before adding edges. When you add the first edge * * instead of just adding all height changes to the main event queue, this * machine only ad...
// Path: src/org/twak/camp/ui/DirectionHeightEvent.java // public class DirectionHeightEvent implements HeightEvent // { // protected double height; // // newAngle is the angle that this edge will turn towards at the above height // // length is the distance until the next event (only used for horizontal di...
addHeightEvent( new DirectionHeightEvent( this, initial ) );
twak/campskeleton
src/org/twak/camp/SkeletonCapUpdate.java
// Path: src/org/twak/camp/debug/DebugDevice.java // public class DebugDevice // { // // global debug switch // public static boolean debug; // change in reset(), below // public static DebugDevice instance = new DebugDevice(); // // public static void reset() { // debug = false; // ...
import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; import javax.vecmath.Point3d; import javax.vecmath.Vect...
if (trailing != null) // polarity needs fixing up? first section sometimes capped, sometimes not. { // because the cap (base) is at height 0, we elevate it here. skel.output.addOutputSideTo( true, trailing.corner, s.corner, baseE ); ...
// Path: src/org/twak/camp/debug/DebugDevice.java // public class DebugDevice // { // // global debug switch // public static boolean debug; // change in reset(), below // public static DebugDevice instance = new DebugDevice(); // // public static void reset() { // debug = false; // ...
DebugDevice.dump("post cap update", skel);
twak/campskeleton
src/org/twak/camp/Output.java
// Path: src/org/twak/camp/Output.java // public class Face // { // // first is outside, others are holes // public LoopL<Point3d> points = null; // // public Set<Tag> plan = new HashSet<>(), profile = new HashSet<>(); // // // bottom edges // public Set<SharedEdge> definingSE = new LinkedHashSet<...
import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; import javax.vecmath.Point3d; import javax.vecmath.Tuple3d; import javax.vecmath.Vector3d; import org.twak...
package org.twak.camp; /** * @author twak */ public class Output { // marker for horizontal input edges (other edges can also be horizontal...) public static Tag isCreatedHorizontal = new Tag ("horizontal");
// Path: src/org/twak/camp/Output.java // public class Face // { // // first is outside, others are holes // public LoopL<Point3d> points = null; // // public Set<Tag> plan = new HashSet<>(), profile = new HashSet<>(); // // // bottom edges // public Set<SharedEdge> definingSE = new LinkedHashSet<...
public Map<Corner, Face> faces = new LinkedHashMap<>(); // the faces represented by each edge
nicoulaj/checksum-maven-plugin
src/main/java/net/nicoulaj/maven/plugins/checksum/execution/AbstractExecution.java
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/execution/target/ExecutionTarget.java // public interface ExecutionTarget // { // /** // * Initialize the target. // * // * <p>Should be called before first call to {@link #write(String, ChecksumFile, String)}.</p> // * // * @throws...
import net.nicoulaj.maven.plugins.checksum.execution.target.ExecutionTarget; import net.nicoulaj.maven.plugins.checksum.mojo.ChecksumFile; import java.util.LinkedList; import java.util.List;
/* * checksum-maven-plugin - http://checksum-maven-plugin.nicoulaj.net * Copyright © 2010-2021 checksum-maven-plugin contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ...
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/execution/target/ExecutionTarget.java // public interface ExecutionTarget // { // /** // * Initialize the target. // * // * <p>Should be called before first call to {@link #write(String, ChecksumFile, String)}.</p> // * // * @throws...
protected List<ChecksumFile> files;
nicoulaj/checksum-maven-plugin
src/main/java/net/nicoulaj/maven/plugins/checksum/execution/target/ExecutionTarget.java
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/mojo/ChecksumFile.java // public class ChecksumFile // { // protected final String basePath; // // protected final File file; // // protected final String extension; // // protected final String classifier; // // /** // * <p>Constructor for ...
import net.nicoulaj.maven.plugins.checksum.mojo.ChecksumFile;
/*- * ==================================================================== * checksum-maven-plugin * ==================================================================== * Copyright (C) 2010 - 2016 Julien Nicoulaud <julien.nicoulaud@gmail.com> * ==================================================================== ...
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/mojo/ChecksumFile.java // public class ChecksumFile // { // protected final String basePath; // // protected final File file; // // protected final String extension; // // protected final String classifier; // // /** // * <p>Constructor for ...
void write( String digest, ChecksumFile file, String algorithm )
nicoulaj/checksum-maven-plugin
src/test/java/net/nicoulaj/maven/plugins/checksum/test/unit/digest/ChecksumFactoryTest.java
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/digest/DigesterFactory.java // public class DigesterFactory // { // /** // * The instance of {@link net.nicoulaj.maven.plugins.checksum.digest.DigesterFactory}. // */ // private static DigesterFactory instance; // // /** // * The map...
import net.nicoulaj.maven.plugins.checksum.digest.DigesterFactory; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import java.security.NoSuchAlgorithmException;
/* * checksum-maven-plugin - http://checksum-maven-plugin.nicoulaj.net * Copyright © 2010-2021 checksum-maven-plugin contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ...
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/digest/DigesterFactory.java // public class DigesterFactory // { // /** // * The instance of {@link net.nicoulaj.maven.plugins.checksum.digest.DigesterFactory}. // */ // private static DigesterFactory instance; // // /** // * The map...
DigesterFactory.getInstance().getFileDigester( "SHA-666" );
nicoulaj/checksum-maven-plugin
src/main/java/net/nicoulaj/maven/plugins/checksum/execution/Execution.java
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/execution/target/ExecutionTarget.java // public interface ExecutionTarget // { // /** // * Initialize the target. // * // * <p>Should be called before first call to {@link #write(String, ChecksumFile, String)}.</p> // * // * @throws...
import net.nicoulaj.maven.plugins.checksum.execution.target.ExecutionTarget; import net.nicoulaj.maven.plugins.checksum.mojo.ChecksumFile; import java.util.List;
/* * checksum-maven-plugin - http://checksum-maven-plugin.nicoulaj.net * Copyright © 2010-2021 checksum-maven-plugin contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ...
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/execution/target/ExecutionTarget.java // public interface ExecutionTarget // { // /** // * Initialize the target. // * // * <p>Should be called before first call to {@link #write(String, ChecksumFile, String)}.</p> // * // * @throws...
List<ChecksumFile> getFiles();
nicoulaj/checksum-maven-plugin
src/main/java/net/nicoulaj/maven/plugins/checksum/execution/target/MavenLogTarget.java
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/mojo/ChecksumFile.java // public class ChecksumFile // { // protected final String basePath; // // protected final File file; // // protected final String extension; // // protected final String classifier; // // /** // * <p>Constructor for ...
import net.nicoulaj.maven.plugins.checksum.mojo.ChecksumFile; import org.apache.maven.plugin.logging.Log;
/*- * ==================================================================== * checksum-maven-plugin * ==================================================================== * Copyright (C) 2010 - 2016 Julien Nicoulaud <julien.nicoulaud@gmail.com> * ==================================================================== ...
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/mojo/ChecksumFile.java // public class ChecksumFile // { // protected final String basePath; // // protected final File file; // // protected final String extension; // // protected final String classifier; // // /** // * <p>Constructor for ...
public void write( String digest, ChecksumFile file, String algorithm )
nicoulaj/checksum-maven-plugin
src/main/java/net/nicoulaj/maven/plugins/checksum/execution/target/XmlSummaryFileTarget.java
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/artifacts/ArtifactListener.java // public interface ArtifactListener { // /** // * <p>artifactCreated.</p> // * // * @param artifact a {@link java.io.File} object // * @param checksumType a {@link java.lang.String} object // * @para...
import java.util.HashMap; import java.util.Map; import net.nicoulaj.maven.plugins.checksum.artifacts.ArtifactListener; import net.nicoulaj.maven.plugins.checksum.mojo.ChecksumFile; import org.apache.maven.shared.utils.StringUtils; import org.apache.maven.shared.utils.xml.PrettyPrintXMLWriter; import java.io.*; import j...
/*- * ==================================================================== * checksum-maven-plugin * ==================================================================== * Copyright (C) 2010 - 2016 Julien Nicoulaud <julien.nicoulaud@gmail.com> * ==================================================================== ...
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/artifacts/ArtifactListener.java // public interface ArtifactListener { // /** // * <p>artifactCreated.</p> // * // * @param artifact a {@link java.io.File} object // * @param checksumType a {@link java.lang.String} object // * @para...
protected Map<ChecksumFile, Map<String, String>> filesHashcodes;
nicoulaj/checksum-maven-plugin
src/main/java/net/nicoulaj/maven/plugins/checksum/execution/target/XmlSummaryFileTarget.java
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/artifacts/ArtifactListener.java // public interface ArtifactListener { // /** // * <p>artifactCreated.</p> // * // * @param artifact a {@link java.io.File} object // * @param checksumType a {@link java.lang.String} object // * @para...
import java.util.HashMap; import java.util.Map; import net.nicoulaj.maven.plugins.checksum.artifacts.ArtifactListener; import net.nicoulaj.maven.plugins.checksum.mojo.ChecksumFile; import org.apache.maven.shared.utils.StringUtils; import org.apache.maven.shared.utils.xml.PrettyPrintXMLWriter; import java.io.*; import j...
/*- * ==================================================================== * checksum-maven-plugin * ==================================================================== * Copyright (C) 2010 - 2016 Julien Nicoulaud <julien.nicoulaud@gmail.com> * ==================================================================== ...
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/artifacts/ArtifactListener.java // public interface ArtifactListener { // /** // * <p>artifactCreated.</p> // * // * @param artifact a {@link java.io.File} object // * @param checksumType a {@link java.lang.String} object // * @para...
protected final Iterable<? extends ArtifactListener> artifactListeners;
nicoulaj/checksum-maven-plugin
src/main/java/net/nicoulaj/maven/plugins/checksum/execution/target/ShasumSummaryFileTarget.java
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/artifacts/ArtifactListener.java // public interface ArtifactListener { // /** // * <p>artifactCreated.</p> // * // * @param artifact a {@link java.io.File} object // * @param checksumType a {@link java.lang.String} object // * @para...
import net.nicoulaj.maven.plugins.checksum.artifacts.ArtifactListener; import net.nicoulaj.maven.plugins.checksum.mojo.ChecksumFile; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.StandardOpenOption; import java.util.*;
/*- * ==================================================================== * checksum-maven-plugin * ==================================================================== * Copyright (C) 2010 - 2016 Julien Nicoulaud <julien.nicoulaud@gmail.com> * ==================================================================== ...
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/artifacts/ArtifactListener.java // public interface ArtifactListener { // /** // * <p>artifactCreated.</p> // * // * @param artifact a {@link java.io.File} object // * @param checksumType a {@link java.lang.String} object // * @para...
protected Map<ChecksumFile, Map<String, String>> filesHashcodes;
nicoulaj/checksum-maven-plugin
src/main/java/net/nicoulaj/maven/plugins/checksum/execution/target/CsvSummaryFileTarget.java
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/artifacts/ArtifactListener.java // public interface ArtifactListener { // /** // * <p>artifactCreated.</p> // * // * @param artifact a {@link java.io.File} object // * @param checksumType a {@link java.lang.String} object // * @para...
import net.nicoulaj.maven.plugins.checksum.artifacts.ArtifactListener; import net.nicoulaj.maven.plugins.checksum.mojo.ChecksumFile; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.StandardOpenOption; import java.util.*;
/*- * ==================================================================== * checksum-maven-plugin * ==================================================================== * Copyright (C) 2010 - 2016 Julien Nicoulaud <julien.nicoulaud@gmail.com> * ==================================================================== ...
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/artifacts/ArtifactListener.java // public interface ArtifactListener { // /** // * <p>artifactCreated.</p> // * // * @param artifact a {@link java.io.File} object // * @param checksumType a {@link java.lang.String} object // * @para...
protected Map<ChecksumFile, Map<String, String>> filesHashcodes;
nicoulaj/checksum-maven-plugin
src/main/java/net/nicoulaj/maven/plugins/checksum/execution/target/CsvSummaryFileTarget.java
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/artifacts/ArtifactListener.java // public interface ArtifactListener { // /** // * <p>artifactCreated.</p> // * // * @param artifact a {@link java.io.File} object // * @param checksumType a {@link java.lang.String} object // * @para...
import net.nicoulaj.maven.plugins.checksum.artifacts.ArtifactListener; import net.nicoulaj.maven.plugins.checksum.mojo.ChecksumFile; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.StandardOpenOption; import java.util.*;
/*- * ==================================================================== * checksum-maven-plugin * ==================================================================== * Copyright (C) 2010 - 2016 Julien Nicoulaud <julien.nicoulaud@gmail.com> * ==================================================================== ...
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/artifacts/ArtifactListener.java // public interface ArtifactListener { // /** // * <p>artifactCreated.</p> // * // * @param artifact a {@link java.io.File} object // * @param checksumType a {@link java.lang.String} object // * @para...
protected final Iterable<? extends ArtifactListener> artifactListeners;
nicoulaj/checksum-maven-plugin
src/main/java/net/nicoulaj/maven/plugins/checksum/digest/DigesterFactory.java
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/Constants.java // public class Constants // { // /** // * The CRC/checksum digest algorithms supported by checksum-maven-plugin. // */ // public static final String[] SUPPORTED_ALGORITHMS = { // "Cksum", // "CRC32", // ...
import net.nicoulaj.maven.plugins.checksum.Constants; import org.bouncycastle.jce.provider.BouncyCastleProvider; import java.security.NoSuchAlgorithmException; import java.security.Security; import java.util.HashMap; import java.util.Map;
/* * checksum-maven-plugin - http://checksum-maven-plugin.nicoulaj.net * Copyright © 2010-2021 checksum-maven-plugin contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ...
// Path: src/main/java/net/nicoulaj/maven/plugins/checksum/Constants.java // public class Constants // { // /** // * The CRC/checksum digest algorithms supported by checksum-maven-plugin. // */ // public static final String[] SUPPORTED_ALGORITHMS = { // "Cksum", // "CRC32", // ...
protected Map<String, FileDigester> digesters = new HashMap<>( Constants.SUPPORTED_ALGORITHMS.length );
kaklakariada/fritzbox-java-api
src/main/java/com/github/kaklakariada/fritzbox/EnergyStatisticsService.java
// Path: src/main/java/com/github/kaklakariada/fritzbox/http/QueryParameters.java // public class QueryParameters { // // private final Map<String, String> parameters; // // private QueryParameters(Map<String, String> parameters) { // this.parameters = parameters; // } // // public static Bui...
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.github.kaklakariada.fritzbox.http.QueryParameters;
/** * A Java API for managing FritzBox HomeAutomation * Copyright (C) 2017 Christoph Pirkl <christoph at users.sourceforge.net> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either ver...
// Path: src/main/java/com/github/kaklakariada/fritzbox/http/QueryParameters.java // public class QueryParameters { // // private final Map<String, String> parameters; // // private QueryParameters(Map<String, String> parameters) { // this.parameters = parameters; // } // // public static Bui...
final QueryParameters parameters = QueryParameters.builder().add("command", command).add("id", deviceId)
kaklakariada/fritzbox-java-api
src/main/java/com/github/kaklakariada/fritzbox/http/HttpTemplate.java
// Path: src/main/java/com/github/kaklakariada/fritzbox/FritzBoxException.java // public class FritzBoxException extends RuntimeException { // // private static final long serialVersionUID = 1L; // // public FritzBoxException(String message, Throwable cause) { // super(message, cause); // } // //...
import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; import java.io.IOException; import java.util.Map.Entry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.github.kaklakariada.fritzbox.FritzBoxException; import com.github.kaklakariada.fritzbox.mapping.Deserializer; import ok...
/** * A Java API for managing FritzBox HomeAutomation * Copyright (C) 2017 Christoph Pirkl <christoph at users.sourceforge.net> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either ver...
// Path: src/main/java/com/github/kaklakariada/fritzbox/FritzBoxException.java // public class FritzBoxException extends RuntimeException { // // private static final long serialVersionUID = 1L; // // public FritzBoxException(String message, Throwable cause) { // super(message, cause); // } // //...
private final Deserializer deserializer;
kaklakariada/fritzbox-java-api
src/main/java/com/github/kaklakariada/fritzbox/http/HttpTemplate.java
// Path: src/main/java/com/github/kaklakariada/fritzbox/FritzBoxException.java // public class FritzBoxException extends RuntimeException { // // private static final long serialVersionUID = 1L; // // public FritzBoxException(String message, Throwable cause) { // super(message, cause); // } // //...
import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; import java.io.IOException; import java.util.Map.Entry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.github.kaklakariada.fritzbox.FritzBoxException; import com.github.kaklakariada.fritzbox.mapping.Deserializer; import ok...
public <T> T get(String path, Class<T> resultType) { return get(path, QueryParameters.builder().build(), resultType); } public <T> T get(String path, QueryParameters parameters, Class<T> resultType) { final HttpUrl url = createUrl(path, parameters); return get(resultType, url); ...
// Path: src/main/java/com/github/kaklakariada/fritzbox/FritzBoxException.java // public class FritzBoxException extends RuntimeException { // // private static final long serialVersionUID = 1L; // // public FritzBoxException(String message, Throwable cause) { // super(message, cause); // } // //...
throw new FritzBoxException("Request failed: " + response);
kaklakariada/fritzbox-java-api
src/main/java/com/github/kaklakariada/fritzbox/model/homeautomation/Statistics.java
// Path: src/main/java/com/github/kaklakariada/fritzbox/helper/StringHelper.java // public class StringHelper { // // private StringHelper(){ // // Not instantiable // } // // /** // * <p>Note that the method does not allow for a leading sign, either positive or negative.</p> // ...
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import com.github.kaklakariada.fritzbox.helper.StringHelper;
} return Arrays.asList(getCsvValues().split(",")) .stream() .map(aValue -> Optional.ofNullable(computeValue(aValue))) .collect(Collectors.toList()); } /** * Provide the measurement unit to be used with the statistics. * <p> * Consis...
// Path: src/main/java/com/github/kaklakariada/fritzbox/helper/StringHelper.java // public class StringHelper { // // private StringHelper(){ // // Not instantiable // } // // /** // * <p>Note that the method does not allow for a leading sign, either positive or negative.</p> // ...
if (StringHelper.isIntegerNumber(aValue)) {
kaklakariada/fritzbox-java-api
src/main/java/com/github/kaklakariada/fritzbox/model/homeautomation/MeasurementUnit.java
// Path: src/main/java/com/github/kaklakariada/fritzbox/MissingClassException.java // public class MissingClassException extends RuntimeException { // // private static final long serialVersionUID = 1L; // // public MissingClassException(String message, Throwable cause) { // super(message, cause); // ...
import com.github.kaklakariada.fritzbox.MissingClassException;
/** * A Java API for managing FritzBox HomeAutomation * Copyright (C) 2017 Christoph Pirkl <christoph at users.sourceforge.net> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either ver...
// Path: src/main/java/com/github/kaklakariada/fritzbox/MissingClassException.java // public class MissingClassException extends RuntimeException { // // private static final long serialVersionUID = 1L; // // public MissingClassException(String message, Throwable cause) { // super(message, cause); // ...
throw new MissingClassException(String.format("Could not detect enum of type 'MeasurementUnit' associated to class '%s'", caller.toString()));
kaklakariada/fritzbox-java-api
src/main/java/com/github/kaklakariada/fritzbox/LoginFailedException.java
// Path: src/main/java/com/github/kaklakariada/fritzbox/model/SessionInfo.java // @Root(name = "SessionInfo") // public class SessionInfo { // // @Element(name = "SID") // private String sid; // // @Element(name = "Challenge") // private String challenge; // // @Element(name = "BlockTime") // ...
import com.github.kaklakariada.fritzbox.model.SessionInfo;
/** * A Java API for managing FritzBox HomeAutomation * Copyright (C) 2017 Christoph Pirkl <christoph at users.sourceforge.net> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either ver...
// Path: src/main/java/com/github/kaklakariada/fritzbox/model/SessionInfo.java // @Root(name = "SessionInfo") // public class SessionInfo { // // @Element(name = "SID") // private String sid; // // @Element(name = "Challenge") // private String challenge; // // @Element(name = "BlockTime") // ...
public LoginFailedException(SessionInfo session) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceService.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import java.util.List; import java.util.Optional; import be.ordina.msdashboard.applicationinstance.commands.CreateApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.DeleteApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.UpdateActuatorEndpoints; import be.ordina....
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
public String createApplicationInstance(CreateApplicationInstance command) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceService.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import java.util.List; import java.util.Optional; import be.ordina.msdashboard.applicationinstance.commands.CreateApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.DeleteApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.UpdateActuatorEndpoints; import be.ordina....
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
public void updateApplicationInstanceHealth(final UpdateApplicationInstanceHealth command) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceService.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import java.util.List; import java.util.Optional; import be.ordina.msdashboard.applicationinstance.commands.CreateApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.DeleteApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.UpdateActuatorEndpoints; import be.ordina....
public Optional<String> getApplicationInstanceIdForServiceInstance(ServiceInstance serviceInstance) { return this.getById(serviceInstance.getInstanceId()) .map(ApplicationInstance::getId); } public Optional<ApplicationInstance> getById(String id) { return Optional.ofNullable(this.repository.getById(id)); }...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
public void updateActuatorEndpoints(final UpdateActuatorEndpoints command) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceService.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import java.util.List; import java.util.Optional; import be.ordina.msdashboard.applicationinstance.commands.CreateApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.DeleteApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.UpdateActuatorEndpoints; import be.ordina....
public List<ApplicationInstance> getApplicationInstances() { return this.repository.getAll(); } public String createApplicationInstance(CreateApplicationInstance command) { final ServiceInstance serviceInstance = command.getServiceInstance(); ApplicationInstance applicationInstance = ApplicationInstance.Buil...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
public void deleteApplicationInstance(final DeleteApplicationInstance command) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceServiceTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import java.net.URI; import java.util.List; import java.util.Optional; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.mockito.stubbing.A...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
CreateApplicationInstance command = new CreateApplicationInstance(this.serviceInstance);
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceServiceTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import java.net.URI; import java.util.List; import java.util.Optional; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.mockito.stubbing.A...
.thenAnswer((Answer<ApplicationInstance>) invocation -> invocation.getArgument(0)); CreateApplicationInstance command = new CreateApplicationInstance(this.serviceInstance); String applicationInstanceId = this.service.createApplicationInstance(command); assertThat(applicationInstanceId).isEqualTo("a-1"); ...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
UpdateApplicationInstanceHealth command = new UpdateApplicationInstanceHealth("a-1", Status.UP);
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceServiceTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import java.net.URI; import java.util.List; import java.util.Optional; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.mockito.stubbing.A...
public void shouldRetrieveAllApplicationInstancesFromRepository() { when(this.repository.getAll()).thenReturn(singletonList(ApplicationInstanceMother.instance("a-1", "a"))); List<ApplicationInstance> applicationInstances = this.service.getApplicationInstances(); verify(this.repository).getAll(); assertThat(a...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
UpdateActuatorEndpoints command = new UpdateActuatorEndpoints("a-1", links);
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceServiceTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import java.net.URI; import java.util.List; import java.util.Optional; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.mockito.stubbing.A...
verify(this.repository).save(this.applicationInstanceArgumentCaptor.capture()); ApplicationInstance applicationInstance = this.applicationInstanceArgumentCaptor.getValue(); assertThat(applicationInstance.getId()).isEqualTo("a-1"); } @Test public void shouldUpdateTheActuatorEndpointsOfAnApplicationInstance() ...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
DeleteApplicationInstance command = new DeleteApplicationInstance("a-1");
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceServiceTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import java.net.URI; import java.util.List; import java.util.Optional; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.mockito.stubbing.A...
when(this.repository.getById("a-1")).thenReturn(ApplicationInstanceMother.instance("a-1", "a")); when(this.repository.save(any(ApplicationInstance.class))) .thenAnswer((Answer<ApplicationInstance>) invocation -> invocation.getArgument(0)); Links links = new Links(new Link("http://localhost:8080/actuator/heal...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
.isInstanceOf(ApplicationInstanceDeleted.class);
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/security/SecurityConfigurationTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/configuration/CommonConfiguration.java // @Configuration // public class CommonConfiguration { // // @Bean("machine-to-machine-web-client") // public WebClient m2mWebClient(List<MachineToMachineWebClientConfigurer> configurers) { // W...
import org.junit.Test; import be.ordina.msdashboard.configuration.CommonConfiguration; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.security.oauth2.client.registration.ReactiveClientRegistration...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/configuration/CommonConfiguration.java // @Configuration // public class CommonConfiguration { // // @Bean("machine-to-machine-web-client") // public WebClient m2mWebClient(List<MachineToMachineWebClientConfigurer> configurers) { // W...
CommonConfiguration.class));
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/security/SecurityConfiguration.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/configuration/MachineToMachineWebClientConfigurer.java // @FunctionalInterface // public interface MachineToMachineWebClientConfigurer extends Consumer<WebClient.Builder> { // // // No additional methods // // }
import org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository; import org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository; import org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExc...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/configuration/MachineToMachineWebClientConfigurer.java // @FunctionalInterface // public interface MachineToMachineWebClientConfigurer extends Consumer<WebClient.Builder> { // // // No additional methods // // } // Path: microservices...
MachineToMachineWebClientConfigurer basicFilter(BasicClientSecurityProperties properties) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/eventstore/InMemoryEventStoreConfiguration.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceRepository.java // public interface ApplicationInstanceRepository { // // List<ApplicationInstance> getAll(); // // ApplicationInstance getById(String id); // // ApplicationInstance save(Applica...
import be.ordina.msdashboard.applicationinstance.ApplicationInstanceRepository; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.annotation.Bean; import org.springframework.context.annotatio...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceRepository.java // public interface ApplicationInstanceRepository { // // List<ApplicationInstance> getAll(); // // ApplicationInstance getById(String id); // // ApplicationInstance save(Applica...
public ApplicationInstanceRepository applicationInstanceRepository(ApplicationEventPublisher publisher) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceHealthWatcher.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
import org.springframework.boot.actuate.health.Status; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.event.EventListener; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.web.reactive.function.client.WebClient; import java.util.Has...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
@EventListener({ ActuatorEndpointsUpdated.class })
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceHealthWatcher.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
import org.springframework.boot.actuate.health.Status; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.event.EventListener; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.web.reactive.function.client.WebClient; import java.util.Has...
this.webClient = webClient; this.publisher = publisher; } @EventListener({ ActuatorEndpointsUpdated.class }) public void retrieveHealthData(ActuatorEndpointsUpdated event) { ApplicationInstance applicationInstance = event.getApplicationInstance(); if (applicationInstance.hasActuatorEndpointFor("health")) { ...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
this.publisher.publishEvent(new ApplicationInstanceHealthDataRetrievalFailed(instance));
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceHealthWatcher.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
import org.springframework.boot.actuate.health.Status; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.event.EventListener; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.web.reactive.function.client.WebClient; import java.util.Has...
@EventListener({ ActuatorEndpointsUpdated.class }) public void retrieveHealthData(ActuatorEndpointsUpdated event) { ApplicationInstance applicationInstance = event.getApplicationInstance(); if (applicationInstance.hasActuatorEndpointFor("health")) { retrieveHealthData(applicationInstance); } } @Scheduled(...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
this.publisher.publishEvent(new ApplicationInstanceHealthDataRetrieved(instance, healthInfo));
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceHealthWatcher.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
import org.springframework.boot.actuate.health.Status; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.event.EventListener; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.web.reactive.function.client.WebClient; import java.util.Has...
@Scheduled(fixedRateString = "${applicationinstance.healthwatcher.rate:10000}") public void retrieveHealthDataForAllApplicationInstances() { logger.debug("Retrieving [HEALTH] data for all application instances"); this.applicationInstanceService.getApplicationInstances() .parallelStream() .filter(instance...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
UpdateApplicationInstanceHealth command =
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/api/CatalogController.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/Catalog.java // public class Catalog { // // private Set<String> applications = new HashSet<>(); // private Map<String, List<String>> applicationInstances = new HashMap<>(); // // Catalog() { // } // // public List<String> ...
import java.util.Collection; import java.util.List; import java.util.stream.Collectors; import be.ordina.msdashboard.catalog.Catalog; import be.ordina.msdashboard.catalog.CatalogService; import org.springframework.hateoas.ExposesResourceFor; import org.springframework.hateoas.Resource; import org.springframework.web.bi...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/Catalog.java // public class Catalog { // // private Set<String> applications = new HashSet<>(); // private Map<String, List<String>> applicationInstances = new HashMap<>(); // // Catalog() { // } // // public List<String> ...
private final CatalogService service;
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/api/CatalogController.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/Catalog.java // public class Catalog { // // private Set<String> applications = new HashSet<>(); // private Map<String, List<String>> applicationInstances = new HashMap<>(); // // Catalog() { // } // // public List<String> ...
import java.util.Collection; import java.util.List; import java.util.stream.Collectors; import be.ordina.msdashboard.catalog.Catalog; import be.ordina.msdashboard.catalog.CatalogService; import org.springframework.hateoas.ExposesResourceFor; import org.springframework.hateoas.Resource; import org.springframework.web.bi...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/Catalog.java // public class Catalog { // // private Set<String> applications = new HashSet<>(); // private Map<String, List<String>> applicationInstances = new HashMap<>(); // // Catalog() { // } // // public List<String> ...
Catalog catalog = this.service.getCatalog();
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/eventstore/EventSourcedApplicationInstanceRepository.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java // public final class ApplicationInstance { // // private List<ApplicationEvent> changes = new ArrayList<>(); // // private final String id; // private final String application; // private...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import be.ordina.msdashboard.applicationinstance.ApplicationInstance; import be.ordina.msdashboard.applicationinstance.ApplicationInstanceRepository; import org.springframework.context.ApplicationEventPublisher;
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java // public final class ApplicationInstance { // // private List<ApplicationEvent> changes = new ArrayList<>(); // // private final String id; // private final String application; // private...
private final Map<String, ApplicationInstance> applicationInstances = new HashMap<>();
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ApplicationInstanceHealthDataRetrieved.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java // public final class ApplicationInstance { // // private List<ApplicationEvent> changes = new ArrayList<>(); // // private final String id; // private final String application; // private...
import be.ordina.msdashboard.applicationinstance.ApplicationInstance; import org.springframework.boot.actuate.health.Health; import org.springframework.context.ApplicationEvent;
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java // public final class ApplicationInstance { // // private List<ApplicationEvent> changes = new ArrayList<>(); // // private final String id; // private final String application; // private...
public ApplicationInstanceHealthDataRetrieved(ApplicationInstance instance, Health health) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/autoconfigure/AutoConfigurationTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceHealthWatcher.java // public class ApplicationInstanceHealthWatcher { // // private static final Logger logger = LoggerFactory.getLogger(ApplicationInstanceHealthWatcher.class); // // private fina...
import org.junit.Test; import be.ordina.msdashboard.applicationinstance.ApplicationInstanceHealthWatcher; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.cloud.client.discovery.composite.CompositeD...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceHealthWatcher.java // public class ApplicationInstanceHealthWatcher { // // private static final Logger logger = LoggerFactory.getLogger(ApplicationInstanceHealthWatcher.class); // // private fina...
assertThat(context.getBean(ApplicationInstanceHealthWatcher.class)).isNotNull();
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ApplicationInstanceDeleted.java // public class ApplicationInstanceDeleted extends ApplicationEvent { // // public ApplicationInstanceDeleted(ApplicationInstance instance) { // super(instance); // } // // ...
import java.net.URI; import org.junit.Test; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceDeleted; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceHealthUpdated; import org.springframework.boot.actuate.health.Status; import org.springframework.hateoas.Link; import...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ApplicationInstanceDeleted.java // public class ApplicationInstanceDeleted extends ApplicationEvent { // // public ApplicationInstanceDeleted(ApplicationInstance instance) { // super(instance); // } // // ...
.isInstanceOf(ApplicationInstanceHealthUpdated.class);
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ApplicationInstanceDeleted.java // public class ApplicationInstanceDeleted extends ApplicationEvent { // // public ApplicationInstanceDeleted(ApplicationInstance instance) { // super(instance); // } // // ...
import java.net.URI; import org.junit.Test; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceDeleted; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceHealthUpdated; import org.springframework.boot.actuate.health.Status; import org.springframework.hateoas.Link; import...
public void undefinedActuatorEndpointWillReturnEmptyOptional() { ApplicationInstance applicationInstance = ApplicationInstanceMother.instance("a-1", "a", URI.create("http://localhost:8080"), new Links(new Link("http://localhost:8080/actuator/health", "health"))); assertThat(applicationInstance.hasActuator...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ApplicationInstanceDeleted.java // public class ApplicationInstanceDeleted extends ApplicationEvent { // // public ApplicationInstanceDeleted(ApplicationInstance instance) { // super(instance); // } // // ...
assertThat(applicationInstance.getUncommittedChanges().get(0)).isInstanceOf(ApplicationInstanceDeleted.class);
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/api/ApplicationInstanceControllerTests.java
// Path: microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceMother.java // public final class ApplicationInstanceMother { // // private ApplicationInstanceMother() { // throw new RuntimeException("Not allowed"); // } // // public static ApplicationInsta...
import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.verify; import static org.mockito.BDDMockito.verifyNoMoreInteractions; import static org.mockito.BDDMockito.when; import java.util.Optional; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMoc...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceMother.java // public final class ApplicationInstanceMother { // // private ApplicationInstanceMother() { // throw new RuntimeException("Not allowed"); // } // // public static ApplicationInsta...
private ApplicationInstanceService service;
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/api/ApplicationInstanceControllerTests.java
// Path: microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceMother.java // public final class ApplicationInstanceMother { // // private ApplicationInstanceMother() { // throw new RuntimeException("Not allowed"); // } // // public static ApplicationInsta...
import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.verify; import static org.mockito.BDDMockito.verifyNoMoreInteractions; import static org.mockito.BDDMockito.when; import java.util.Optional; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMoc...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceMother.java // public final class ApplicationInstanceMother { // // private ApplicationInstanceMother() { // throw new RuntimeException("Not allowed"); // } // // public static ApplicationInsta...
.thenReturn(Optional.of(ApplicationInstanceMother.instance("a-1", "a")));
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/CatalogUpdater.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ApplicationInstanceCreated.java // public class ApplicationInstanceCreated extends ApplicationEvent { // // public ApplicationInstanceCreated(ApplicationInstance instance) { // super(instance); // } // // ...
import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceCreated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceDeleted; import be.ordina.msdashboard.discovery.events.ServiceDisappeared; import be.ordina.msdashboard.discovery.events.ServiceDiscovered; import org.springfram...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ApplicationInstanceCreated.java // public class ApplicationInstanceCreated extends ApplicationEvent { // // public ApplicationInstanceCreated(ApplicationInstance instance) { // super(instance); // } // // ...
@EventListener(ServiceDiscovered.class)
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/CatalogUpdater.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ApplicationInstanceCreated.java // public class ApplicationInstanceCreated extends ApplicationEvent { // // public ApplicationInstanceCreated(ApplicationInstance instance) { // super(instance); // } // // ...
import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceCreated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceDeleted; import be.ordina.msdashboard.discovery.events.ServiceDisappeared; import be.ordina.msdashboard.discovery.events.ServiceDiscovered; import org.springfram...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ApplicationInstanceCreated.java // public class ApplicationInstanceCreated extends ApplicationEvent { // // public ApplicationInstanceCreated(ApplicationInstance instance) { // super(instance); // } // // ...
@EventListener(ServiceDisappeared.class)
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/CatalogUpdater.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ApplicationInstanceCreated.java // public class ApplicationInstanceCreated extends ApplicationEvent { // // public ApplicationInstanceCreated(ApplicationInstance instance) { // super(instance); // } // // ...
import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceCreated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceDeleted; import be.ordina.msdashboard.discovery.events.ServiceDisappeared; import be.ordina.msdashboard.discovery.events.ServiceDiscovered; import org.springfram...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ApplicationInstanceCreated.java // public class ApplicationInstanceCreated extends ApplicationEvent { // // public ApplicationInstanceCreated(ApplicationInstance instance) { // super(instance); // } // // ...
@EventListener(ApplicationInstanceCreated.class)
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/CatalogUpdater.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ApplicationInstanceCreated.java // public class ApplicationInstanceCreated extends ApplicationEvent { // // public ApplicationInstanceCreated(ApplicationInstance instance) { // super(instance); // } // // ...
import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceCreated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceDeleted; import be.ordina.msdashboard.discovery.events.ServiceDisappeared; import be.ordina.msdashboard.discovery.events.ServiceDiscovered; import org.springfram...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ApplicationInstanceCreated.java // public class ApplicationInstanceCreated extends ApplicationEvent { // // public ApplicationInstanceCreated(ApplicationInstance instance) { // super(instance); // } // // ...
@EventListener(ApplicationInstanceDeleted.class)
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/discovery/LandscapeWatcher.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/Catalog.java // public class Catalog { // // private Set<String> applications = new HashSet<>(); // private Map<String, List<String>> applicationInstances = new HashMap<>(); // // Catalog() { // } // // public List<String> ...
import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.cloud.client.discovery.event.HeartbeatEvent; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.event.EventListener; import static org.apache.commons.collections4.CollectionUtils.s...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/Catalog.java // public class Catalog { // // private Set<String> applications = new HashSet<>(); // private Map<String, List<String>> applicationInstances = new HashMap<>(); // // Catalog() { // } // // public List<String> ...
private final CatalogService catalogService;
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/discovery/LandscapeWatcher.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/Catalog.java // public class Catalog { // // private Set<String> applications = new HashSet<>(); // private Map<String, List<String>> applicationInstances = new HashMap<>(); // // Catalog() { // } // // public List<String> ...
import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.cloud.client.discovery.event.HeartbeatEvent; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.event.EventListener; import static org.apache.commons.collections4.CollectionUtils.s...
LandscapeWatcher(DiscoveryClient discoveryClient, CatalogService catalogService, List<ApplicationFilter> applicationFilters, List<ApplicationInstanceFilter> applicationInstanceFilters, ApplicationEventPublisher publisher) { this.discoveryClient = discoveryClient; this.catalogService = catalogService; th...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/Catalog.java // public class Catalog { // // private Set<String> applications = new HashSet<>(); // private Map<String, List<String>> applicationInstances = new HashMap<>(); // // Catalog() { // } // // public List<String> ...
.map(ServiceDiscovered::new)
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/discovery/LandscapeWatcher.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/Catalog.java // public class Catalog { // // private Set<String> applications = new HashSet<>(); // private Map<String, List<String>> applicationInstances = new HashMap<>(); // // Catalog() { // } // // public List<String> ...
import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.cloud.client.discovery.event.HeartbeatEvent; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.event.EventListener; import static org.apache.commons.collections4.CollectionUtils.s...
this.applicationInstanceFilters = new ApplicationInstanceFilters(applicationInstanceFilters); this.publisher = publisher; } @EventListener({ HeartbeatEvent.class }) public void discoverLandscape() { logger.debug("Discovering landscape"); List<String> applications = this.discoveryClient.getServices() .s...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/Catalog.java // public class Catalog { // // private Set<String> applications = new HashSet<>(); // private Map<String, List<String>> applicationInstances = new HashMap<>(); // // Catalog() { // } // // public List<String> ...
.map(ServiceDisappeared::new)
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/discovery/LandscapeWatcher.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/Catalog.java // public class Catalog { // // private Set<String> applications = new HashSet<>(); // private Map<String, List<String>> applicationInstances = new HashMap<>(); // // Catalog() { // } // // public List<String> ...
import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.cloud.client.discovery.event.HeartbeatEvent; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.event.EventListener; import static org.apache.commons.collections4.CollectionUtils.s...
subtract(applications, catalog.getApplications()) .stream() .map(ServiceDiscovered::new) .forEach(this.publisher::publishEvent); } private void dispatchEventForDisappearedApplications(List<String> applications, Catalog catalog) { subtract(catalog.getApplications(), applications) .stream() .ma...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/Catalog.java // public class Catalog { // // private Set<String> applications = new HashSet<>(); // private Map<String, List<String>> applicationInstances = new HashMap<>(); // // Catalog() { // } // // public List<String> ...
.map(ServiceInstanceDiscovered::new)
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/Catalog.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java // public final class ApplicationInstance { // // private List<ApplicationEvent> changes = new ArrayList<>(); // // private final String id; // private final String application; // private...
import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import be.ordina.msdashboard.applicationinstance.ApplicationInstance; import static java.util.stream.Collectors.toList;
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java // public final class ApplicationInstance { // // private List<ApplicationEvent> changes = new ArrayList<>(); // // private final String id; // private final String application; // private...
void addApplicationInstance(ApplicationInstance applicationInstance) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceEventMother.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
import java.net.URI; import be.ordina.msdashboard.applicationinstance.events.ActuatorEndpointsUpdated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceCreated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceDeleted; import be.ordina.msdashboard.applicationinstance....
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
public static ApplicationInstanceCreated applicationInstanceCreated(String id, String application) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceEventMother.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
import java.net.URI; import be.ordina.msdashboard.applicationinstance.events.ActuatorEndpointsUpdated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceCreated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceDeleted; import be.ordina.msdashboard.applicationinstance....
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
public static ApplicationInstanceHealthDataRetrieved applicationInstanceHealthDataRetrieved(String id, String application, Health health) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceEventMother.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
import java.net.URI; import be.ordina.msdashboard.applicationinstance.events.ActuatorEndpointsUpdated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceCreated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceDeleted; import be.ordina.msdashboard.applicationinstance....
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
public static ActuatorEndpointsUpdated actuatorEndpointsUpdated(String id, String application, Links actuatorEndpoints) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceEventMother.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
import java.net.URI; import be.ordina.msdashboard.applicationinstance.events.ActuatorEndpointsUpdated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceCreated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceDeleted; import be.ordina.msdashboard.applicationinstance....
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
public static ApplicationInstanceDeleted applicationInstanceDeleted(String id, String application) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceUpdater.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import be.ordina.msdashboard.applicationinstance.commands.CreateApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.DeleteApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.UpdateActuatorEndpoints; import be.ordina.msdashboard.applicationinstance.events.Application...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
@EventListener(ServiceInstanceDiscovered.class)
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceUpdater.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import be.ordina.msdashboard.applicationinstance.commands.CreateApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.DeleteApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.UpdateActuatorEndpoints; import be.ordina.msdashboard.applicationinstance.events.Application...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
CreateApplicationInstance command = new CreateApplicationInstance(event.getServiceInstance());
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceUpdater.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import be.ordina.msdashboard.applicationinstance.commands.CreateApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.DeleteApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.UpdateActuatorEndpoints; import be.ordina.msdashboard.applicationinstance.events.Application...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
@EventListener(ServiceInstanceDisappeared.class)
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceUpdater.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import be.ordina.msdashboard.applicationinstance.commands.CreateApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.DeleteApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.UpdateActuatorEndpoints; import be.ordina.msdashboard.applicationinstance.events.Application...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
DeleteApplicationInstance command = new DeleteApplicationInstance(event.getServiceInstanceId());
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceUpdater.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import be.ordina.msdashboard.applicationinstance.commands.CreateApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.DeleteApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.UpdateActuatorEndpoints; import be.ordina.msdashboard.applicationinstance.events.Application...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
@EventListener(ApplicationInstanceCreated.class)
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceUpdater.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
import be.ordina.msdashboard.applicationinstance.commands.CreateApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.DeleteApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.UpdateActuatorEndpoints; import be.ordina.msdashboard.applicationinstance.events.Application...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/CreateApplicationInstance.java // public final class CreateApplicationInstance { // // private final ServiceInstance serviceInstance; // // public CreateApplicationInstance(ServiceInstance serviceInstance) ...
UpdateActuatorEndpoints command = new UpdateActuatorEndpoints(applicationInstance.getId(),
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceHealthWatcherTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
import java.net.URI; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.InjectMock...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
ActuatorEndpointsUpdated event =
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceHealthWatcherTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
import java.net.URI; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.InjectMock...
List<ApplicationInstance> applicationInstances = Arrays.asList(firstInstance, secondInstance); when(this.applicationInstanceService.getApplicationInstances()).thenReturn(applicationInstances); when(this.responseSpec.bodyToMono(ApplicationInstanceHealthWatcher.HealthWrapper.class)) .thenReturn(Mono.just(new A...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
ApplicationInstanceHealthDataRetrieved event = ApplicationInstanceEventMother
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceHealthWatcherTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
import java.net.URI; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.InjectMock...
this.healthWatcher.retrieveHealthDataForAllApplicationInstances(); assertHealthInfoRetrievalSucceeded(Collections.singletonList(secondInstance)); } @Test public void shouldOnlyRetrieveHealthDataForInstancesWithAHealthActuatorEndpoint() { ApplicationInstance firstInstance = ApplicationInstanceMother.instance...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
ArgumentCaptor<UpdateApplicationInstanceHealth> captor = ArgumentCaptor.forClass(UpdateApplicationInstanceHealth.class);
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceHealthWatcherTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
import java.net.URI; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.InjectMock...
UpdateApplicationInstanceHealth command = captor.getValue(); assertThat(command.getId()).isEqualTo("a-1"); assertThat(command.getHealthStatus()).isEqualTo(Status.UP); verifyNoMoreInteractions(this.applicationInstanceService); verifyZeroInteractions(this.applicationEventPublisher); } private void assertHeal...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/commands/UpdateApplicationInstanceHealth.java // public final class UpdateApplicationInstanceHealth { // // private final String id; // private final Status healthStatus; // // public UpdateApplicationInstanceHealt...
ApplicationInstanceHealthDataRetrievalFailed healthInfoRetrievalFailed =
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/discovery/DiscoveryConfiguration.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/CatalogService.java // public class CatalogService { // // private final Catalog catalog; // // public CatalogService() { // this.catalog = new Catalog(); // } // // public Catalog getCatalog() { // return this.catalog; ...
import java.util.List; import be.ordina.msdashboard.catalog.CatalogService; import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration;
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/CatalogService.java // public class CatalogService { // // private final Catalog catalog; // // public CatalogService() { // this.catalog = new Catalog(); // } // // public Catalog getCatalog() { // return this.catalog; ...
LandscapeWatcher landscapeWatcher(DiscoveryClient discoveryClient, CatalogService catalogService,
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/catalog/CatalogMother.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java // public final class ApplicationInstance { // // private List<ApplicationEvent> changes = new ArrayList<>(); // // private final String id; // private final String application; // private...
import java.util.List; import be.ordina.msdashboard.applicationinstance.ApplicationInstance;
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java // public final class ApplicationInstance { // // private List<ApplicationEvent> changes = new ArrayList<>(); // // private final String id; // private final String application; // private...
public static Catalog catalogWith(List<ApplicationInstance> applicationInstances) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/discovery/ServiceDiscoveryEventMother.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/discovery/events/ServiceDisappeared.java // public class ServiceDisappeared extends ApplicationEvent { // // public ServiceDisappeared(String service) { // super(service); // } // // public String getService() { // return (String)...
import be.ordina.msdashboard.discovery.events.ServiceDisappeared; import be.ordina.msdashboard.discovery.events.ServiceDiscovered; import be.ordina.msdashboard.discovery.events.ServiceInstanceDisappeared; import be.ordina.msdashboard.discovery.events.ServiceInstanceDiscovered; import org.springframework.cloud.client.Se...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/discovery/events/ServiceDisappeared.java // public class ServiceDisappeared extends ApplicationEvent { // // public ServiceDisappeared(String service) { // super(service); // } // // public String getService() { // return (String)...
public static ServiceDiscovered newServiceDiscovered(String service) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/discovery/ServiceDiscoveryEventMother.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/discovery/events/ServiceDisappeared.java // public class ServiceDisappeared extends ApplicationEvent { // // public ServiceDisappeared(String service) { // super(service); // } // // public String getService() { // return (String)...
import be.ordina.msdashboard.discovery.events.ServiceDisappeared; import be.ordina.msdashboard.discovery.events.ServiceDiscovered; import be.ordina.msdashboard.discovery.events.ServiceInstanceDisappeared; import be.ordina.msdashboard.discovery.events.ServiceInstanceDiscovered; import org.springframework.cloud.client.Se...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/discovery/events/ServiceDisappeared.java // public class ServiceDisappeared extends ApplicationEvent { // // public ServiceDisappeared(String service) { // super(service); // } // // public String getService() { // return (String)...
public static ServiceDisappeared serviceDisappeared(String service) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/discovery/ServiceDiscoveryEventMother.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/discovery/events/ServiceDisappeared.java // public class ServiceDisappeared extends ApplicationEvent { // // public ServiceDisappeared(String service) { // super(service); // } // // public String getService() { // return (String)...
import be.ordina.msdashboard.discovery.events.ServiceDisappeared; import be.ordina.msdashboard.discovery.events.ServiceDiscovered; import be.ordina.msdashboard.discovery.events.ServiceInstanceDisappeared; import be.ordina.msdashboard.discovery.events.ServiceInstanceDiscovered; import org.springframework.cloud.client.Se...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/discovery/events/ServiceDisappeared.java // public class ServiceDisappeared extends ApplicationEvent { // // public ServiceDisappeared(String service) { // super(service); // } // // public String getService() { // return (String)...
public static ServiceInstanceDiscovered newServiceInstanceDiscovered(ServiceInstance serviceInstance) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/discovery/ServiceDiscoveryEventMother.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/discovery/events/ServiceDisappeared.java // public class ServiceDisappeared extends ApplicationEvent { // // public ServiceDisappeared(String service) { // super(service); // } // // public String getService() { // return (String)...
import be.ordina.msdashboard.discovery.events.ServiceDisappeared; import be.ordina.msdashboard.discovery.events.ServiceDiscovered; import be.ordina.msdashboard.discovery.events.ServiceInstanceDisappeared; import be.ordina.msdashboard.discovery.events.ServiceInstanceDiscovered; import org.springframework.cloud.client.Se...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/discovery/events/ServiceDisappeared.java // public class ServiceDisappeared extends ApplicationEvent { // // public ServiceDisappeared(String service) { // super(service); // } // // public String getService() { // return (String)...
public static ServiceInstanceDisappeared serviceInstanceDisappeared(String instanceId) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/catalog/CatalogServiceTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java // public final class ApplicationInstance { // // private List<ApplicationEvent> changes = new ArrayList<>(); // // private final String id; // private final String application; // private...
import org.junit.Test; import be.ordina.msdashboard.applicationinstance.ApplicationInstance; import be.ordina.msdashboard.applicationinstance.ApplicationInstanceMother; import static org.assertj.core.api.Assertions.assertThat;
@Test public void shouldAddApplicationToEmptyCatalog() { CatalogService catalogService = new CatalogService(); catalogService.addApplicationToCatalog("a"); Catalog catalog = catalogService.getCatalog(); assertThat(catalog.getApplications()).hasSize(1); assertThat(catalog.getApplications()).contains("a"); }...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java // public final class ApplicationInstance { // // private List<ApplicationEvent> changes = new ArrayList<>(); // // private final String id; // private final String application; // private...
ApplicationInstance applicationInstance = ApplicationInstanceMother.instance("a-1", "a");
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/test/java/be/ordina/msdashboard/catalog/CatalogServiceTests.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java // public final class ApplicationInstance { // // private List<ApplicationEvent> changes = new ArrayList<>(); // // private final String id; // private final String application; // private...
import org.junit.Test; import be.ordina.msdashboard.applicationinstance.ApplicationInstance; import be.ordina.msdashboard.applicationinstance.ApplicationInstanceMother; import static org.assertj.core.api.Assertions.assertThat;
@Test public void shouldAddApplicationToEmptyCatalog() { CatalogService catalogService = new CatalogService(); catalogService.addApplicationToCatalog("a"); Catalog catalog = catalogService.getCatalog(); assertThat(catalog.getApplications()).hasSize(1); assertThat(catalog.getApplications()).contains("a"); }...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java // public final class ApplicationInstance { // // private List<ApplicationEvent> changes = new ArrayList<>(); // // private final String id; // private final String application; // private...
ApplicationInstance applicationInstance = ApplicationInstanceMother.instance("a-1", "a");
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/catalog/CatalogService.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java // public final class ApplicationInstance { // // private List<ApplicationEvent> changes = new ArrayList<>(); // // private final String id; // private final String application; // private...
import be.ordina.msdashboard.applicationinstance.ApplicationInstance;
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java // public final class ApplicationInstance { // // private List<ApplicationEvent> changes = new ArrayList<>(); // // private final String id; // private final String application; // private...
public void addApplicationInstanceToCatalog(ApplicationInstance applicationInstance) {
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.Optional; import be.ordina.msdashboard.applicationinstance.events.ActuatorEndpointsUpdated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceCreated; import be.ordina.msdashboard.applicationinstance.events...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
this.changes.add(new ApplicationInstanceCreated(this));
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.Optional; import be.ordina.msdashboard.applicationinstance.events.ActuatorEndpointsUpdated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceCreated; import be.ordina.msdashboard.applicationinstance.events...
private Status healthStatus = Status.UNKNOWN; private Links actuatorEndpoints = new Links(); private ApplicationInstance(Builder builder) { this.id = builder.id; this.application = builder.application; this.baseUri = builder.baseUri; this.state = State.CREATED; this.changes.add(new ApplicationInstanceCrea...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
this.changes.add(new ApplicationInstanceHealthUpdated(this));
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.Optional; import be.ordina.msdashboard.applicationinstance.events.ActuatorEndpointsUpdated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceCreated; import be.ordina.msdashboard.applicationinstance.events...
public URI getBaseUri() { return this.baseUri; } public Status getHealthStatus() { return this.healthStatus; } void updateHealthStatus(Status healthStatus) { if (!this.healthStatus.equals(healthStatus)) { this.healthStatus = healthStatus; this.changes.add(new ApplicationInstanceHealthUpdated(this)); ...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
this.changes.add(new ActuatorEndpointsUpdated(this));
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstance.java
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.Optional; import be.ordina.msdashboard.applicationinstance.events.ActuatorEndpointsUpdated; import be.ordina.msdashboard.applicationinstance.events.ApplicationInstanceCreated; import be.ordina.msdashboard.applicationinstance.events...
void updateHealthStatus(Status healthStatus) { if (!this.healthStatus.equals(healthStatus)) { this.healthStatus = healthStatus; this.changes.add(new ApplicationInstanceHealthUpdated(this)); } } public Links getActuatorEndpoints() { return this.actuatorEndpoints; } public boolean hasActuatorEndpointF...
// Path: microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/events/ActuatorEndpointsUpdated.java // public class ActuatorEndpointsUpdated extends ApplicationEvent { // // public ActuatorEndpointsUpdated(ApplicationInstance instance) { // super(instance); // } // // public...
this.changes.add(new ApplicationInstanceDeleted(this));
antag99/retinazer
retinazer/src/test/java/com/github/antag99/retinazer/util/LongBagTest.java
// Path: retinazer/src/main/java/com/github/antag99/retinazer/util/LongBag.java // public final class LongBag { // @Experimental // public long[] buffer; // // public LongBag() { // this(0); // } // // public LongBag(int capacity) { // buffer = new long[capacity]; // } // // ...
import org.junit.Test; import com.github.antag99.retinazer.util.LongBag; import static org.junit.Assert.*;
/******************************************************************************* * Copyright (C) 2015 Anton Gustafsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
// Path: retinazer/src/main/java/com/github/antag99/retinazer/util/LongBag.java // public final class LongBag { // @Experimental // public long[] buffer; // // public LongBag() { // this(0); // } // // public LongBag(int capacity) { // buffer = new long[capacity]; // } // // ...
LongBag bag = new LongBag();
antag99/retinazer
retinazer/src/test/java/com/github/antag99/retinazer/util/IntBagTest.java
// Path: retinazer/src/main/java/com/github/antag99/retinazer/util/IntBag.java // public final class IntBag { // @Experimental // public int[] buffer; // // public IntBag() { // this(0); // } // // public IntBag(int capacity) { // buffer = new int[capacity]; // } // // pub...
import org.junit.Test; import com.github.antag99.retinazer.util.IntBag; import static org.junit.Assert.*;
/******************************************************************************* * Copyright (C) 2015 Anton Gustafsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
// Path: retinazer/src/main/java/com/github/antag99/retinazer/util/IntBag.java // public final class IntBag { // @Experimental // public int[] buffer; // // public IntBag() { // this(0); // } // // public IntBag(int capacity) { // buffer = new int[capacity]; // } // // pub...
IntBag bag = new IntBag();
antag99/retinazer
retinazer/src/test/java/com/github/antag99/retinazer/util/DoubleBagTest.java
// Path: retinazer/src/main/java/com/github/antag99/retinazer/util/DoubleBag.java // public final class DoubleBag { // @Experimental // public double[] buffer; // // public DoubleBag() { // this(0); // } // // public DoubleBag(int capacity) { // buffer = new double[capacity]; // ...
import org.junit.Test; import com.github.antag99.retinazer.util.DoubleBag; import static org.junit.Assert.*;
/******************************************************************************* * Copyright (C) 2015 Anton Gustafsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
// Path: retinazer/src/main/java/com/github/antag99/retinazer/util/DoubleBag.java // public final class DoubleBag { // @Experimental // public double[] buffer; // // public DoubleBag() { // this(0); // } // // public DoubleBag(int capacity) { // buffer = new double[capacity]; // ...
DoubleBag bag = new DoubleBag();
antag99/retinazer
retinazer/src/test/java/com/github/antag99/retinazer/util/ShortBagTest.java
// Path: retinazer/src/main/java/com/github/antag99/retinazer/util/ShortBag.java // public final class ShortBag { // @Experimental // public short[] buffer; // // public ShortBag() { // this(0); // } // // public ShortBag(int capacity) { // buffer = new short[capacity]; // } //...
import org.junit.Test; import com.github.antag99.retinazer.util.ShortBag; import static org.junit.Assert.*;
/******************************************************************************* * Copyright (C) 2015 Anton Gustafsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
// Path: retinazer/src/main/java/com/github/antag99/retinazer/util/ShortBag.java // public final class ShortBag { // @Experimental // public short[] buffer; // // public ShortBag() { // this(0); // } // // public ShortBag(int capacity) { // buffer = new short[capacity]; // } //...
ShortBag bag = new ShortBag();
antag99/retinazer
retinazer/src/test/java/com/github/antag99/retinazer/util/ByteBagTest.java
// Path: retinazer/src/main/java/com/github/antag99/retinazer/util/ByteBag.java // public final class ByteBag { // @Experimental // public byte[] buffer; // // public ByteBag() { // this(0); // } // // public ByteBag(int capacity) { // buffer = new byte[capacity]; // } // // ...
import org.junit.Test; import com.github.antag99.retinazer.util.ByteBag; import static org.junit.Assert.*;
/******************************************************************************* * Copyright (C) 2015 Anton Gustafsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
// Path: retinazer/src/main/java/com/github/antag99/retinazer/util/ByteBag.java // public final class ByteBag { // @Experimental // public byte[] buffer; // // public ByteBag() { // this(0); // } // // public ByteBag(int capacity) { // buffer = new byte[capacity]; // } // // ...
ByteBag bag = new ByteBag();
antag99/retinazer
retinazer/src/main/java/com/github/antag99/retinazer/Engine.java
// Path: retinazer/src/main/java/com/github/antag99/retinazer/EngineConfig.java // static final class EntitySystemRegistration { // final EntitySystem system; // final Priority priority; // // EntitySystemRegistration(EntitySystem system, Priority priority) { // this.system = system; // thi...
import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; import com.github.antag99.retinazer.EngineConfig.EntitySystemRegistration;
/******************************************************************************* * Copyright (C) 2015 Anton Gustafsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
// Path: retinazer/src/main/java/com/github/antag99/retinazer/EngineConfig.java // static final class EntitySystemRegistration { // final EntitySystem system; // final Priority priority; // // EntitySystemRegistration(EntitySystem system, Priority priority) { // this.system = system; // thi...
List<EntitySystemRegistration> systemRegistrations = new ArrayList<>(config.systems);
antag99/retinazer
retinazer/src/test/java/com/github/antag99/retinazer/util/FloatBagTest.java
// Path: retinazer/src/main/java/com/github/antag99/retinazer/util/FloatBag.java // public final class FloatBag { // @Experimental // public float[] buffer; // // public FloatBag() { // this(0); // } // // public FloatBag(int capacity) { // buffer = new float[capacity]; // } //...
import org.junit.Test; import com.github.antag99.retinazer.util.FloatBag; import static org.junit.Assert.*;
/******************************************************************************* * Copyright (C) 2015 Anton Gustafsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
// Path: retinazer/src/main/java/com/github/antag99/retinazer/util/FloatBag.java // public final class FloatBag { // @Experimental // public float[] buffer; // // public FloatBag() { // this(0); // } // // public FloatBag(int capacity) { // buffer = new float[capacity]; // } //...
FloatBag bag = new FloatBag();
antag99/retinazer
retinazer/src/test/java/com/github/antag99/retinazer/util/BagTest.java
// Path: retinazer/src/main/java/com/github/antag99/retinazer/util/Bag.java // public final class Bag<E> { // @Experimental // public Object[] buffer; // // static int nextPowerOfTwo(int value) { // if (value == 0) { // return 1; // } // value--; // value |= valu...
import org.junit.Test; import com.github.antag99.retinazer.util.Bag; import static org.junit.Assert.*;
/******************************************************************************* * Copyright (C) 2015 Anton Gustafsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restricti...
// Path: retinazer/src/main/java/com/github/antag99/retinazer/util/Bag.java // public final class Bag<E> { // @Experimental // public Object[] buffer; // // static int nextPowerOfTwo(int value) { // if (value == 0) { // return 1; // } // value--; // value |= valu...
Bag<Object> bag = new Bag<>();
wepay/kafka-connect-bigquery
kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/utils/SinkRecordConverter.java
// Path: kcbq-api/src/main/java/com/wepay/kafka/connect/bigquery/api/KafkaSchemaRecordType.java // public enum KafkaSchemaRecordType { // // VALUE("value"), // KEY("key"); // // private final String str; // // KafkaSchemaRecordType(String str) { // this.str = str; // } // // public S...
import com.google.cloud.bigquery.InsertAllRequest; import com.wepay.kafka.connect.bigquery.api.KafkaSchemaRecordType; import com.wepay.kafka.connect.bigquery.convert.KafkaDataBuilder; import com.wepay.kafka.connect.bigquery.convert.RecordConverter; import org.apache.kafka.connect.sink.SinkRecord; import java.util.Map; ...
package com.wepay.kafka.connect.bigquery.utils; /* * Copyright 2016 WePay, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * ...
// Path: kcbq-api/src/main/java/com/wepay/kafka/connect/bigquery/api/KafkaSchemaRecordType.java // public enum KafkaSchemaRecordType { // // VALUE("value"), // KEY("key"); // // private final String str; // // KafkaSchemaRecordType(String str) { // this.str = str; // } // // public S...
Map<String, Object> convertedRecord = recordConverter.convertRecord(record, KafkaSchemaRecordType.VALUE);
wepay/kafka-connect-bigquery
kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/utils/SinkRecordConverter.java
// Path: kcbq-api/src/main/java/com/wepay/kafka/connect/bigquery/api/KafkaSchemaRecordType.java // public enum KafkaSchemaRecordType { // // VALUE("value"), // KEY("key"); // // private final String str; // // KafkaSchemaRecordType(String str) { // this.str = str; // } // // public S...
import com.google.cloud.bigquery.InsertAllRequest; import com.wepay.kafka.connect.bigquery.api.KafkaSchemaRecordType; import com.wepay.kafka.connect.bigquery.convert.KafkaDataBuilder; import com.wepay.kafka.connect.bigquery.convert.RecordConverter; import org.apache.kafka.connect.sink.SinkRecord; import java.util.Map; ...
package com.wepay.kafka.connect.bigquery.utils; /* * Copyright 2016 WePay, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * ...
// Path: kcbq-api/src/main/java/com/wepay/kafka/connect/bigquery/api/KafkaSchemaRecordType.java // public enum KafkaSchemaRecordType { // // VALUE("value"), // KEY("key"); // // private final String str; // // KafkaSchemaRecordType(String str) { // this.str = str; // } // // public S...
convertedRecord.put(kafkaDataFieldName.get(), KafkaDataBuilder.buildKafkaDataRecord(record));
wepay/kafka-connect-bigquery
kcbq-connector/src/integration-test/java/com/wepay/kafka/connect/bigquery/it/BigQueryConnectorIntegrationTest.java
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/BigQueryHelper.java // public class BigQueryHelper { // private static final Logger logger = LoggerFactory.getLogger(BigQueryHelper.class); // private static String keySource; // // /** // * Returns a default {@link BigQuery} instance for ...
import static com.google.cloud.bigquery.LegacySQLTypeName.BOOLEAN; import static com.google.cloud.bigquery.LegacySQLTypeName.BYTES; import static com.google.cloud.bigquery.LegacySQLTypeName.DATE; import static com.google.cloud.bigquery.LegacySQLTypeName.FLOAT; import static com.google.cloud.bigquery.LegacySQLTypeName.I...
keyfile = properties.getProperty(KEYFILE_PROPERTY); if (keyfile == null) { throw new SinkConfigConnectException( "'" + KEYFILE_PROPERTY + "' property must be specified in test properties file" ); } project = properties.getProperty(PROJECT_PROPERTY); ...
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/BigQueryHelper.java // public class BigQueryHelper { // private static final Logger logger = LoggerFactory.getLogger(BigQueryHelper.class); // private static String keySource; // // /** // * Returns a default {@link BigQuery} instance for ...
bigQuery = new BigQueryHelper().setKeySource(keySource).connect(project, keyfile);
wepay/kafka-connect-bigquery
kcbq-connector/src/test/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConvertersTest.java
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConverters.java // public static class DateConverter extends LogicalTypeConverter { // /** // * Create a new DateConverter. // */ // public DateConverter() { // super(Date.LOGICAL_NAME, // Sche...
import java.math.BigDecimal; import java.util.Date; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import com.google.cloud.bigquery.LegacySQLTypeName; import com.wepay.kafka.connect.bigquery.convert.logicaltype.KafkaLogicalConverters.DateConverter; import com.wepay.kafka.connect.bigqu...
package com.wepay.kafka.connect.bigquery.convert.logicaltype; /* * Copyright 2016 WePay, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICE...
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConverters.java // public static class DateConverter extends LogicalTypeConverter { // /** // * Create a new DateConverter. // */ // public DateConverter() { // super(Date.LOGICAL_NAME, // Sche...
DateConverter converter = new DateConverter();
wepay/kafka-connect-bigquery
kcbq-connector/src/test/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConvertersTest.java
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConverters.java // public static class DateConverter extends LogicalTypeConverter { // /** // * Create a new DateConverter. // */ // public DateConverter() { // super(Date.LOGICAL_NAME, // Sche...
import java.math.BigDecimal; import java.util.Date; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import com.google.cloud.bigquery.LegacySQLTypeName; import com.wepay.kafka.connect.bigquery.convert.logicaltype.KafkaLogicalConverters.DateConverter; import com.wepay.kafka.connect.bigqu...
package com.wepay.kafka.connect.bigquery.convert.logicaltype; /* * Copyright 2016 WePay, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICE...
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConverters.java // public static class DateConverter extends LogicalTypeConverter { // /** // * Create a new DateConverter. // */ // public DateConverter() { // super(Date.LOGICAL_NAME, // Sche...
DecimalConverter converter = new DecimalConverter();
wepay/kafka-connect-bigquery
kcbq-connector/src/test/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConvertersTest.java
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConverters.java // public static class DateConverter extends LogicalTypeConverter { // /** // * Create a new DateConverter. // */ // public DateConverter() { // super(Date.LOGICAL_NAME, // Sche...
import java.math.BigDecimal; import java.util.Date; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import com.google.cloud.bigquery.LegacySQLTypeName; import com.wepay.kafka.connect.bigquery.convert.logicaltype.KafkaLogicalConverters.DateConverter; import com.wepay.kafka.connect.bigqu...
fail("Expected encoding type check to succeed."); } Date date = new Date(TIMESTAMP); String formattedDate = converter.convert(date); assertEquals("2017-03-01", formattedDate); } @Test public void testDecimalConversion() { DecimalConverter converter = new DecimalConverter(); assert...
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConverters.java // public static class DateConverter extends LogicalTypeConverter { // /** // * Create a new DateConverter. // */ // public DateConverter() { // super(Date.LOGICAL_NAME, // Sche...
TimestampConverter converter = new TimestampConverter();
wepay/kafka-connect-bigquery
kcbq-connector/src/integration-test/java/com/wepay/kafka/connect/bigquery/it/utils/TableClearer.java
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/BigQueryHelper.java // public class BigQueryHelper { // private static final Logger logger = LoggerFactory.getLogger(BigQueryHelper.class); // private static String keySource; // // /** // * Returns a default {@link BigQuery} instance for ...
import com.google.api.gax.paging.Page; import com.google.cloud.bigquery.BigQuery; import com.google.cloud.bigquery.Table; import com.wepay.kafka.connect.bigquery.BigQueryHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory;
package com.wepay.kafka.connect.bigquery.it.utils; /* * Copyright 2016 WePay, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * ...
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/BigQueryHelper.java // public class BigQueryHelper { // private static final Logger logger = LoggerFactory.getLogger(BigQueryHelper.class); // private static String keySource; // // /** // * Returns a default {@link BigQuery} instance for ...
BigQuery bigQuery = new BigQueryHelper().setKeySource(keySource).connect(args[1], args[0]);
wepay/kafka-connect-bigquery
kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/BigQueryHelper.java
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/exception/BigQueryConnectException.java // public class BigQueryConnectException extends ConnectException { // public BigQueryConnectException(String msg) { // super(msg); // } // // public BigQueryConnectException(String msg, Throwable t...
import java.nio.charset.StandardCharsets; import com.google.auth.oauth2.GoogleCredentials; import com.google.cloud.bigquery.BigQuery; import com.google.cloud.bigquery.BigQueryOptions; import com.wepay.kafka.connect.bigquery.exception.BigQueryConnectException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; imp...
package com.wepay.kafka.connect.bigquery; /* * Copyright 2016 WePay, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless...
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/exception/BigQueryConnectException.java // public class BigQueryConnectException extends ConnectException { // public BigQueryConnectException(String msg) { // super(msg); // } // // public BigQueryConnectException(String msg, Throwable t...
throw new BigQueryConnectException("Failed to access json key file", err);
wepay/kafka-connect-bigquery
kcbq-connector/src/test/java/com/wepay/kafka/connect/bigquery/SchemaManagerTest.java
// Path: kcbq-api/src/main/java/com/wepay/kafka/connect/bigquery/api/SchemaRetriever.java // public interface SchemaRetriever { // /** // * Called with all of the configuration settings passed to the connector via its // * {@link org.apache.kafka.connect.sink.SinkConnector#start(Map)} method. // * @param pro...
import org.apache.kafka.connect.data.Schema; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import java.util.Arrays; import java.util.List; import java.util.Optional; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import com.google.cloud.bigquery.BigQuery; impo...
package com.wepay.kafka.connect.bigquery; /* * Copyright 2016 WePay, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless...
// Path: kcbq-api/src/main/java/com/wepay/kafka/connect/bigquery/api/SchemaRetriever.java // public interface SchemaRetriever { // /** // * Called with all of the configuration settings passed to the connector via its // * {@link org.apache.kafka.connect.sink.SinkConnector#start(Map)} method. // * @param pro...
private SchemaRetriever mockSchemaRetriever;
wepay/kafka-connect-bigquery
kcbq-connector/src/integration-test/java/com/wepay/kafka/connect/bigquery/it/utils/BucketClearer.java
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/GCSBuilder.java // public class GCSBuilder { // private static final Logger logger = LoggerFactory.getLogger(GCSBuilder.class); // // private final String projectName; // private String key; // private String keySource; // // p...
import com.google.cloud.storage.Blob; import com.google.cloud.storage.Bucket; import com.google.cloud.storage.Storage; import com.wepay.kafka.connect.bigquery.GCSBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory;
package com.wepay.kafka.connect.bigquery.it.utils; /* * Copyright 2016 WePay, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * ...
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/GCSBuilder.java // public class GCSBuilder { // private static final Logger logger = LoggerFactory.getLogger(GCSBuilder.class); // // private final String projectName; // private String key; // private String keySource; // // p...
Storage gcs = new GCSBuilder(args[1]).setKey(args[0]).setKeySource(keySource).build();