All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mockrunner.mock.jms.MockTopicPublisher Maven / Gradle / Ivy

Go to download

Mockrunner is a lightweight framework for unit testing applications in the J2EE environment. It supports servlets, filters, tag classes and Struts actions. It includes a JDBC a JMS and a JCA test framework and can be used to test EJB based applications.

The newest version!
package com.mockrunner.mock.jms;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Topic;
import javax.jms.TopicPublisher;

/**
 * Mock implementation of JMS TopicPublisher.
 */
public class MockTopicPublisher extends MockMessageProducer implements TopicPublisher
{
    public MockTopicPublisher(MockConnection connection, MockSession session, MockTopic topic)
    {
        super(connection, session, topic);
    }

    public Topic getTopic() throws JMSException
    {
        return (Topic)getDestination();
    }

    public void publish(Message message) throws JMSException
    {
        super.send(message);
    }

    public void publish(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
    {
        super.send(message, deliveryMode, priority, timeToLive);
    }

    public void publish(Topic topic, Message message) throws JMSException
    {
        super.send(topic, message);
    }

    public void publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
    {
        super.send(topic, message, deliveryMode, priority, timeToLive);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy