if( val1 == null || val1.getClass().isArray() ) o.setOutcomes( (Symbol[]) val1 ); o.setOutcomes( (Symbol) val1 );
if( val1 == null || val1.getClass().isArray() ) o.setOutcomes( (Symbol[]) val1 ); o.setOutcomes( (Symbol) val1 );
if( val1 == null || val1.getClass().isArray() ) o.setOutcomes( (Symbol[]) val1 ); o.setOutcomes( (Symbol) val1 );
if( val1 == null || val1.getClass().isArray() ) o.setOutcomes( (Symbol[]) val1 ); o.setOutcomes( (Symbol) val1 );
protected void configureSource(Source source) { Map<Symbol, DescribedType> filters = new HashMap<>(); Symbol[] outcomes = new Symbol[] {Accepted.DESCRIPTOR_SYMBOL, Rejected.DESCRIPTOR_SYMBOL, Released.DESCRIPTOR_SYMBOL, Modified.DESCRIPTOR_SYMBOL}; if (getSubscriptionName() != null && !getSubscriptionName().isEmpty()) { source.setExpiryPolicy(TerminusExpiryPolicy.NEVER); source.setDurable(TerminusDurability.UNSETTLED_STATE); source.setDistributionMode(COPY); } else { source.setDurable(TerminusDurability.NONE); source.setExpiryPolicy(TerminusExpiryPolicy.LINK_DETACH); } source.setOutcomes(outcomes); Modified modified = new Modified(); modified.setDeliveryFailed(true); modified.setUndeliverableHere(false); source.setDefaultOutcome(modified); if (isNoLocal()) { filters.put(NO_LOCAL_NAME, AmqpNoLocalFilter.NO_LOCAL); } if (getSelector() != null && !getSelector().trim().equals("")) { filters.put(JMS_SELECTOR_NAME, new AmqpJmsSelectorFilter(getSelector())); } if (!filters.isEmpty()) { source.setFilter(filters); } }
source.setOutcomes(outcomes); source.setDefaultOutcome(MODIFIED_FAILED);
source.setOutcomes(outcomes); source.setDefaultOutcome(MODIFIED_FAILED);
Source source = new Source(); source.setAddress(senderName); source.setOutcomes(outcomes);
@Override public ProtonReceiver createReceiver(String address, ProtonLinkOptions receiverOptions) { Receiver receiver = session.receiver(getOrCreateLinkName(receiverOptions)); Symbol[] outcomes = new Symbol[] { Accepted.DESCRIPTOR_SYMBOL, Rejected.DESCRIPTOR_SYMBOL, Released.DESCRIPTOR_SYMBOL, Modified.DESCRIPTOR_SYMBOL }; Source source = new Source(); source.setAddress(address); source.setOutcomes(outcomes); source.setDefaultOutcome(Released.getInstance()); if(receiverOptions.isDynamic()) { source.setDynamic(true); } Target target = new Target(); receiver.setSource(source); receiver.setTarget(target); ProtonReceiverImpl r = new ProtonReceiverImpl(receiver); r.openHandler((result) -> { LOG.trace("Receiver open completed"); }); r.closeHandler((result) -> { if (result.succeeded()) { LOG.trace("Receiver closed"); } else { LOG.warn("Receiver closed with error", result.cause()); } }); // Default to at-least-once r.setQoS(ProtonQoS.AT_LEAST_ONCE); return r; }
Released.DESCRIPTOR_SYMBOL, Modified.DESCRIPTOR_SYMBOL }; Source source = new Source(); source.setOutcomes(outcomes);
@Override protected Sender createEndpoint(JmsSessionInfo resourceInfo) { Coordinator coordinator = new Coordinator(); coordinator.setCapabilities(TxnCapability.LOCAL_TXN); Symbol[] outcomes = new Symbol[]{ Accepted.DESCRIPTOR_SYMBOL, Rejected.DESCRIPTOR_SYMBOL, Released.DESCRIPTOR_SYMBOL, Modified.DESCRIPTOR_SYMBOL }; Source source = new Source(); source.setOutcomes(outcomes); String coordinatorName = "qpid-jms:coordinator:" + resourceInfo.getId().toString(); Sender sender = getParent().getSession().getEndpoint().sender(coordinatorName); sender.setSource(source); sender.setTarget(coordinator); sender.setSenderSettleMode(SenderSettleMode.UNSETTLED); sender.setReceiverSettleMode(ReceiverSettleMode.FIRST); return sender; }
@Override protected Sender createEndpoint(JmsSessionInfo resourceInfo) { Coordinator coordinator = new Coordinator(); coordinator.setCapabilities(TxnCapability.LOCAL_TXN); Symbol[] outcomes = new Symbol[]{ Accepted.DESCRIPTOR_SYMBOL, Rejected.DESCRIPTOR_SYMBOL, Released.DESCRIPTOR_SYMBOL, Modified.DESCRIPTOR_SYMBOL }; Source source = new Source(); source.setOutcomes(outcomes); String coordinatorName = "qpid-jms:coordinator:" + resourceInfo.getId().toString(); Sender sender = getParent().getSession().getEndpoint().sender(coordinatorName); sender.setSource(source); sender.setTarget(coordinator); sender.setSenderSettleMode(SenderSettleMode.UNSETTLED); sender.setReceiverSettleMode(ReceiverSettleMode.FIRST); return sender; }
Source source = new Source(); source.setAddress(senderId); source.setOutcomes(outcomes);
Source source = new Source(); source.setAddress(sourceAddress); source.setOutcomes(outcomes);
Source source = new Source(); source.setAddress(sourceAddress); source.setOutcomes(outcomes);