/** * Handles a <code>ACK</code> frame. * @param connection the connection * @param frame the <code>ACK</code> frame * @return <code>true</code> if the destination has handled the frame (meaning it has sent the message with id) */ public boolean ack(io.vertx.rxjava.ext.stomp.StompServerConnection connection, Frame frame) { boolean ret = delegate.ack(connection.getDelegate(), frame); return ret; }
/** * Configures the STOMP server to act as a bridge with the Vert.x event bus. * * @param options the configuration options * @return the current {@link StompServerHandler}. * @see Vertx#eventBus() */ @Override public synchronized StompServerHandler bridge(BridgeOptions options) { destinations.put(Destination.bridge(vertx, options), ""); return this; }
/** * Dispatches the given frame. * @param connection the connection * @param frame the frame * @return the current instance of {@link io.vertx.rxjava.ext.stomp.Destination} */ public io.vertx.rxjava.ext.stomp.Destination dispatch(io.vertx.rxjava.ext.stomp.StompServerConnection connection, Frame frame) { delegate.dispatch(connection.getDelegate(), frame); return this; }
private void replayChunk(StompServerConnection connection, List<Frame> frames) { final List<Destination> destinations = connection.handler().getDestinations(); for (Frame frame : frames) { switch (frame.getCommand()) { case SEND: // We are sure that the destination is set, as the check is made before enqueuing the frame. String destination = frame.getHeader(Frame.DESTINATION); Destination dest = connection.handler().getDestination(destination); if (dest != null) { dest.dispatch(connection, frame); } break; case ACK: for (Destination d : destinations) { if (d.ack(connection, frame)) { break; } } break; case NACK: for (Destination d : destinations) { if (d.nack(connection, frame)) { break; } } break; } } } }
/** * Handles a un-subscription request to the current {@link io.vertx.rxjava.ext.stomp.Destination}. * @param connection the connection * @param frame the <code>UNSUBSCRIBE</code> frame * @return <code>true</code> if the un-subscription has been handled, <code>false</code> otherwise. */ public boolean unsubscribe(io.vertx.rxjava.ext.stomp.StompServerConnection connection, Frame frame) { boolean ret = delegate.unsubscribe(connection.getDelegate(), frame); return ret; }
/** * Handles a <code>NACK</code> frame. * @param connection the connection * @param frame the <code>NACK</code> frame * @return <code>true</code> if the destination has handled the frame (meaning it has sent the message with id) */ public boolean nack(io.vertx.rxjava.ext.stomp.StompServerConnection connection, Frame frame) { boolean ret = delegate.nack(connection.getDelegate(), frame); return ret; }
List<String> ids = dest.getSubscriptions(connection); count += ids.size(); if (ids.contains(id)) { if (dest.subscribe(connection, frame) == null) {
/** * Handles a subscription request to the current {@link io.vertx.rxjava.ext.stomp.Destination}. * @param connection the connection * @param frame the <code>SUBSCRIBE</code> frame * @return the current instance of {@link io.vertx.rxjava.ext.stomp.Destination} */ public io.vertx.rxjava.ext.stomp.Destination subscribe(io.vertx.rxjava.ext.stomp.StompServerConnection connection, Frame frame) { delegate.subscribe(connection.getDelegate(), frame); return this; }
/** * Removes all subscriptions of the given connection * @param connection the connection * @return the current instance of {@link io.vertx.rxjava.ext.stomp.Destination} */ public io.vertx.rxjava.ext.stomp.Destination unsubscribeConnection(io.vertx.rxjava.ext.stomp.StompServerConnection connection) { delegate.unsubscribeConnection(connection.getDelegate()); return this; }
/** * Checks whether or not the given address matches with the current destination. * @param address the address * @return <code>true</code> if it matches, <code>false</code> otherwise. */ public boolean matches(String address) { boolean ret = delegate.matches(address); return ret; }
/** * Gets all subscription ids for the given destination hold by the given client * @param connection the connection (client) * @return the list of subscription id, empty if none */ public List<String> getSubscriptions(io.vertx.rxjava.ext.stomp.StompServerConnection connection) { List<String> ret = delegate.getSubscriptions(connection.getDelegate()); return ret; }
/** * Handles a un-subscription request to the current {@link io.vertx.rxjava.ext.stomp.Destination}. * @param connection the connection * @param frame the <code>UNSUBSCRIBE</code> frame * @return <code>true</code> if the un-subscription has been handled, <code>false</code> otherwise. */ public boolean unsubscribe(io.vertx.rxjava.ext.stomp.StompServerConnection connection, Frame frame) { boolean ret = delegate.unsubscribe(connection.getDelegate(), frame); return ret; }
/** * Handles a <code>NACK</code> frame. * @param connection the connection * @param frame the <code>NACK</code> frame * @return <code>true</code> if the destination has handled the frame (meaning it has sent the message with id) */ public boolean nack(io.vertx.rxjava.ext.stomp.StompServerConnection connection, Frame frame) { boolean ret = delegate.nack(connection.getDelegate(), frame); return ret; }
/** * Handles a subscription request to the current {@link io.vertx.rxjava.ext.stomp.Destination}. * @param connection the connection * @param frame the <code>SUBSCRIBE</code> frame * @return the current instance of {@link io.vertx.rxjava.ext.stomp.Destination} */ public io.vertx.rxjava.ext.stomp.Destination subscribe(io.vertx.rxjava.ext.stomp.StompServerConnection connection, Frame frame) { delegate.subscribe(connection.getDelegate(), frame); return this; }
/** * Removes all subscriptions of the given connection * @param connection the connection * @return the current instance of {@link io.vertx.rxjava.ext.stomp.Destination} */ public io.vertx.rxjava.ext.stomp.Destination unsubscribeConnection(io.vertx.rxjava.ext.stomp.StompServerConnection connection) { delegate.unsubscribeConnection(connection.getDelegate()); return this; }
/** * Checks whether or not the given address matches with the current destination. * @param address the address * @return <code>true</code> if it matches, <code>false</code> otherwise. */ public boolean matches(String address) { boolean ret = delegate.matches(address); return ret; }
/** * Gets all subscription ids for the given destination hold by the given client * @param connection the connection (client) * @return the list of subscription id, empty if none */ public List<String> getSubscriptions(io.vertx.rxjava.ext.stomp.StompServerConnection connection) { List<String> ret = delegate.getSubscriptions(connection.getDelegate()); return ret; }
public static boolean unsubscribe(io.vertx.ext.stomp.Destination j_receiver, io.vertx.ext.stomp.StompServerConnection connection, java.util.Map<String, Object> frame) { return j_receiver.unsubscribe(connection, frame != null ? new io.vertx.ext.stomp.Frame(io.vertx.core.impl.ConversionHelper.toJsonObject(frame)) : null); } public static boolean ack(io.vertx.ext.stomp.Destination j_receiver, io.vertx.ext.stomp.StompServerConnection connection, java.util.Map<String, Object> frame) {
/** * Handles a <code>ACK</code> frame. * @param connection the connection * @param frame the <code>ACK</code> frame * @return <code>true</code> if the destination has handled the frame (meaning it has sent the message with id) */ public boolean ack(io.vertx.rxjava.ext.stomp.StompServerConnection connection, Frame frame) { boolean ret = delegate.ack(connection.getDelegate(), frame); return ret; }
/** * Dispatches the given frame. * @param connection the connection * @param frame the frame * @return the current instance of {@link io.vertx.rxjava.ext.stomp.Destination} */ public io.vertx.rxjava.ext.stomp.Destination dispatch(io.vertx.rxjava.ext.stomp.StompServerConnection connection, Frame frame) { delegate.dispatch(connection.getDelegate(), frame); return this; }