What does this websocket api means? The Next CEO of Stack OverflowWhat browsers support HTML5 WebSocket API?What is the fundamental difference between WebSockets and pure TCP?HTTP headers in Websockets client APIWebSockets vs. Server-Sent events/EventSourceIn what situations would AJAX long/short polling be preferred over HTML5 WebSockets?Differences between socket.io and websocketsWhat are Long-Polling, Websockets, Server-Sent Events (SSE) and Comet?WebSockets protocol vs HTTPWhich websocket library to use with Node.js?Does HTTP/2 make websockets obsolete?
Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?
How should I support this large drywall patch?
How do I get the green key off the shelf in the Dobby level of Lego Harry Potter 2?
What's the point of interval inversion?
Can I equip Skullclamp on a creature I am sacrificing?
How to make a variable always equal to the result of some calculations?
I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin
What is the purpose of the Evocation wizard's Potent Cantrip feature?
How do scammers retract money, while you can’t?
Can the Reverse Gravity spell affect the Meteor Swarm spell?
Only print output after finding pattern
Why here is plural "We went to the movies last night."
Trouble understanding the speech of overseas colleagues
Visit to the USA with ESTA approved before trip to Iran
Implement the Thanos sorting algorithm
Is it my responsibility to learn a new technology in my own time my employer wants to implement?
Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis
What does this shorthand mean?
How did people program for Consoles with multiple CPUs?
Unreliable Magic - Is it worth it?
Why didn't Khan get resurrected in the Genesis Explosion?
When Does an Atlas Uniquely Define a Manifold?
Why do remote companies require working in the US?
% symbol leads to superlong (forever?) compilations
What does this websocket api means?
The Next CEO of Stack OverflowWhat browsers support HTML5 WebSocket API?What is the fundamental difference between WebSockets and pure TCP?HTTP headers in Websockets client APIWebSockets vs. Server-Sent events/EventSourceIn what situations would AJAX long/short polling be preferred over HTML5 WebSockets?Differences between socket.io and websocketsWhat are Long-Polling, Websockets, Server-Sent Events (SSE) and Comet?WebSockets protocol vs HTTPWhich websocket library to use with Node.js?Does HTTP/2 make websockets obsolete?
I have created spring boot websocket project. I want to know what does
localhost:9090/gs-guide-websocket/parm1/param2/websocket
This Api means?
here i know 'gs-guide-websocket' is my websocket end point but what is the rest of all?
WebSocketConfig.java
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
@Override
public void configureMessageBroker(MessageBrokerRegistry config)
config.enableSimpleBroker("/topic");
config.setApplicationDestinationPrefixes("/app");
@Override
public void registerStompEndpoints(StompEndpointRegistry registry)
registry.addEndpoint("/gs-guide-websocket").withSockJS();
Controller.java
@MessageMapping("/hello")
@SendTo("/topic/greetings")
public Greeting greeting(HelloMessage message) throws Exception
Thread.sleep(1000); // simulated delay
return new Greeting("Hello, " + HtmlUtils.htmlEscape(message.getName()) + "!");
In the about Url what is the sender identity and whom we are sending?
Code is working fine.
spring-boot websocket
add a comment |
I have created spring boot websocket project. I want to know what does
localhost:9090/gs-guide-websocket/parm1/param2/websocket
This Api means?
here i know 'gs-guide-websocket' is my websocket end point but what is the rest of all?
WebSocketConfig.java
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
@Override
public void configureMessageBroker(MessageBrokerRegistry config)
config.enableSimpleBroker("/topic");
config.setApplicationDestinationPrefixes("/app");
@Override
public void registerStompEndpoints(StompEndpointRegistry registry)
registry.addEndpoint("/gs-guide-websocket").withSockJS();
Controller.java
@MessageMapping("/hello")
@SendTo("/topic/greetings")
public Greeting greeting(HelloMessage message) throws Exception
Thread.sleep(1000); // simulated delay
return new Greeting("Hello, " + HtmlUtils.htmlEscape(message.getName()) + "!");
In the about Url what is the sender identity and whom we are sending?
Code is working fine.
spring-boot websocket
for -1 please let me know what is wrong so can elaborate more clearly
– Abhishek Chudekar
Mar 7 at 14:47
For simplecity you can consider localhost:9090/gs-guide-websocket/712/a50pfxbq/websocket as localhost:9090/user/getuser/712/username
– Patel Romil
Mar 7 at 16:06
It's unclear to me what you mean withparam1
andparam2
, where do you get that from? I see no references ofparam1
andparam2
within your code.
– g00glen00b
Mar 8 at 23:02
@g00glen00b i changed the parameter as for param1 their was 210 and param2 was some hex code like 'rhy42ja1' so for simplicity i changed it to param1 and param2, as some people have downvoted for original url.
– Abhishek Chudekar
Mar 9 at 6:13
add a comment |
I have created spring boot websocket project. I want to know what does
localhost:9090/gs-guide-websocket/parm1/param2/websocket
This Api means?
here i know 'gs-guide-websocket' is my websocket end point but what is the rest of all?
WebSocketConfig.java
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
@Override
public void configureMessageBroker(MessageBrokerRegistry config)
config.enableSimpleBroker("/topic");
config.setApplicationDestinationPrefixes("/app");
@Override
public void registerStompEndpoints(StompEndpointRegistry registry)
registry.addEndpoint("/gs-guide-websocket").withSockJS();
Controller.java
@MessageMapping("/hello")
@SendTo("/topic/greetings")
public Greeting greeting(HelloMessage message) throws Exception
Thread.sleep(1000); // simulated delay
return new Greeting("Hello, " + HtmlUtils.htmlEscape(message.getName()) + "!");
In the about Url what is the sender identity and whom we are sending?
Code is working fine.
spring-boot websocket
I have created spring boot websocket project. I want to know what does
localhost:9090/gs-guide-websocket/parm1/param2/websocket
This Api means?
here i know 'gs-guide-websocket' is my websocket end point but what is the rest of all?
WebSocketConfig.java
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
@Override
public void configureMessageBroker(MessageBrokerRegistry config)
config.enableSimpleBroker("/topic");
config.setApplicationDestinationPrefixes("/app");
@Override
public void registerStompEndpoints(StompEndpointRegistry registry)
registry.addEndpoint("/gs-guide-websocket").withSockJS();
Controller.java
@MessageMapping("/hello")
@SendTo("/topic/greetings")
public Greeting greeting(HelloMessage message) throws Exception
Thread.sleep(1000); // simulated delay
return new Greeting("Hello, " + HtmlUtils.htmlEscape(message.getName()) + "!");
In the about Url what is the sender identity and whom we are sending?
Code is working fine.
spring-boot websocket
spring-boot websocket
edited Mar 8 at 3:24
Abhishek Chudekar
asked Mar 7 at 14:30
Abhishek ChudekarAbhishek Chudekar
869
869
for -1 please let me know what is wrong so can elaborate more clearly
– Abhishek Chudekar
Mar 7 at 14:47
For simplecity you can consider localhost:9090/gs-guide-websocket/712/a50pfxbq/websocket as localhost:9090/user/getuser/712/username
– Patel Romil
Mar 7 at 16:06
It's unclear to me what you mean withparam1
andparam2
, where do you get that from? I see no references ofparam1
andparam2
within your code.
– g00glen00b
Mar 8 at 23:02
@g00glen00b i changed the parameter as for param1 their was 210 and param2 was some hex code like 'rhy42ja1' so for simplicity i changed it to param1 and param2, as some people have downvoted for original url.
– Abhishek Chudekar
Mar 9 at 6:13
add a comment |
for -1 please let me know what is wrong so can elaborate more clearly
– Abhishek Chudekar
Mar 7 at 14:47
For simplecity you can consider localhost:9090/gs-guide-websocket/712/a50pfxbq/websocket as localhost:9090/user/getuser/712/username
– Patel Romil
Mar 7 at 16:06
It's unclear to me what you mean withparam1
andparam2
, where do you get that from? I see no references ofparam1
andparam2
within your code.
– g00glen00b
Mar 8 at 23:02
@g00glen00b i changed the parameter as for param1 their was 210 and param2 was some hex code like 'rhy42ja1' so for simplicity i changed it to param1 and param2, as some people have downvoted for original url.
– Abhishek Chudekar
Mar 9 at 6:13
for -1 please let me know what is wrong so can elaborate more clearly
– Abhishek Chudekar
Mar 7 at 14:47
for -1 please let me know what is wrong so can elaborate more clearly
– Abhishek Chudekar
Mar 7 at 14:47
For simplecity you can consider localhost:9090/gs-guide-websocket/712/a50pfxbq/websocket as localhost:9090/user/getuser/712/username
– Patel Romil
Mar 7 at 16:06
For simplecity you can consider localhost:9090/gs-guide-websocket/712/a50pfxbq/websocket as localhost:9090/user/getuser/712/username
– Patel Romil
Mar 7 at 16:06
It's unclear to me what you mean with
param1
and param2
, where do you get that from? I see no references of param1
and param2
within your code.– g00glen00b
Mar 8 at 23:02
It's unclear to me what you mean with
param1
and param2
, where do you get that from? I see no references of param1
and param2
within your code.– g00glen00b
Mar 8 at 23:02
@g00glen00b i changed the parameter as for param1 their was 210 and param2 was some hex code like 'rhy42ja1' so for simplicity i changed it to param1 and param2, as some people have downvoted for original url.
– Abhishek Chudekar
Mar 9 at 6:13
@g00glen00b i changed the parameter as for param1 their was 210 and param2 was some hex code like 'rhy42ja1' so for simplicity i changed it to param1 and param2, as some people have downvoted for original url.
– Abhishek Chudekar
Mar 9 at 6:13
add a comment |
1 Answer
1
active
oldest
votes
The @MessageMapping
annotation ensures that if a message is sent to destination "/hello"
, then the greeting()
method is called.
After the 1 second delay, the greeting()
method creates a Greeting object and returns it. The return value is broadcast to all subscribers to "/topic/greetings"
as specified in the @SendTo
annotation.
Refer This Example
I have edited the URL above to param1 and param2 can you tell me what is param1 and param2 will be,as i am using this url for android app. android natively does not support for STOMP client.
– Abhishek Chudekar
Mar 8 at 3:26
No doubt you have added param(s) but URL depends on what operation you want to perform. BTW by which URL you are going to start it?
– Patel Romil
Mar 8 at 4:39
lets consider i want to subscribe to /topic/greetings and want to send message to /app/hello, then what will be the url. Please help me
– Abhishek Chudekar
Mar 8 at 6:10
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55046204%2fwhat-does-this-websocket-api-means%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The @MessageMapping
annotation ensures that if a message is sent to destination "/hello"
, then the greeting()
method is called.
After the 1 second delay, the greeting()
method creates a Greeting object and returns it. The return value is broadcast to all subscribers to "/topic/greetings"
as specified in the @SendTo
annotation.
Refer This Example
I have edited the URL above to param1 and param2 can you tell me what is param1 and param2 will be,as i am using this url for android app. android natively does not support for STOMP client.
– Abhishek Chudekar
Mar 8 at 3:26
No doubt you have added param(s) but URL depends on what operation you want to perform. BTW by which URL you are going to start it?
– Patel Romil
Mar 8 at 4:39
lets consider i want to subscribe to /topic/greetings and want to send message to /app/hello, then what will be the url. Please help me
– Abhishek Chudekar
Mar 8 at 6:10
add a comment |
The @MessageMapping
annotation ensures that if a message is sent to destination "/hello"
, then the greeting()
method is called.
After the 1 second delay, the greeting()
method creates a Greeting object and returns it. The return value is broadcast to all subscribers to "/topic/greetings"
as specified in the @SendTo
annotation.
Refer This Example
I have edited the URL above to param1 and param2 can you tell me what is param1 and param2 will be,as i am using this url for android app. android natively does not support for STOMP client.
– Abhishek Chudekar
Mar 8 at 3:26
No doubt you have added param(s) but URL depends on what operation you want to perform. BTW by which URL you are going to start it?
– Patel Romil
Mar 8 at 4:39
lets consider i want to subscribe to /topic/greetings and want to send message to /app/hello, then what will be the url. Please help me
– Abhishek Chudekar
Mar 8 at 6:10
add a comment |
The @MessageMapping
annotation ensures that if a message is sent to destination "/hello"
, then the greeting()
method is called.
After the 1 second delay, the greeting()
method creates a Greeting object and returns it. The return value is broadcast to all subscribers to "/topic/greetings"
as specified in the @SendTo
annotation.
Refer This Example
The @MessageMapping
annotation ensures that if a message is sent to destination "/hello"
, then the greeting()
method is called.
After the 1 second delay, the greeting()
method creates a Greeting object and returns it. The return value is broadcast to all subscribers to "/topic/greetings"
as specified in the @SendTo
annotation.
Refer This Example
edited Mar 8 at 4:40
answered Mar 7 at 16:03
Patel RomilPatel Romil
569314
569314
I have edited the URL above to param1 and param2 can you tell me what is param1 and param2 will be,as i am using this url for android app. android natively does not support for STOMP client.
– Abhishek Chudekar
Mar 8 at 3:26
No doubt you have added param(s) but URL depends on what operation you want to perform. BTW by which URL you are going to start it?
– Patel Romil
Mar 8 at 4:39
lets consider i want to subscribe to /topic/greetings and want to send message to /app/hello, then what will be the url. Please help me
– Abhishek Chudekar
Mar 8 at 6:10
add a comment |
I have edited the URL above to param1 and param2 can you tell me what is param1 and param2 will be,as i am using this url for android app. android natively does not support for STOMP client.
– Abhishek Chudekar
Mar 8 at 3:26
No doubt you have added param(s) but URL depends on what operation you want to perform. BTW by which URL you are going to start it?
– Patel Romil
Mar 8 at 4:39
lets consider i want to subscribe to /topic/greetings and want to send message to /app/hello, then what will be the url. Please help me
– Abhishek Chudekar
Mar 8 at 6:10
I have edited the URL above to param1 and param2 can you tell me what is param1 and param2 will be,as i am using this url for android app. android natively does not support for STOMP client.
– Abhishek Chudekar
Mar 8 at 3:26
I have edited the URL above to param1 and param2 can you tell me what is param1 and param2 will be,as i am using this url for android app. android natively does not support for STOMP client.
– Abhishek Chudekar
Mar 8 at 3:26
No doubt you have added param(s) but URL depends on what operation you want to perform. BTW by which URL you are going to start it?
– Patel Romil
Mar 8 at 4:39
No doubt you have added param(s) but URL depends on what operation you want to perform. BTW by which URL you are going to start it?
– Patel Romil
Mar 8 at 4:39
lets consider i want to subscribe to /topic/greetings and want to send message to /app/hello, then what will be the url. Please help me
– Abhishek Chudekar
Mar 8 at 6:10
lets consider i want to subscribe to /topic/greetings and want to send message to /app/hello, then what will be the url. Please help me
– Abhishek Chudekar
Mar 8 at 6:10
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55046204%2fwhat-does-this-websocket-api-means%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
for -1 please let me know what is wrong so can elaborate more clearly
– Abhishek Chudekar
Mar 7 at 14:47
For simplecity you can consider localhost:9090/gs-guide-websocket/712/a50pfxbq/websocket as localhost:9090/user/getuser/712/username
– Patel Romil
Mar 7 at 16:06
It's unclear to me what you mean with
param1
andparam2
, where do you get that from? I see no references ofparam1
andparam2
within your code.– g00glen00b
Mar 8 at 23:02
@g00glen00b i changed the parameter as for param1 their was 210 and param2 was some hex code like 'rhy42ja1' so for simplicity i changed it to param1 and param2, as some people have downvoted for original url.
– Abhishek Chudekar
Mar 9 at 6:13