com.datatorrent.lib.io.jms.AbstractJMSOutputOperator Maven / Gradle / Ivy
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.datatorrent.lib.io.jms;
import java.io.IOException;
import java.util.List;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageProducer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.Lists;
import com.datatorrent.api.Context.OperatorContext;
import com.datatorrent.api.DAG;
import com.datatorrent.api.Operator;
/**
* This is the base implementation of an JMS output operator.
* A concrete operator should be created from this skeleton implementation.
*
* This operator receives tuples from Malhar Streaming Platform through its input ports.
* When the tuple is available in input ports it converts that to JMS message and send into
* a message bus. The concrete class of this has to implement the abstract method
* how to convert tuple into JMS message.
*
* Ports:
* Input: Can have any number of input ports
* Output: No output port
*
*
* @displayName Abstract JMS Output
* @category Messaging
* @tags jms, output operator
*
* @since 0.3.2
*/
@org.apache.hadoop.classification.InterfaceStability.Evolving
public abstract class AbstractJMSOutputOperator extends JMSBase implements Operator
{
private static final Logger logger = LoggerFactory.getLogger(AbstractJMSOutputOperator.class);
/**
* Use this field to getStore() tuples from which messages are created.
*/
private List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy