/** * Returns an id for the connection target. Connections may be cached and reused if their source and target ids match. * * @return the id */ public String getTargetId() { return getUri().toString() + "_target_" + this.getClass().getName() + "#"+ getTopic(); }
public void attach(ChannelSource source, PhysicalConnectionTarget target, ChannelConnection connection) throws Fabric3Exception { connection.setCloseable(() -> { // no-op }); if (target.isDirectConnection()) { // no event stream to attach since this is a direct connection return; } URI uri = source.getUri(); Channel channel = getChannel(uri, source.getChannelSide()); URI targetUri = target.getUri(); channel.subscribe(targetUri, connection); }
public void attach(ChannelSource source, PhysicalConnectionTarget target, ChannelConnection connection) throws Fabric3Exception { connection.setCloseable(() -> { // no-op }); if (target.isDirectConnection()) { // no event stream to attach since this is a direct connection return; } URI uri = source.getUri(); Channel channel = getChannel(uri, source.getChannelSide()); URI targetUri = target.getUri(); channel.subscribe(targetUri, connection); }
public void detach(ChannelSource source, PhysicalConnectionTarget target) throws Fabric3Exception { if (target.isDirectConnection()) { // no event stream to attach since this is a direct connection return; } URI uri = source.getUri(); Channel channel = getChannel(uri, source.getChannelSide()); URI targetUri = target.getUri(); channel.unsubscribe(targetUri, target.getTopic()); }
public void detach(ChannelSource source, PhysicalConnectionTarget target) throws Fabric3Exception { if (target.isDirectConnection()) { // no event stream to attach since this is a direct connection return; } URI uri = source.getUri(); Channel channel = getChannel(uri, source.getChannelSide()); URI targetUri = target.getUri(); channel.unsubscribe(targetUri, target.getTopic()); }