/** * Creates a destination for the given <em>address</em>. * @param vertx the vert.x instance used by the STOMP server. * @param name the destination name. * @return the destination, <code>null</code> to reject the creation. */ public io.vertx.rxjava.ext.stomp.Destination create(io.vertx.rxjava.core.Vertx vertx, String name) { io.vertx.rxjava.ext.stomp.Destination ret = io.vertx.rxjava.ext.stomp.Destination.newInstance(delegate.create(vertx.getDelegate(), name)); return ret; }
/** * Creates a destination for the given <em>address</em>. * @param vertx the vert.x instance used by the STOMP server. * @param name the destination name. * @return the destination, <code>null</code> to reject the creation. */ public io.vertx.rxjava.ext.stomp.Destination create(io.vertx.rxjava.core.Vertx vertx, String name) { io.vertx.rxjava.ext.stomp.Destination ret = io.vertx.rxjava.ext.stomp.Destination.newInstance(delegate.create(vertx.getDelegate(), name)); return ret; }
public Destination getOrCreateDestination(String destination) { DestinationFactory destinationFactory; synchronized (this) { destinationFactory = this.factory; } synchronized (vertx) { Destination d = getDestination(destination); if (d == null) { d = destinationFactory.create(vertx, destination); if (d != null) { // We use the local map as a set, the value is irrelevant. destinations.put(d, ""); } } return d; } }