Represents a STOMP destination. Depending on the implementation, the message delivery is different. Queue are sending message to only one subscribers, while topics are broadcasting the message to all subscribers.
Implementations must be thread-safe.Constructor and description |
---|
Destination
(java.lang.Object delegate) |
Type | Name and description |
---|---|
boolean |
ack(StompServerConnection connection, java.util.Map<java.lang.String, java.lang.Object> frame) Handles a ACK frame. |
static Destination |
bridge(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> options) |
java.lang.String |
destination()
|
Destination |
dispatch(StompServerConnection connection, java.util.Map<java.lang.String, java.lang.Object> frame) Dispatches the given frame. |
java.lang.Object |
getDelegate() |
java.util.List<java.lang.String> |
getSubscriptions(StompServerConnection connection) Gets all subscription ids for the given destination hold by the given client |
boolean |
matches(java.lang.String address) Checks whether or not the given address matches with the current destination. |
boolean |
nack(StompServerConnection connection, java.util.Map<java.lang.String, java.lang.Object> frame) Handles a NACK frame. |
int |
numberOfSubscriptions() Gets the number of subscriptions attached to the current Destination. |
static Destination |
queue(Vertx vertx, java.lang.String destination) |
Destination |
subscribe(StompServerConnection connection, java.util.Map<java.lang.String, java.lang.Object> frame) Handles a subscription request to the current Destination. |
static Destination |
topic(Vertx vertx, java.lang.String destination) |
boolean |
unsubscribe(StompServerConnection connection, java.util.Map<java.lang.String, java.lang.Object> frame) Handles a un-subscription request to the current Destination. |
Destination |
unsubscribeConnection(StompServerConnection connection) Removes all subscriptions of the given connection |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Handles a ACK
frame.
true
if the destination has handled the frame (meaning it has sent the message with id)connection
- the connectionframe
- the ACK
frame (see Frame)
Dispatches the given frame.
connection
- the connectionframe
- the frame (see Frame)Gets all subscription ids for the given destination hold by the given client
connection
- the connection (client)Checks whether or not the given address matches with the current destination.
true
if it matches, false
otherwise.address
- the address Handles a NACK
frame.
true
if the destination has handled the frame (meaning it has sent the message with id)connection
- the connectionframe
- the NACK
frame (see Frame)Gets the number of subscriptions attached to the current Destination.
Handles a subscription request to the current Destination.
connection
- the connectionframe
- the SUBSCRIBE
frame (see Frame)Handles a un-subscription request to the current Destination.
true
if the un-subscription has been handled, false
otherwise.connection
- the connectionframe
- the UNSUBSCRIBE
frame (see Frame)Removes all subscriptions of the given connection
connection
- the connection