|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.atmosphere.samples.pubsub.spring.PubSubController
@Controller @RequestMapping(value="/") public class PubSubController
Example shows a simple Spring Controller that replicates the logic from AtmosphereHandlerPubSub.java URL to access is: http://localhost:8080/Atmosphere-pubsub-spring-tiles/pubsub/
| Constructor Summary | |
|---|---|
PubSubController()
|
|
| Method Summary | |
|---|---|
org.springframework.web.servlet.ModelAndView |
broadcastMessage(javax.servlet.http.HttpServletRequest request)
Takes a request to post data and broadcasts it to everyone else. |
String |
loadPage()
Handles the main page load |
org.springframework.web.servlet.ModelAndView |
subscribe(javax.servlet.http.HttpServletRequest request)
This method takes a request to subscribe to the topic |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PubSubController()
| Method Detail |
|---|
@RequestMapping(produces="text/html") public String loadPage()
request - response -
@RequestMapping(value="{topic}",
method=GET)
public org.springframework.web.servlet.ModelAndView subscribe(javax.servlet.http.HttpServletRequest request)
throws Exception
request -
Exception
@RequestMapping(value="{topic}",
method=POST)
public org.springframework.web.servlet.ModelAndView broadcastMessage(javax.servlet.http.HttpServletRequest request)
throws Exception
request -
Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||