org.atmosphere.samples.stomp.pubsub
Class StompEndpointSample

java.lang.Object
  extended by org.atmosphere.samples.stomp.pubsub.StompEndpointSample

@StompEndpoint
public class StompEndpointSample
extends Object

An basic annotated service class that use stomp support.

Since:
2.2
Version:
1.0
Author:
Guillaume DROUET

Constructor Summary
StompEndpointSample()
           
 
Method Summary
 String destination1(String body)
           Broadcast message by returning a String.
 String destination2(String body)
           Broadcast message by returning a String.
 String destination3(String body)
           Broadcast message by returning a String.
 void onHeartbeat(org.atmosphere.cpr.AtmosphereResourceEvent event)
          The heartbeat listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StompEndpointSample

public StompEndpointSample()
Method Detail

onHeartbeat

public void onHeartbeat(org.atmosphere.cpr.AtmosphereResourceEvent event)
The heartbeat listener.

Parameters:
event - the event

destination1

@StompService(destination="/destination-1")
public String destination1(String body)
                    throws IOException

Broadcast message by returning a String.

Parameters:
body - the message body
Returns:
the message to send by the broadcaster associated to the path specified in frame headers
Throws:
IOException - if body can't be read

destination2

@StompService(destination="/destination-2")
public String destination2(String body)
                    throws IOException

Broadcast message by returning a String.

Parameters:
body - the message body
Returns:
the message to send by the broadcaster associated to the path specified in frame headers
Throws:
IOException - if body can't be read

destination3

@StompService(destination="/destination-3")
public String destination3(String body)
                    throws IOException

Broadcast message by returning a String.

Parameters:
body - the message body
Returns:
the message to send by the broadcaster associated to the path specified in frame headers
Throws:
IOException - if body can't be read


Copyright © 2014. All Rights Reserved.