0

I am getting Error of (The type AtmosphereResource is not generic; it cannot be parameterized with arguments ) during implementation of the following method in my spring 3 controller.

 @RequestMapping(value="/websockets", method=RequestMethod.GET)
     @ResponseBody
     public void websockets(final AtmosphereResource<HttpServletRequest,HttpServletResponse> event) {

          final HttpServletRequest  req = event.getRequest();
            final HttpServletResponse res = event.getResponse();
            event.suspend();

            final Broadcaster bc = event.getBroadcaster();
            bc.scheduleFixedBroadcast(new Callable<String>() {

                public String call() throws Exception {

                    return (new Date()).toString();
                }
            }, 11, TimeUnit.SECONDS);
     }
Milople Inc
  • 399
  • 1
  • 8
  • 34

1 Answers1

3

You probably figured the answer, but AtmosphereResource<?,?> no longer exists starting with 0.9 and higher version. Just remove that and it will works.

halfer
  • 19,824
  • 17
  • 99
  • 186
jfarcand
  • 1,705
  • 9
  • 6
  • BeanInstantiationException for AtmosphereResource. Please help! – masT Dec 17 '13 at 06:21
  • Jump to the Atmosphere mailing list...or try 2.1.0-RC1 and read https://github.com/Atmosphere/atmosphere/wiki/Configuring-Atmosphere's-Classes-Creation-and-Injection – jfarcand Dec 17 '13 at 21:45