private int sendChannelEventCallback(int eventType, ReactorChannel reactorChannel, ReactorErrorInfo errorInfo) { ReactorChannelEvent reactorChannelEvent = ReactorFactory.createReactorChannelEvent(); reactorChannelEvent.reactorChannel(reactorChannel); reactorChannelEvent.eventType(eventType); populateErrorInfo(reactorChannelEvent.errorInfo(), errorInfo.code(), errorInfo.location(), errorInfo.error().text()); int retval = reactorChannel.role().channelEventCallback().reactorChannelEventCallback(reactorChannelEvent); reactorChannelEvent.returnToPool(); return retval; }
assertEquals(ReactorCallbackReturnCodes.SUCCESS, consumerRole.channelEventCallback().reactorChannelEventCallback(reactorChannelEvent)); assertEquals(1, consumerCallbackHandler._reactorChannelEventCallbackCount); consumerRole.watchlistOptions().obeyOpenWindow(true); consumerRole.watchlistOptions().channelOpenCallback(consumerCallbackHandler); assertEquals(ReactorCallbackReturnCodes.SUCCESS, consumerRole.watchlistOptions().channelOpenCallback().reactorChannelEventCallback(reactorChannelEvent)); assertEquals(2, consumerCallbackHandler._reactorChannelEventCallbackCount); assertTrue(consumerRole.watchlistOptions().enableWatchlist()); assertEquals(ReactorCallbackReturnCodes.SUCCESS, providerRole.channelEventCallback().reactorChannelEventCallback(reactorChannelEvent)); assertEquals(1, providerCallbackHandler._reactorChannelEventCallbackCount); assertEquals(ReactorCallbackReturnCodes.SUCCESS, niProviderRole.channelEventCallback().reactorChannelEventCallback(reactorChannelEvent)); assertEquals(1, niproviderCallbackHandler._reactorChannelEventCallbackCount);
assertEquals(ReactorCallbackReturnCodes.SUCCESS, consumerRole.channelEventCallback().reactorChannelEventCallback(reactorChannelEvent)); assertEquals(1, consumerCallbackHandler._reactorChannelEventCallbackCount); assertEquals(ReactorCallbackReturnCodes.SUCCESS, providerRole.channelEventCallback().reactorChannelEventCallback(reactorChannelEvent)); assertEquals(1, providerCallbackHandler._reactorChannelEventCallbackCount); assertEquals(ReactorCallbackReturnCodes.SUCCESS, niProviderRole.channelEventCallback().reactorChannelEventCallback(reactorChannelEvent)); assertEquals(1, niproviderCallbackHandler._reactorChannelEventCallbackCount);