@Override public void joinService(final ServiceQueue serviceQueue) { if (services.contains(serviceQueue)) { logger.info("EventManager{}::joinService: Service queue " + "is already a member of this event manager {}", name, serviceQueue.name()); return; } services.add(serviceQueue); logger.info("EventManager{}::joinService:: {} joined {}", name, serviceQueue.name(), name); doListen(serviceQueue.service(), serviceQueue); }
private void extractListenerForService(final ServiceQueue serviceQueue, final String channel, final boolean consume) { logger.info("EventManager {}:: {} is listening on channel {} and is consuming? {}", name, serviceQueue.name(), channel, consume); if (consume) { this.consume(channel, serviceQueue); } else { this.subscribe(channel, serviceQueue); } }
public void addServiceService(final String objectName, final String serviceAddress, final ServiceQueue serviceQueue) { /** add to our list of servicesToStop. */ servicesToStop.add(serviceQueue); servicesToFlush.add(serviceQueue); QueueDispatch dispatch = new QueueDispatch(serviceQueue); /** Add the client given the address if we have an address. */ if (serviceAddress != null && !serviceAddress.isEmpty()) { serviceMapping.put(serviceAddress, dispatch); } if (objectName != null) { /** Put the client incoming requests in our client name, request queue mapping. */ serviceMapping.put(objectName, dispatch); } serviceMapping.put(serviceQueue.name().toLowerCase(), dispatch); serviceMapping.put(serviceQueue.name(), dispatch); serviceMapping.put(serviceQueue.address(), dispatch); serviceMapping.put(serviceQueue.address().toLowerCase(), dispatch); /** Add the request queue to our set of request queues. */ sendQueues.add(dispatch.requests); /** Generate a list of end point addresses based on the client bundle root address. */ final Collection<String> addresses = serviceQueue.addresses(this.rootAddress); if (debug) { logger.debug(ServiceBundleImpl.class.getName() + " addresses: " + addresses); } /** Add mappings to all addresses for this client to our serviceMapping. */ for (String addr : addresses) { serviceMapping.put(addr, dispatch); } }
@Override public void joinService(final ServiceQueue serviceQueue) { if (services.contains(serviceQueue)) { logger.info("EventManager{}::joinService: Service queue " + "is already a member of this event manager {}", name, serviceQueue.name()); return; } services.add(serviceQueue); logger.info("EventManager{}::joinService:: {} joined {}", name, serviceQueue.name(), name); doListen(serviceQueue.service(), serviceQueue); }
@Override public void joinService(final ServiceQueue serviceQueue) { if (services.contains(serviceQueue)) { logger.info("EventManager{}::joinService: Service queue " + "is already a member of this event manager {}", name, serviceQueue.name()); return; } services.add(serviceQueue); logger.info("EventManager{}::joinService:: {} joined {}", name, serviceQueue.name(), name); doListen(serviceQueue.service(), serviceQueue); }
private void extractListenerForService(final ServiceQueue serviceQueue, final String channel, final boolean consume) { logger.info("EventManager {}:: {} is listening on channel {} and is consuming? {}", name, serviceQueue.name(), channel, consume); if (consume) { this.consume(channel, serviceQueue); } else { this.subscribe(channel, serviceQueue); } }
private void extractListenerForService(final ServiceQueue serviceQueue, final String channel, final boolean consume) { logger.info("EventManager {}:: {} is listening on channel {} and is consuming? {}", name, serviceQueue.name(), channel, consume); if (consume) { this.consume(channel, serviceQueue); } else { this.subscribe(channel, serviceQueue); } }
public void addServiceService(final String objectName, final String serviceAddress, final ServiceQueue serviceQueue) { /** add to our list of servicesToStop. */ servicesToStop.add(serviceQueue); servicesToFlush.add(serviceQueue); QueueDispatch dispatch = new QueueDispatch(serviceQueue); /** Add the client given the address if we have an address. */ if (serviceAddress != null && !serviceAddress.isEmpty()) { serviceMapping.put(serviceAddress, dispatch); } if (objectName != null) { /** Put the client incoming requests in our client name, request queue mapping. */ serviceMapping.put(objectName, dispatch); } serviceMapping.put(serviceQueue.name().toLowerCase(), dispatch); serviceMapping.put(serviceQueue.name(), dispatch); serviceMapping.put(serviceQueue.address(), dispatch); serviceMapping.put(serviceQueue.address().toLowerCase(), dispatch); /** Add the request queue to our set of request queues. */ sendQueues.add(dispatch.requests); /** Generate a list of end point addresses based on the client bundle root address. */ final Collection<String> addresses = serviceQueue.addresses(this.rootAddress); if (debug) { logger.debug(ServiceBundleImpl.class.getName() + " addresses: " + addresses); } /** Add mappings to all addresses for this client to our serviceMapping. */ for (String addr : addresses) { serviceMapping.put(addr, dispatch); } }
public void addServiceService(final String objectName, final String serviceAddress, final ServiceQueue serviceQueue) { /** add to our list of servicesToStop. */ servicesToStop.add(serviceQueue); servicesToFlush.add(serviceQueue); QueueDispatch dispatch = new QueueDispatch(serviceQueue); /** Add the client given the address if we have an address. */ if (serviceAddress != null && !serviceAddress.isEmpty()) { serviceMapping.put(serviceAddress, dispatch); } if (objectName != null) { /** Put the client incoming requests in our client name, request queue mapping. */ serviceMapping.put(objectName, dispatch); } serviceMapping.put(serviceQueue.name().toLowerCase(), dispatch); serviceMapping.put(serviceQueue.name(), dispatch); serviceMapping.put(serviceQueue.address(), dispatch); serviceMapping.put(serviceQueue.address().toLowerCase(), dispatch); /** Add the request queue to our set of request queues. */ sendQueues.add(dispatch.requests); /** Generate a list of end point addresses based on the client bundle root address. */ final Collection<String> addresses = serviceQueue.addresses(this.rootAddress); if (debug) { logger.debug(ServiceBundleImpl.class.getName() + " addresses: " + addresses); } /** Add mappings to all addresses for this client to our serviceMapping. */ for (String addr : addresses) { serviceMapping.put(addr, dispatch); } }