![JAR search and dependency download from the Maven repository](/logo.png)
com.github.smokestack.jms.MockTopic Maven / Gradle / Ivy
The newest version!
/**
*
*/
package com.github.smokestack.jms;
import java.io.Serializable;
import javax.jms.JMSException;
import javax.jms.Topic;
import javax.naming.NamingException;
import javax.naming.Reference;
import javax.naming.Referenceable;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
/**
* @author gliptak
*
*/
public class MockTopic implements Topic, Serializable, Referenceable {
/**
* Generated
*/
private static final long serialVersionUID = -6729071527792799643L;
protected String topicName;
protected Reference reference;
/**
* @param topicName
*/
public MockTopic(String topicName) {
super();
this.topicName = topicName;
}
/* (non-Javadoc)
* @see javax.jms.Topic#getTopicName()
*/
public String getTopicName() throws JMSException {
_getTopicName();
return topicName;
}
public String _getTopicName() throws JMSException {
return null;
}
/* (non-Javadoc)
* @see javax.naming.Referenceable#getReference()
*/
public Reference getReference() throws NamingException {
_getReference();
return reference;
}
public Reference _getReference() throws NamingException {
return null;
}
/**
* Making a setter available
* @param reference
*/
public void setReference(Reference reference){
_setReference(reference);
this.reference=reference;
}
public void _setReference(Reference reference){
}
@Override
public String toString(){
return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy