Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
RagConnect Minimal Example
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JastAdd
RagConnect Minimal Example
Commits
df7c82ba
Commit
df7c82ba
authored
4 years ago
by
René Schöne
Browse files
Options
Downloads
Patches
Plain Diff
Continue working on incremental dependencies.
parent
91480e88
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/tudresden/inf/st/mrc/MinimalMain.java
+38
-10
38 additions, 10 deletions
src/main/java/de/tudresden/inf/st/mrc/MinimalMain.java
with
38 additions
and
10 deletions
src/main/java/de/tudresden/inf/st/mrc/MinimalMain.java
+
38
−
10
View file @
df7c82ba
...
@@ -49,6 +49,7 @@ public class MinimalMain {
...
@@ -49,6 +49,7 @@ public class MinimalMain {
static
MinimalReceiver
receiver
=
null
;
static
MinimalReceiver
receiver
=
null
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
boolean
success
;
publisher
=
new
MqttHandler
(
"publisher"
).
setHost
(
"localhost"
);
publisher
=
new
MqttHandler
(
"publisher"
).
setHost
(
"localhost"
);
publisher
.
waitUntilReady
(
2
,
SECONDS
);
publisher
.
waitUntilReady
(
2
,
SECONDS
);
publisher
.
publish
(
"---"
,
(
"Start at "
+
Instant
.
now
()).
getBytes
());
publisher
.
publish
(
"---"
,
(
"Start at "
+
Instant
.
now
()).
getBytes
());
...
@@ -86,32 +87,59 @@ public class MinimalMain {
...
@@ -86,32 +87,59 @@ public class MinimalMain {
describedWait
(
1
,
"Publish 2"
);
describedWait
(
1
,
"Publish 2"
);
publisher
.
publish
(
TOPIC_FOR_INPUT
,
"2"
.
getBytes
());
publisher
.
publish
(
TOPIC_FOR_INPUT
,
"2"
.
getBytes
());
// aWithNoDependency.getC(0).getOutputOnC();
describedWait
(
1
,
"Publish 21"
);
publisher
.
publish
(
TOPIC_FOR_INPUT
,
"21"
.
getBytes
());
describedWait
(
2
,
"Disconnect normalA"
);
describedWait
(
1
,
"Publish 22 and 23"
);
try
{
publisher
.
publish
(
TOPIC_FOR_INPUT
,
"22"
.
getBytes
());
boolean
success
=
normalA
.
disconnectInput
(
TOPIC_URI_FOR_INPUT
);
publisher
.
publish
(
TOPIC_FOR_INPUT
,
"23"
.
getBytes
());
logger
.
info
(
"disconnect success: "
+
success
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
// aWithNoDependency.getC(0).getOutputOnC();
// aWithNoDependency.getC(0).getOutputOnC();
describedWait
(
2
,
"Disconnect normalA"
);
success
=
normalA
.
disconnectInput
(
TOPIC_URI_FOR_INPUT
);
logger
.
info
(
"disconnect success: {}"
,
success
);
describedWait
(
2
,
"Publish 4"
);
describedWait
(
2
,
"Publish 4"
);
// receiver.reset();
// receiver.reset();
publisher
.
publish
(
TOPIC_FOR_INPUT
,
"4"
.
getBytes
());
publisher
.
publish
(
TOPIC_FOR_INPUT
,
"4"
.
getBytes
());
// aWithNoDependency.getC(0).getOutputOnC();
// describedWait(1, "Print latest attributes");
// describedWait(1, "Print latest attributes");
// logger.info("latest attributes = {}", receiver.latestAttributes);
// logger.info("latest attributes = {}", receiver.latestAttributes);
describedWait
(
1
,
"Disconnect aNoDep"
);
success
=
aWithNoDependency
.
disconnectInput
(
TOPIC_URI_FOR_INPUT
);
logger
.
info
(
"disconnect success: {}"
,
success
);
describedWait
(
1
,
"Publish 6"
);
publisher
.
publish
(
TOPIC_FOR_INPUT
,
"6"
.
getBytes
());
describedWait
(
1
,
"Connect aNormal again"
);
success
=
normalA
.
connectInput
(
TOPIC_URI_FOR_INPUT
);
logger
.
info
(
"connect success: {}"
,
success
);
describedWait
(
1
,
"Publish 8"
);
publisher
.
publish
(
TOPIC_FOR_INPUT
,
"8"
.
getBytes
());
describedWait
(
1
,
"Publish 81"
);
publisher
.
publish
(
TOPIC_FOR_INPUT
,
"81"
.
getBytes
());
describedWait
(
1
,
"Connect aNoDep again"
);
success
=
aWithNoDependency
.
connectInput
(
TOPIC_URI_FOR_INPUT
);
logger
.
info
(
"connect success: {}"
,
success
);
describedWait
(
1
,
"Publish 10"
);
publisher
.
publish
(
TOPIC_FOR_INPUT
,
"10"
.
getBytes
());
describedWait
(
1
,
"Publish 101"
);
publisher
.
publish
(
TOPIC_FOR_INPUT
,
"101"
.
getBytes
());
// while (true) {}
// while (true) {}
// System.out.println("[Enter] to exit");
// System.out.println("[Enter] to exit");
// Scanner scanner = new Scanner(System.in);
// Scanner scanner = new Scanner(System.in);
// scanner.nextLine();
// scanner.nextLine();
// SECONDS.sleep(15);
// SECONDS.sleep(15);
describedWait
(
0
,
"End"
);
}
}
private
static
void
describedWait
(
long
seconds
,
String
description
)
throws
InterruptedException
{
private
static
void
describedWait
(
long
seconds
,
String
description
)
throws
InterruptedException
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment