public class AasJerseyClient extends Object
| Modifier and Type | Field and Description |
|---|---|
private de.iip_ecosphere.platform.support.aas.Submodel |
sm |
| Constructor and Description |
|---|
AasJerseyClient() |
| Modifier and Type | Method and Description |
|---|---|
private void |
initialize()
Initializes the client.
|
static void |
main(String[] args)
Executes the Client.
This process, which requires a running AAS and protocol server, retrieves the AAS and will then proceed to collect all the properties stored within. |
private static void |
printRestSampleObjects(io.micrometer.core.instrument.Gauge gauge,
io.micrometer.core.instrument.Counter counter,
io.micrometer.core.instrument.Timer timer)
Used to print the values of the retrieved custom meters before and after
updating them.
|
private static javax.json.JsonArray |
retrieveArray(Object json)
Creates a JSON Array from a retrieved String.
|
private void |
retrieveBaseProperties()
Retrieves base properties.
|
private void |
retrieveGauges(ArrayList<javax.json.JsonObject> objects,
ArrayList<javax.json.JsonArray> arrays)
Retrieves gauges.
|
private static javax.json.JsonObject |
retrieveObject(Object json)
Creates a JSON Object from a retrieved String.
|
private static String[] |
retrieveTags(javax.json.JsonArray tagsArr)
Retrieves the Tags stored in a JsonArray as a String array needed for the
method.
|
private void |
testBasics()
Tests the basic functionalities, i.e., counters, gauges and timers.
|
private void |
testConfiguration()
Tests the configuration options.
|
private void |
testLists()
Tests meter lists.
|
private void |
testRest()
Testing the rest functionality.
|
public static void main(String[] args) throws IOException, ExecutionException
args - command line arguments, never usedIOException - if retrieving the AAS failsExecutionException - if accessing the AAS failsprivate void initialize()
throws IOException
IOException - if retrieving the AAS failsprivate void retrieveBaseProperties()
throws ExecutionException
ExecutionException - if accessing the AAS failsprivate void testLists()
throws ExecutionException
ExecutionException - if accessing the AAS failsprivate void testBasics()
throws ExecutionException
ExecutionException - if accessing the AAS failsprivate void retrieveGauges(ArrayList<javax.json.JsonObject> objects, ArrayList<javax.json.JsonArray> arrays) throws ExecutionException
objects - the objectsarrays - the arraysExecutionException - if accessing the AAS failsprivate void testRest()
throws ExecutionException
ExecutionException - if accessing the AAS failsprivate void testConfiguration()
throws ExecutionException
ExecutionException - if accessing the AAS failsprivate static javax.json.JsonObject retrieveObject(Object json)
json - String representing the JSON Objectprivate static javax.json.JsonArray retrieveArray(Object json)
json - String representing the JSON Arrayprivate static String[] retrieveTags(javax.json.JsonArray tagsArr)
tagsArr - JsonArray with the tagsprivate static void printRestSampleObjects(io.micrometer.core.instrument.Gauge gauge,
io.micrometer.core.instrument.Counter counter,
io.micrometer.core.instrument.Timer timer)
gauge - gauge to be printedcounter - counter to be printedtimer - timer to be printedCopyright © 2022. All rights reserved.