Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
tp-4
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
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pirkl-poo-2018
tp-4
Commits
02f5857d
Verified
Commit
02f5857d
authored
6 years ago
by
Théo Pirkl
Browse files
Options
Downloads
Patches
Plain Diff
Centralizes user variables
parent
74f06583
No related branches found
No related tags found
1 merge request
!21
*poof* final version
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/ch/hepia/Main.java
+4
-2
4 additions, 2 deletions
src/main/java/ch/hepia/Main.java
src/main/java/ch/hepia/config/AppConfig.java
+3
-0
3 additions, 0 deletions
src/main/java/ch/hepia/config/AppConfig.java
with
7 additions
and
2 deletions
src/main/java/ch/hepia/Main.java
+
4
−
2
View file @
02f5857d
...
...
@@ -25,12 +25,14 @@ public class Main extends Application {
*/
public
static
void
main
(
String
[]
args
)
throws
Exception
{
MessageManager
m
=
new
MessageManager
(
AppConfig
.
RABBITMQ_HOSTNAME
,
"frog"
,
"poney1234"
,
"broadcaster"
);
AppConfig
.
RABBITMQ_HOSTNAME
,
AppConfig
.
RABBITMQ_USERNAME
,
AppConfig
.
RABBITMQ_PASSWORD
,
AppConfig
.
RABBITMQ_EXCHANGE
);
m
.
sendJoinedJourney
(
new
JoinedJourney
(
new
User
(
"Théo"
),
new
ArrayList
<>()));
m
.
subscribeJoinedJourney
(
joinedJourney
->
System
.
out
.
println
(
"When I was hungary"
));
m
.
subscribeChatMessage
(
chatMessage
->
System
.
out
.
println
(
chatMessage
.
getUser
().
toString
()
+
": "
+
chatMessage
.
getMessage
()));
m
.
sendChatMessage
(
new
ChatMessage
(
new
User
(
"Alexis"
),
"Bonjour le monde !"
));
//
launch(args);
launch
(
args
);
}
@Override
...
...
This diff is collapsed.
Click to expand it.
src/main/java/ch/hepia/config/AppConfig.java
+
3
−
0
View file @
02f5857d
...
...
@@ -9,5 +9,8 @@ public final class AppConfig {
public
static
final
Integer
APP_HEIGHT
=
565
;
public
static
final
String
RABBITMQ_HOSTNAME
=
"redgrave.science"
;
public
static
final
String
RABBITMQ_USERNAME
=
"frog"
;
public
static
final
String
RABBITMQ_PASSWORD
=
"poney1234"
;
public
static
final
String
RABBITMQ_EXCHANGE
=
"broadcaster"
;
public
static
final
Integer
RABBITMQ_PORT
=
5672
;
}
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