cleaning up activemq-optional - depricated classes

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1024559 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2010-10-20 09:19:42 +00:00
parent 90fb6e6e0f
commit 7055fb98c4
4 changed files with 23 additions and 21 deletions

View File

@ -38,7 +38,10 @@ import org.apache.commons.logging.LogFactory;
/** /**
* @version $Revision$ * @version $Revision$
* @deprecated
* @see HttpClientTransport
*/ */
@Deprecated
public class HttpTransport extends HttpTransportSupport { public class HttpTransport extends HttpTransportSupport {
private static final Log LOG = LogFactory.getLog(HttpTransport.class); private static final Log LOG = LogFactory.getLog(HttpTransport.class);

View File

@ -26,6 +26,11 @@ import javax.net.ssl.HttpsURLConnection;
import org.apache.activemq.transport.http.HttpTransport; import org.apache.activemq.transport.http.HttpTransport;
import org.apache.activemq.transport.util.TextWireFormat; import org.apache.activemq.transport.util.TextWireFormat;
/**
* @deprecated
* @see HttpsClientTransport
*/
@Deprecated
public class HttpsTransport extends HttpTransport { public class HttpsTransport extends HttpTransport {
public HttpsTransport(TextWireFormat wireFormat, URI remoteUrl) throws MalformedURLException { public HttpsTransport(TextWireFormat wireFormat, URI remoteUrl) throws MalformedURLException {

View File

@ -17,28 +17,15 @@
package org.apache.activemq.util.oxm; package org.apache.activemq.util.oxm;
import static org.apache.activemq.util.oxm.AbstractXMLMessageTransformer.MessageTransform.ADAPTIVE;
import static org.apache.activemq.util.oxm.AbstractXMLMessageTransformer.MessageTransform.OBJECT;
import static org.apache.activemq.util.oxm.AbstractXMLMessageTransformer.MessageTransform.XML;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.ObjectMessage;
import javax.jms.Session;
import javax.jms.TextMessage;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.ActiveMQMessageConsumer; import org.apache.activemq.ActiveMQMessageConsumer;
import org.apache.activemq.MessageTransformer; import org.apache.activemq.MessageTransformer;
import org.apache.activemq.util.xstream.SamplePojo; import org.apache.activemq.util.xstream.SamplePojo;
import org.apache.activemq.util.xstream.XStreamMessageTransformer;
import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver; import javax.jms.*;
import static org.apache.activemq.util.oxm.AbstractXMLMessageTransformer.MessageTransform.*;
public abstract class AbstractXMLMessageTransformerTest extends TestCase { public abstract class AbstractXMLMessageTransformerTest extends TestCase {
protected ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); protected ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");

View File

@ -32,7 +32,7 @@ import org.apache.activemq.ActiveMQMessageConsumer;
import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver; import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
import static org.apache.activemq.util.xstream.XStreamMessageTransformer.MessageTransform.*; import static org.apache.activemq.util.oxm.AbstractXMLMessageTransformer.MessageTransform.*;
/** /**
* @version $Revision$ * @version $Revision$
@ -43,7 +43,9 @@ public class XStreamTransformTest extends TestCase {
protected long timeout = 5000; protected long timeout = 5000;
public void testSendObjectMessageReceiveAsTextMessageAndObjectMessage() throws Exception { public void testSendObjectMessageReceiveAsTextMessageAndObjectMessage() throws Exception {
connectionFactory.setTransformer(new XStreamMessageTransformer(XML)); org.apache.activemq.util.oxm.XStreamMessageTransformer transformer = new org.apache.activemq.util.oxm.XStreamMessageTransformer();
transformer.setTransformType(XML);
connectionFactory.setTransformer(transformer);
connection = connectionFactory.createConnection(); connection = connectionFactory.createConnection();
connection.start(); connection.start();
@ -88,7 +90,9 @@ public class XStreamTransformTest extends TestCase {
} }
public void testSendTextMessageReceiveAsObjectMessageAndTextMessage() throws Exception { public void testSendTextMessageReceiveAsObjectMessageAndTextMessage() throws Exception {
connectionFactory.setTransformer(new XStreamMessageTransformer(OBJECT)); org.apache.activemq.util.oxm.XStreamMessageTransformer transformer = new org.apache.activemq.util.oxm.XStreamMessageTransformer();
transformer.setTransformType(OBJECT);
connectionFactory.setTransformer(transformer);
connection = connectionFactory.createConnection(); connection = connectionFactory.createConnection();
connection.start(); connection.start();
@ -138,7 +142,9 @@ public class XStreamTransformTest extends TestCase {
} }
public void testAdaptiveTransform() throws Exception { public void testAdaptiveTransform() throws Exception {
connectionFactory.setTransformer(new XStreamMessageTransformer(ADAPTIVE)); org.apache.activemq.util.oxm.XStreamMessageTransformer transformer = new org.apache.activemq.util.oxm.XStreamMessageTransformer();
transformer.setTransformType(ADAPTIVE);
connectionFactory.setTransformer(transformer);
connection = connectionFactory.createConnection(); connection = connectionFactory.createConnection();
connection.start(); connection.start();
@ -220,7 +226,8 @@ public class XStreamTransformTest extends TestCase {
} }
public void testStreamDriverTransform() throws Exception { public void testStreamDriverTransform() throws Exception {
XStreamMessageTransformer transformer = new XStreamMessageTransformer(ADAPTIVE); org.apache.activemq.util.oxm.XStreamMessageTransformer transformer = new org.apache.activemq.util.oxm.XStreamMessageTransformer();
transformer.setTransformType(ADAPTIVE);
transformer.setStreamDriver(new JettisonMappedXmlDriver()); transformer.setStreamDriver(new JettisonMappedXmlDriver());
connectionFactory.setTransformer(transformer); connectionFactory.setTransformer(transformer);
connection = connectionFactory.createConnection(); connection = connectionFactory.createConnection();