Optimized java package imports

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1386558 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Claus Ibsen 2012-09-17 11:24:32 +00:00
parent 2845e88d77
commit 3b4aadca7b
47 changed files with 77 additions and 115 deletions

View File

@ -17,7 +17,6 @@
package org.apache.activemq.axis;
import java.util.HashMap;
import javax.jms.ConnectionFactory;
import javax.jms.QueueConnectionFactory;
import javax.jms.TopicConnectionFactory;

View File

@ -20,7 +20,6 @@ import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.JMSException;

View File

@ -20,7 +20,6 @@ import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import javax.jms.DeliveryMode;
import javax.jms.Destination;
import javax.jms.JMSException;

View File

@ -17,7 +17,6 @@
package org.apache.activemq.filter;
import java.io.StringReader;
import javax.jms.BytesMessage;
import javax.jms.JMSException;
import javax.jms.TextMessage;
@ -26,10 +25,9 @@ import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.xml.sax.InputSource;
import org.apache.activemq.command.Message;
import org.apache.activemq.util.ByteArrayInputStream;
import org.xml.sax.InputSource;
public class JAXPXPathEvaluator implements XPathExpression.XPathEvaluator {

View File

@ -17,8 +17,8 @@
package org.apache.activemq.store.amq.reader;
import java.util.Iterator;
import javax.jms.Message;
import org.apache.activemq.broker.region.MessageReference;
import org.apache.activemq.filter.BooleanExpression;
import org.apache.activemq.filter.MessageEvaluationContext;

View File

@ -21,7 +21,6 @@ import java.io.IOException;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import javax.jms.InvalidSelectorException;
import javax.jms.Message;

View File

@ -26,7 +26,6 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import javax.jms.BytesMessage;
import javax.jms.Connection;
import javax.jms.DeliveryMode;

View File

@ -17,7 +17,6 @@
package org.apache.activemq.tool;
import java.io.IOException;
import javax.jms.Connection;
import javax.jms.JMSException;
import javax.jms.Message;

View File

@ -17,7 +17,6 @@
package org.apache.activemq.tool;
import java.util.Date;
import javax.jms.Connection;
import javax.jms.DeliveryMode;
import javax.jms.JMSException;

View File

@ -16,7 +16,9 @@
*/
package org.apache.activemq.transport;
import org.apache.activemq.spring.SpringSslContext;
import javax.net.ssl.SSLContext;
import org.apache.activemq.broker.SslContext;
import org.apache.activemq.transport.https.Krb5AndCertsSslSocketConnector;
import org.apache.activemq.util.IntrospectionSupport;
import org.eclipse.jetty.server.Connector;
@ -24,11 +26,6 @@ import org.eclipse.jetty.server.ssl.SslConnector;
import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.apache.activemq.broker.SslContext;
import javax.net.ssl.SSLContext;
import java.util.Map;
public class SecureSocketConnectorFactory extends SocketConnectorFactory {
private String keyPassword = System.getProperty("javax.net.ssl.keyPassword");

View File

@ -16,13 +16,12 @@
*/
package org.apache.activemq.transport;
import java.util.Map;
import org.apache.activemq.util.IntrospectionSupport;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import java.util.Map;
public class SocketConnectorFactory {
private Map<String, Object> transportOptions;

View File

@ -16,13 +16,13 @@
*/
package org.apache.activemq.transport;
import java.net.InetAddress;
import java.net.URI;
import org.apache.activemq.util.InetAddressUtil;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
import java.net.InetAddress;
import java.net.URI;
abstract public class WebTransportServerSupport extends TransportServerSupport {
protected URI bindAddress;

View File

@ -21,7 +21,6 @@ import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;

View File

@ -20,8 +20,8 @@ import java.net.URI;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
public class EmbeddedJettyServer implements org.apache.activemq.Service {

View File

@ -17,7 +17,6 @@
package org.apache.activemq.transport.http;
import java.net.URI;
import javax.servlet.ServletException;
import org.apache.activemq.broker.BrokerService;

View File

@ -16,9 +16,12 @@
*/
package org.apache.activemq.transport.http;
import java.net.InetSocketAddress;
import java.net.URI;
import java.util.Map;
import org.apache.activemq.command.BrokerInfo;
import org.apache.activemq.transport.SocketConnectorFactory;
import org.apache.activemq.transport.TransportServerSupport;
import org.apache.activemq.transport.WebTransportServerSupport;
import org.apache.activemq.transport.util.TextWireFormat;
import org.apache.activemq.transport.xstream.XStreamWireFormat;
@ -29,11 +32,6 @@ import org.eclipse.jetty.server.handler.GzipHandler;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.URI;
import java.util.Map;
public class HttpTransportServer extends WebTransportServerSupport {
private TextWireFormat wireFormat;

View File

@ -22,16 +22,16 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.zip.GZIPInputStream;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.activemq.Service;
import org.apache.activemq.command.Command;
import org.apache.activemq.command.WireFormatInfo;

View File

@ -20,7 +20,6 @@ import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URI;
import javax.net.ssl.HttpsURLConnection;
import org.apache.activemq.transport.http.HttpTransport;

View File

@ -16,13 +16,13 @@
*/
package org.apache.activemq.transport.https;
import java.net.URI;
import org.apache.activemq.broker.SslContext;
import org.apache.activemq.transport.SecureSocketConnectorFactory;
import org.apache.activemq.transport.http.HttpTransportServer;
import org.eclipse.jetty.server.Connector;
import java.net.URI;
public class HttpsTransportServer extends HttpTransportServer {
private SslContext context;

View File

@ -25,7 +25,6 @@ import java.security.Principal;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.SSLSocket;

View File

@ -18,7 +18,6 @@
package org.apache.activemq.transport.ws;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@ -17,24 +17,20 @@
package org.apache.activemq.transport.ws;
import java.net.InetSocketAddress;
import java.net.URI;
import java.util.Map;
import org.apache.activemq.command.BrokerInfo;
import org.apache.activemq.transport.SocketConnectorFactory;
import org.apache.activemq.transport.TransportServerSupport;
import org.apache.activemq.transport.WebTransportServerSupport;
import org.apache.activemq.util.InetAddressUtil;
import org.apache.activemq.util.IntrospectionSupport;
import org.apache.activemq.util.ServiceStopper;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.URI;
import java.util.Map;
/**
* Creates a web server and registers web socket server
*

View File

@ -16,20 +16,19 @@
*/
package org.apache.activemq.transport.wss;
import org.apache.activemq.broker.SslContext;
import org.apache.activemq.transport.TransportFactory;
import org.apache.activemq.transport.TransportServer;
import org.apache.activemq.transport.ws.WSTransportServer;
import org.apache.activemq.util.IOExceptionSupport;
import org.apache.activemq.util.IntrospectionSupport;
import org.apache.activemq.util.URISupport;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Map;
import org.apache.activemq.broker.SslContext;
import org.apache.activemq.transport.TransportFactory;
import org.apache.activemq.transport.TransportServer;
import org.apache.activemq.util.IOExceptionSupport;
import org.apache.activemq.util.IntrospectionSupport;
import org.apache.activemq.util.URISupport;
/**
*
* Factory for Secure WebSocket (wss) transport

View File

@ -16,15 +16,12 @@
*/
package org.apache.activemq.transport.wss;
import java.net.URI;
import org.apache.activemq.broker.SslContext;
import org.apache.activemq.transport.SecureSocketConnectorFactory;
import org.apache.activemq.transport.https.Krb5AndCertsSslSocketConnector;
import org.apache.activemq.transport.ws.WSTransportServer;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import javax.net.ssl.SSLContext;
import java.net.URI;
public class WSSTransportServer extends WSTransportServer {
private SslContext context;

View File

@ -16,6 +16,9 @@
*/
package org.apache.activemq.transport.xstream;
import java.io.IOException;
import java.io.Reader;
import com.thoughtworks.xstream.XStream;
import org.apache.activemq.command.Command;
import org.apache.activemq.command.MarshallAware;
@ -23,9 +26,6 @@ import org.apache.activemq.command.MessageDispatch;
import org.apache.activemq.transport.util.TextWireFormat;
import org.apache.activemq.wireformat.WireFormat;
import java.io.IOException;
import java.io.Reader;
/**
* A {@link WireFormat} implementation which uses the <a
* href="http://xstream.codehaus.org/>XStream</a> library to marshall commands

View File

@ -17,7 +17,6 @@
package org.apache.activemq.util;
import java.net.URISyntaxException;
import javax.jms.Connection;
import javax.jms.JMSException;

View File

@ -20,7 +20,6 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.JMSException;

View File

@ -17,7 +17,6 @@
package org.apache.activemq.util;
import java.util.Hashtable;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;

View File

@ -18,7 +18,6 @@
package org.apache.activemq.util.oxm;
import java.io.Serializable;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
@ -29,9 +28,6 @@ import javax.jms.TextMessage;
import org.apache.activemq.MessageTransformerSupport;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.HierarchicalStreamDriver;
/**
* Abstract class used as a base for implementing transformers from object to text messages (in XML/JSON format)
* and vice versa using.

View File

@ -23,8 +23,6 @@ import javax.jms.Session;
import javax.jms.TextMessage;
import org.springframework.oxm.AbstractMarshaller;
import org.springframework.oxm.Marshaller;
import org.springframework.oxm.Unmarshaller;
import org.springframework.xml.transform.StringResult;
import org.springframework.xml.transform.StringSource;

View File

@ -20,7 +20,6 @@ package org.apache.activemq.util.oxm;
import java.io.Serializable;
import java.io.StringReader;
import java.io.StringWriter;
import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;

View File

@ -19,7 +19,6 @@ package org.apache.activemq.util.xstream;
import java.io.Serializable;
import java.io.StringReader;
import java.io.StringWriter;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
@ -28,14 +27,13 @@ import javax.jms.ObjectMessage;
import javax.jms.Session;
import javax.jms.TextMessage;
import org.apache.activemq.MessageTransformerSupport;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.HierarchicalStreamDriver;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
import com.thoughtworks.xstream.io.xml.XppReader;
import org.apache.activemq.MessageTransformerSupport;
/**
* Transforms object messages to text messages and vice versa using

View File

@ -21,8 +21,14 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import javax.jms.*;
import javax.jms.Connection;
import javax.jms.DeliveryMode;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Session;
import junit.framework.TestCase;
import org.apache.activemq.ActiveMQConnectionFactory;

View File

@ -18,8 +18,8 @@ package org.apache.activemq.store.amq.reader;
import java.io.File;
import java.util.Set;
import javax.jms.Message;
import junit.framework.TestCase;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

View File

@ -24,7 +24,6 @@ import javax.jms.Session;
import javax.jms.TextMessage;
import junit.framework.TestCase;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.command.ActiveMQQueue;

View File

@ -18,7 +18,6 @@
package org.apache.activemq.transport.http;
import java.net.URISyntaxException;
import javax.jms.ConnectionFactory;
import javax.jms.MapMessage;
import javax.jms.MessageConsumer;
@ -26,7 +25,6 @@ import javax.jms.MessageProducer;
import javax.jms.Session;
import junit.framework.Test;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.JMSMessageTest;
import org.apache.activemq.broker.BrokerService;

View File

@ -19,7 +19,6 @@ package org.apache.activemq.transport.http;
import java.net.URISyntaxException;
import java.util.concurrent.atomic.AtomicInteger;
import javax.jms.BytesMessage;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;

View File

@ -16,11 +16,8 @@
*/
package org.apache.activemq.transport.http;
import static org.junit.Assert.*;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import javax.jms.BytesMessage;
import javax.jms.MapMessage;
import javax.jms.MessageConsumer;
@ -44,6 +41,10 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
/**
* This test covers the Message Compression feature of the ActiveMQConnectionFactory.setUseCompression
* and has no relation to Http transport level compression. The Messages are compressed using the

View File

@ -20,7 +20,6 @@ import java.net.URI;
import junit.framework.Test;
import junit.textui.TestRunner;
import org.apache.activemq.broker.BrokerFactory;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.transport.TransportBrokerTestSupport;

View File

@ -18,7 +18,6 @@ package org.apache.activemq.transport.http;
import java.net.Socket;
import java.net.URL;
import javax.net.SocketFactory;
import org.apache.activemq.util.Wait;

View File

@ -17,27 +17,21 @@
package org.apache.activemq.transport.ws;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.net.Socket;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.UnknownHostException;
import org.apache.activemq.broker.BrokerFactory;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.SslContext;
import org.apache.activemq.spring.SpringSslContext;
import org.apache.activemq.transport.stomp.StompConnection;
import org.apache.activemq.util.Wait;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.server.ssl.SslSocketConnector;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.webapp.WebAppContext;
import org.junit.After;
import org.junit.Before;
@ -53,6 +47,8 @@ import org.openqa.selenium.firefox.FirefoxProfile;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.junit.Assert.assertTrue;
public class WSTransportTest {
private static final Logger LOG = LoggerFactory.getLogger(WSTransportTest.class);

View File

@ -18,7 +18,6 @@ package org.apache.activemq.util;
import java.io.IOException;
import java.util.Properties;
import javax.jms.Connection;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;

View File

@ -17,15 +17,24 @@
package org.apache.activemq.util.oxm;
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 org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.ActiveMQMessageConsumer;
import org.apache.activemq.MessageTransformer;
import org.apache.activemq.util.xstream.SamplePojo;
import javax.jms.*;
import static org.apache.activemq.util.oxm.AbstractXMLMessageTransformer.MessageTransform.*;
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;
public abstract class AbstractXMLMessageTransformerTest extends TestCase {
protected ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");

View File

@ -17,8 +17,6 @@
package org.apache.activemq.util.oxm;
import static org.apache.activemq.util.oxm.AbstractXMLMessageTransformer.MessageTransform.ADAPTIVE;
import javax.jms.Destination;
import javax.jms.Message;
import javax.jms.MessageConsumer;
@ -27,10 +25,11 @@ import javax.jms.ObjectMessage;
import javax.jms.Session;
import javax.jms.TextMessage;
import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
import org.apache.activemq.ActiveMQMessageConsumer;
import org.apache.activemq.util.xstream.SamplePojo;
import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
import static org.apache.activemq.util.oxm.AbstractXMLMessageTransformer.MessageTransform.ADAPTIVE;
public class XStreamMessageTransformTest extends
AbstractXMLMessageTransformerTest {

View File

@ -25,14 +25,14 @@ import javax.jms.ObjectMessage;
import javax.jms.Session;
import javax.jms.TextMessage;
import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
import junit.framework.TestCase;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.ActiveMQMessageConsumer;
import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
import static org.apache.activemq.util.oxm.AbstractXMLMessageTransformer.MessageTransform.*;
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;
/**
*

View File

@ -16,11 +16,10 @@
limitations under the License.
-->
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker brokerName="broker1" brokerId="broker1" persistent="false" useShutdownHook="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">

View File

@ -16,11 +16,10 @@
limitations under the License.
-->
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker brokerName="broker2" brokerId="broker2" persistent="false" useShutdownHook="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">