Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
trismegisto-services
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mauro Paolo Josue Zuñiga Mallqui
trismegisto-services
Commits
3667c687
Commit
3667c687
authored
Dec 10, 2023
by
paolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SE AGREGO ENDPOINT WEBSOCKET 2
parent
322fbf50
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
MessageController.java
.../java/web/multitask/app/controller/MessageController.java
+6
-5
Message.java
src/main/java/web/multitask/app/model/Message.java
+2
-0
Response.java
src/main/java/web/multitask/app/model/Response.java
+2
-0
app.war
target/app.war
+0
-0
No files found.
src/main/java/web/multitask/app/controller/MessageController.java
View file @
3667c687
...
...
@@ -13,11 +13,11 @@ import java.util.Date;
@Controller
public
class
MessageController
{
@MessageMapping
(
"/websocket/{project}/{
user
}"
)
@SendTo
(
"/topic/message/{project}/{
user
}"
)
public
Response
envio
(
@PathVariable
(
"project"
)
String
project
,
@PathVariable
(
"
user"
)
String
user
,
Message
message
)
{
return
new
Response
(
user
,
project
,
message
.
getContent
(),
new
Date
().
toString
());
@MessageMapping
(
"/websocket/{project}/{
topic
}"
)
@SendTo
(
"/topic/message/{project}/{
topic
}"
)
public
Response
envio
(
@PathVariable
(
"project"
)
String
project
,
@PathVariable
(
"
topic"
)
String
topic
,
Message
message
)
{
return
new
Response
(
message
.
getUser
(),
project
,
topic
,
message
.
getContent
(),
new
Date
().
toString
());
}
}
\ No newline at end of file
src/main/java/web/multitask/app/model/Message.java
View file @
3667c687
...
...
@@ -8,5 +8,6 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@Getter
public
class
Message
implements
java
.
io
.
Serializable
{
private
String
user
;
private
String
content
;
}
\ No newline at end of file
src/main/java/web/multitask/app/model/Response.java
View file @
3667c687
...
...
@@ -11,6 +11,7 @@ import lombok.NoArgsConstructor;
public
class
Response
implements
java
.
io
.
Serializable
{
private
String
user
;
private
String
project
;
private
String
topic
;
private
String
content
;
private
String
date
;
}
\ No newline at end of file
target/app.war
View file @
3667c687
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment