@Override public URI getURI() { return details.endpoint.getURI(); }
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 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; } }
final String uri = details.endpoint.getURI().getValue();
/** * 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); } }
/** * Asynchronous publish deregister send. * * @param details Message details structure. * @param op The operation. * @param listener Response callback interface. * @return The sent MAL message. * @throws MALInteractionException if there is a problem during the interaction. * @throws MALException on error. */ public MALMessage publishDeregisterAsync(final MessageDetails details, final MALPubSubOperation op, final MALPublishInteractionListener listener) throws MALInteractionException, MALException { ipsmap.getPublishListenerAndRemove(details.endpoint.getURI(), details); final Long transId = icmap.createTransaction(false, listener); return initiateAsynchronousInteraction(details, createMessage(details, op, transId, MALPubSubOperation.PUBLISH_DEREGISTER_STAGE, (Object[]) null)); }
@Override protected void thisObjectClose() throws MALException { super.thisObjectClose(); this.receiveHandler.deregisterProviderEndpoint(endpoint.getURI().getValue(), service); endpoint.stopMessageDelivery(); endpoint.close(); } }
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.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);
final MALTransport transport = TransportSingleton.instance(endPoint.getURI(), impl.getInitialProperties()); retVal = transport.createBroker(endPoint, authenticationId,