public ServiceEndpointServer addServiceQueue(final String address, final ServiceQueue serviceQueue) { serviceBundle().addServiceQueue(address, serviceQueue); httpRequestServerHandler.addRestSupportFor(serviceQueue.service().getClass(), serviceBundle().address()); return this; }
@Test public void testWithService() { final ServiceQueue serviceQueue = serviceBuilder().setServiceObject(new MockService()).buildAndStart(); serviceBundle.addServiceQueue("mockService", serviceQueue); proxy = serviceBundle.createLocalProxy(MockServiceInterface.class, "mockService"); serviceBundle.startReturnHandlerProcessor(); proxy.method1(); proxy.clientProxyFlush(); Sys.sleep(1000); ok = callCount == 1 || die(); }
@Before public void setup() { method = new AtomicReference<>(); event = new AtomicReference<>(); eventManager = EventManagerBuilder.eventManagerBuilder().build("localtest"); eventServiceQueue = ServiceBuilder.serviceBuilder().setServiceObject(eventManager).buildAndStartAll(); eventManager = eventServiceQueue.createProxy(EventManager.class); testServiceImpl = new TestServiceImpl(); ServiceBuilder serviceBuilder = ServiceBuilder.serviceBuilder().setEventManager(eventManager); serviceBuilder.getRequestQueueBuilder().setBatchSize(100); this.serviceQueue = serviceBuilder .setServiceObject(testServiceImpl).buildAndStart(); serviceBundle = serviceBundleBuilder().buildAndStart(); eventBusProxyCreator = QBit.factory().eventBusProxyCreator(); sender = eventBusProxyCreator.createProxy(eventManager, EventChannel1.class); serviceBundle.addServiceQueue(serviceName, this.serviceQueue); testService = serviceBundle.createLocalProxy(TestService.class, serviceName); }
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; }