public static io.vertx.ext.stomp.Destination bridge(io.vertx.ext.stomp.Destination j_receiver, io.vertx.core.Vertx vertx, java.util.Map<String, Object> options) { return io.vertx.core.impl.ConversionHelper.fromObject(io.vertx.ext.stomp.Destination.bridge(vertx, options != null ? new io.vertx.ext.stomp.BridgeOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null)); } }
private boolean checkMatches(boolean inbound, String address, Object body) { List<PermittedOptions> matches = inbound ? options.getInboundPermitteds() : options.getOutboundPermitteds(); for (PermittedOptions matchHolder : matches) { String matchAddress = matchHolder.getAddress(); String matchRegex; if (matchAddress == null) { matchRegex = matchHolder.getAddressRegex(); } else { matchRegex = null; } boolean addressOK; if (matchAddress == null) { addressOK = matchRegex == null || regexMatches(matchRegex, address); } else { addressOK = matchAddress.equals(address); } if (addressOK) { return structureMatches(matchHolder.getMatch(), body); } } return false; }
return; if (options.isPointToPoint()) { Optional<Subscription> chosen = subscriptions.stream().filter(s -> s.destination.equals(address)).findAny(); if (chosen.isPresent()) {
private void send(String address, Frame frame, Handler<AsyncResult<Message<Object>>> replyHandler) { if (options.isPointToPoint()) { vertx.eventBus().send(address, frame.getBody(), new DeliveryOptions().setHeaders(toMultimap(frame.getHeaders())), replyHandler); } else { // the reply handler is ignored in non point to point interaction. vertx.eventBus().publish(address, frame.getBody(), new DeliveryOptions().setHeaders(toMultimap(frame.getHeaders()))); } }
public static io.vertx.ext.stomp.StompServerHandler bridge(io.vertx.ext.stomp.StompServerHandler j_receiver, java.util.Map<String, Object> options) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.bridge(options != null ? new io.vertx.ext.stomp.BridgeOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null)); return j_receiver; } }