public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (args == null || Object.class.equals(method.getDeclaringClass())) { // events have at least one arg handleProxyMethod(method); return null; } stream.getHeadHandler().handle(args[0], true); return null; }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (args == null || Object.class.equals(method.getDeclaringClass())) { // events have at least one arg handleProxyMethod(method); return null; } stream.getHeadHandler().handle(args[0], true); return null; }
public void handle(Object event, boolean endOfBatch) { for (ChannelConnection connection : connections) { connection.getEventStream().getHeadHandler().handle(event, endOfBatch); } } }
public void run() { for (ChannelConnection connection : connections) { EventStream stream = connection.getEventStream(); // force end of batch stream.getHeadHandler().handle(event, true); } } }
public void handle(Object event, boolean endOfBatch) { for (ChannelConnection connection : connections) { connection.getEventStream().getHeadHandler().handle(event, endOfBatch); } } }
public void run() { for (ChannelConnection connection : connections) { EventStream stream = connection.getEventStream(); // force end of batch stream.getHeadHandler().handle(event, true); } } }
public void onEvent(RingBufferEvent event, long sequence, boolean endOfBatch) throws Exception { if (channelEvent) { // consumer takes a channel event, send that, making sure to set the end-of-batch marker and sequence number event.setEndOfBatch(endOfBatch); event.setSequence(sequence); stream.getHeadHandler().handle(event, endOfBatch); } else { // if the parsed value has been set, send that Object parsed = event.getParsed(Object.class); if (parsed != null) { stream.getHeadHandler().handle(parsed, endOfBatch); } else { stream.getHeadHandler().handle(event.getEvent(Object.class), endOfBatch); } } } }
public void onMessage(Message message) { for (ConnectionPair pair : connections) { pair.connection.getEventStream().getHeadHandler().handle(message.getBody(), false); } }
head.setNext(connection.getEventStream().getHeadHandler());
public void attach(JmsConnectionSource source, PhysicalConnectionTarget target, ChannelConnection connection) throws Fabric3Exception { URI serviceUri = source.getUri(); ClassLoader sourceClassLoader = source.getClassLoader(); JmsBindingMetadata metadata = source.getMetadata(); ResolvedObjects objects = resolveAdministeredObjects(source); ContainerConfiguration configuration = new ContainerConfiguration(); ConnectionFactory connectionFactory = objects.getRequestFactory(); javax.jms.Destination destination = objects.getRequestDestination(); EventStream stream = connection.getEventStream(); EventStreamListener listener = new EventStreamListener(sourceClassLoader, stream.getHeadHandler(), monitor); configuration.setDestinationType(metadata.getDestination().geType()); configuration.setDestination(destination); configuration.setFactory(connectionFactory); configuration.setMessageListener(listener); configuration.setUri(serviceUri); configuration.setSessionType(source.getSessionType()); populateConfiguration(configuration, metadata); if (containerManager.isRegistered(serviceUri)) { // the wire has changed and it is being re-provisioned containerManager.unregister(serviceUri); } AdaptiveMessageContainer container = containerFactory.create(configuration); containerManager.register(container); }