@Override public void leaveEventBus(final ServiceQueue serviceQueue) { if (serviceQueue == null) { throw new IllegalStateException(String.format("EventManager %s:: Must be called from inside of a Service", name)); } stopListening(serviceQueue.service()); services.remove(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); }
public ServiceEndpointServer addServiceQueue(final String address, final ServiceQueue serviceQueue) { serviceBundle().addServiceQueue(address, serviceQueue); httpRequestServerHandler.addRestSupportFor(serviceQueue.service().getClass(), serviceBundle().address()); return this; }
public ServiceEndpointServer buildServiceServer() { final EndpointServerBuilder endpointServerBuilder = getEndpointServerBuilder(); if (serviceDiscovery != null) { if (localServiceId == null || "".equals(localServiceId.trim())) { localServiceId = serviceName + "-" + ServiceDiscovery.uniqueString(endpointServerBuilder.getPort()); } serviceDiscovery.registerWithIdAndTimeToLive(this.getServiceName(), localServiceId, endpointServerBuilder.getHost(), endpointServerBuilder.getPort(), timeToLiveCheckInterval); } final ServiceQueue serviceQueue = getServiceQueue(); final ServiceEndpointServer serviceEndpointServer = endpointServerBuilder.build(); serviceEndpointServer.addServiceObject(this.getServiceName(), serviceQueue.service()); return serviceEndpointServer; }
@Override public void leaveEventBus(final ServiceQueue serviceQueue) { if (serviceQueue == null) { throw new IllegalStateException(String.format("EventManager %s:: Must be called from inside of a Service", name)); } stopListening(serviceQueue.service()); services.remove(serviceQueue); }
@Override public void leaveEventBus(final ServiceQueue serviceQueue) { if (serviceQueue == null) { throw new IllegalStateException(String.format("EventManager %s:: Must be called from inside of a Service", name)); } stopListening(serviceQueue.service()); services.remove(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); }
@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); }
public ServiceEndpointServer addServiceQueue(final String address, final ServiceQueue serviceQueue) { serviceBundle().addServiceQueue(address, serviceQueue); httpRequestServerHandler.addRestSupportFor(serviceQueue.service().getClass(), serviceBundle().address()); return this; }
public ServiceEndpointServer addServiceQueue(final String address, final ServiceQueue serviceQueue) { serviceBundle().addServiceQueue(address, serviceQueue); httpRequestServerHandler.addRestSupportFor(serviceQueue.service().getClass(), serviceBundle().address()); return this; }