Commit ffcb930b authored by Sebastian Ebert's avatar Sebastian Ebert
Browse files

integrated id changes and fixed default protocol

parent f6f00b31
Pipeline #11199 failed with stages
in 11 minutes and 48 seconds
......@@ -30,7 +30,7 @@ dependencies {
implementation group: 'com.github.spullara.mustache.java', name: 'compiler', version: "${mustache_java_version}"
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
api group: 'org.apache.commons', name: 'commons-lang3', version: '3.0'
runtimeOnly group: 'org.jastadd', name: 'jastadd', version: '2.3.4'
// runtimeOnly group: 'org.jastadd', name: 'jastadd', version: '2.3.4'
// runtimeOnly group: 'org.jastadd', name: 'jastadd', version: '2.3.5'
runtimeOnly fileTree(include: ['jastadd2.jar'], dir: '../libs')
api group: 'net.sf.beaver', name: 'beaver-rt', version: '0.9.11'
......
......@@ -179,9 +179,9 @@ public class Compiler extends AbstractCompiler {
optionProtocols = addOption(
new ValueOption("protocols", "Protocols to enable")
.acceptMultipleValues(true)
.addDefaultValue(OPTION_PROTOCOL_JAVA, "Enable Java")
.addAcceptedValue(OPTION_PROTOCOL_JAVA, "Enable Java")
.addAcceptedValue(OPTION_PROTOCOL_REST, "Enable REST")
.addAcceptedValue(OPTION_PROTOCOL_MQTT, "Enable MQTT")
.addDefaultValue(OPTION_PROTOCOL_MQTT, "Enable MQTT")
);
optionPrintYaml = addOption(
new BooleanOption("printYaml", "Print out YAML instead of generating files")
......
......@@ -16,19 +16,23 @@ aspect RagConnectHandler {
{{/Handlers}}
}
class ConnectToken {
//static java.util.concurrent.atomic.AtomicLong counter = new java.util.concurrent.atomic.AtomicLong(0);
final String id;
static java.util.concurrent.atomic.AtomicLong counter = new java.util.concurrent.atomic.AtomicLong(0);
final long id;
final String globalId;
final java.net.URI uri;
public ConnectToken(java.net.URI uri) {
this.id = java.util.UUID.randomUUID().toString(); // counter.incrementAndGet();
this.id = counter.incrementAndGet();
this.globalId = java.util.UUID.randomUUID().toString();
this.uri = uri;
}
public ConnectToken(java.net.URI uri, String uuid) {
this.id = uuid; // counter.incrementAndGet();
this.id = counter.incrementAndGet();
this.uri = uri;
this.globalId = uuid;
}
}
static java.util.Map<ASTNode, java.util.Map<java.net.URI, ConnectToken>> ASTNode.connectTokens = new java.util.HashMap<>();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment