public MALBrokerBinding createBroker(MALEndpoint endpoint, Blob authenticationId, QoSLevel[] qosLevels, UInteger priorities, Map properties) throws MALException { // not support by transport return new JMSBrokerBinding(new URI(uriBase + endpoint.getLocalName()), endpoint.getLocalName(), authenticationId, qosLevels, priorities); }
@Override protected void thisObjectClose() throws MALException { super.thisObjectClose(); this.receiveHandler.deregisterProviderEndpoint(endpoint.getURI().getValue(), service); endpoint.stopMessageDelivery(); endpoint.close(); } }
private static MALMessage createMessage(final MessageDetails details, final MALOperation op, final Long transactionId, final UOctet interactionStage, final Object... body) throws MALException { URI to = details.brokerUri; if (op.getInteractionType() != InteractionType.PUBSUB) { to = details.uriTo; } return details.endpoint.createMessage(details.authenticationId, to, new Time(new Date().getTime()), details.qosLevel, details.priority, details.domain, details.networkZone, details.sessionType, details.sessionName, transactionId, Boolean.FALSE, op, interactionStage, details.qosProps, body); }
@Override protected void thisObjectClose() throws MALException { super.thisObjectClose(); details.endpoint.stopMessageDelivery(); details.endpoint.close(); } }
private void initiateMultiOnewayInteraction(final MALEndpoint ep, final List<MALMessage> msgs) throws MALInteractionException, MALException { try { for (int i = 0; i < msgs.size(); i++) { MALMessage msg = msgs.get(i); msg = securityManager.check(msg); msgs.set(i, msg); } ep.sendMessages(msgs.toArray(new MALMessage[msgs.size()])); } catch (IllegalArgumentException ex) { throw new MALException("ERROR: Error with one way send : IllegalArgumentException : ", ex); } catch (MALException ex) { MALContextFactoryImpl.LOGGER.log(Level.WARNING, "Error with multi one way send : {0}", ep.getURI()); throw ex; } }
this.localUri = this.endpoint.getURI(); this.msgAddress = new Address(endpoint, endpoint.getURI(), authenticationId, handler); this.receiveHandler.registerProviderEndpoint(endpoint.getURI().getValue(), service, this.msgAddress); this.endpoint.setMessageListener(this.receiveHandler); this.endpoint.startMessageDelivery(); this.receiveHandler = impl.getReceivingInterface(); this.handler = handler; this.localName = endPoint.getLocalName(); this.service = service; this.authenticationId = authenticationId; this.transport = TransportSingleton.instance(endpoint.getURI(), impl.getInitialProperties()); this.localUri = this.endpoint.getURI(); this.msgAddress = new Address(endpoint, endpoint.getURI(), authenticationId, handler); this.receiveHandler.registerProviderEndpoint(endpoint.getURI().getValue(), service, this.msgAddress); this.endpoint.setMessageListener(this.receiveHandler);
msg = msgAddress.endpoint.createMessage(msgAddress.authenticationId, srcHdr.getURIFrom(), new Time(new Date().getTime()), rspn); msgAddress.endpoint.sendMessage(msg);
this.endpoint.startMessageDelivery(); final MALMessage msg = endpoint.createMessage(authenticationId, subscriber, new Time(new Date().getTime()), endpoint.sendMessage(msg); final MALMessage msg = endpoint.createMessage(authenticationId, subscriber, new Time(new Date().getTime()), endpoint.sendMessage(msg); final MALMessage msg = endpoint.createMessage(authenticationId, subscriber, new Time(new Date().getTime()), endpoint.sendMessage(msg); final MALMessage msg = endpoint.createMessage(authenticationId, subscriber, new Time(new Date().getTime()), endpoint.sendMessage(msg); final MALMessage msg = endpoint.createMessage(authenticationId, publisher, new Time(new Date().getTime()),
ep.setMessageListener(impl.getReceivingInterface()); ep.getURI(), uriTo, brokerUri, priority); ep.startMessageDelivery(); endPoint.setMessageListener(impl.getReceivingInterface()); endPoint.getURI(), uriTo, brokerUri,
@Override public URI getURI() { return details.endpoint.getURI(); }
private MALMessage initiateAsynchronousInteraction(final MessageDetails details, MALMessage msg) throws MALInteractionException, MALException { try { msg = securityManager.check(msg); details.endpoint.sendMessage(msg); } catch (IllegalArgumentException ex) { throw new MALException("IllegalArgumentException", ex); } catch (MALException ex) { MALContextFactoryImpl.LOGGER.log(Level.WARNING, "Error with consumer : {0}", msg.getHeader().getURITo()); throw ex; } return msg; }
msg = msgAddress.endpoint.createMessage(msgAddress.authenticationId, srcHdr.getURIFrom(), new Time(new Date().getTime()), rspn); msgAddress.endpoint.sendMessage(msg);
private Address lookupAddress(final MALEndpoint callingEndpoint, final MALMessage msg) { final EndPointPair key = new EndPointPair(callingEndpoint.getURI().getValue(), msg); Address addr = providerEndpointMap.get(key); if (null == addr) { MALContextFactoryImpl.LOGGER.log(Level.WARNING, "lookupAddress failed to find local endpoint for {0}", new Object[] { key }); } return addr; }
private MALMessage initiateOnewayInteraction(final MessageDetails details, MALMessage msg) throws MALInteractionException, MALException { try { msg = securityManager.check(msg); details.endpoint.sendMessage(msg); } catch (IllegalArgumentException ex) { throw new MALException("ERROR: Error with one way send : IllegalArgumentException : ", ex); } catch (MALException ex) { MALContextFactoryImpl.LOGGER.log(Level.WARNING, "Error with one way send : {0}", msg.getHeader().getURITo()); throw ex; } return msg; }
msg = msgAddress.endpoint.createMessage(msgAddress.authenticationId, srcHdr.getURIFrom(), new Time(new Date().getTime()), error.getErrorNumber(), error.getExtraInformation()); msgAddress.endpoint.sendMessage(msg);
final String uri = details.endpoint.getURI().getValue();
details.endpoint.sendMessage(msg);
private static MALMessage createMessage(final MessageDetails details, final MALOperation op, final Long transactionId, final UOctet interactionStage, final MALEncodedBody body) throws MALException { URI to = details.brokerUri; if (op.getInteractionType() != InteractionType.PUBSUB) { to = details.uriTo; } return details.endpoint.createMessage(details.authenticationId, to, new Time(new Date().getTime()), details.qosLevel, details.priority, details.domain, details.networkZone, details.sessionType, details.sessionName, transactionId, Boolean.FALSE, op, interactionStage, details.qosProps, body); } }
/** * Synchronous publish deregister send. * * @param details Message details structure. * @param op The operation. * @throws MALInteractionException if there is a problem during the interaction. * @throws MALException on error. */ public void publishDeregister(final MessageDetails details, final MALPubSubOperation op) throws MALInteractionException, MALException { initiateSynchronousInteraction(details, op, MALPubSubOperation.PUBLISH_DEREGISTER_STAGE, (MALPublishInteractionListener) null, (Object[]) null); ipsmap.getPublishListenerAndRemove(details.endpoint.getURI(), details); }
void registerNotifyListener(final MessageDetails details, final Subscription subscription, final MALInteractionListener list) { final String uri = details.endpoint.getURI().getValue(); final String subId = subscription.getSubscriptionId().getValue(); final StringPair id = new StringPair(uri, subId); synchronized (notifyMap) { notifyMap.put(id, list); Map<String, MALInteractionListener> ent = errorMap.get(uri); if (null == ent) { ent = new HashMap<String, MALInteractionListener>(); errorMap.put(uri, ent); } MALContextFactoryImpl.LOGGER.log(Level.FINE, "PubSubMap({0}), adding notify handler: {1} : {2} : {3}", new Object[] { this, uri, subId, list }); ent.put(subId, list); } }