jetty-9 organised imports. Cleaned up some TODOs

This commit is contained in:
Greg Wilkins 2013-01-11 16:37:32 +11:00
parent b5d4add750
commit 27c31fb403
327 changed files with 711 additions and 1266 deletions

View File

@ -25,6 +25,7 @@ import java.util.Map;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.atomic.AtomicInteger;
import javax.servlet.AsyncContext;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.embedded;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.embedded;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.embedded;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;

View File

@ -20,8 +20,8 @@ package org.eclipse.jetty.embedded;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;

View File

@ -21,6 +21,7 @@ package org.eclipse.jetty.embedded;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.embedded;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;

View File

@ -19,8 +19,8 @@
package org.eclipse.jetty.embedded;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.webapp.WebAppContext;
public class OneWebApp

View File

@ -20,8 +20,8 @@ package org.eclipse.jetty.embedded;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.handler.ResourceHandler;

View File

@ -18,12 +18,16 @@
package org.eclipse.jetty.embedded;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.zip.GZIPInputStream;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -40,9 +44,6 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class GzipHandlerTest
{
private static String __content =

View File

@ -22,7 +22,6 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.jetty.annotations.AnnotationParser.DiscoverableAnnotationHandler;
import org.eclipse.jetty.annotations.AnnotationParser.Value;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.webapp.DiscoveredAnnotation;
import org.eclipse.jetty.webapp.WebAppContext;

View File

@ -23,6 +23,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.ServiceLoader;
import javax.servlet.ServletContainerInitializer;
import javax.servlet.annotation.HandlesTypes;
@ -33,7 +34,6 @@ import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.webapp.AbstractConfiguration;
import org.eclipse.jetty.webapp.DiscoveredAnnotation;
import org.eclipse.jetty.webapp.FragmentDescriptor;
import org.eclipse.jetty.webapp.MetaDataComplete;
import org.eclipse.jetty.webapp.WebAppContext;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.annotations;
import java.util.EventListener;
import javax.servlet.Filter;
import javax.servlet.Servlet;
import javax.servlet.ServletException;

View File

@ -20,6 +20,7 @@ package org.eclipse.jetty.annotations;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import javax.annotation.PostConstruct;
import org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler;

View File

@ -20,6 +20,7 @@ package org.eclipse.jetty.annotations;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import javax.annotation.PreDestroy;
import org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler;

View File

@ -22,6 +22,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Locale;
import javax.annotation.Resource;
import javax.naming.InitialContext;
import javax.naming.NameNotFoundException;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.annotations;
import java.util.List;
import javax.servlet.Servlet;
import org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler;

View File

@ -21,6 +21,7 @@ package org.eclipse.jetty.annotations;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

View File

@ -20,9 +20,8 @@ package org.eclipse.jetty.annotations;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.ServletSecurityElement;
import javax.servlet.annotation.HttpConstraint;
import javax.servlet.annotation.HttpMethodConstraint;
import javax.servlet.annotation.ServletSecurity;
import javax.servlet.annotation.ServletSecurity.EmptyRoleSemantic;
import javax.servlet.annotation.ServletSecurity.TransportGuarantee;

View File

@ -20,6 +20,7 @@ package org.eclipse.jetty.annotations;
import java.util.ArrayList;
import java.util.EnumSet;
import javax.servlet.DispatcherType;
import javax.servlet.Filter;
import javax.servlet.annotation.WebFilter;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.annotations;
import java.util.ArrayList;
import javax.servlet.annotation.WebInitParam;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.annotations;
import java.io.IOException;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.annotation.Resource;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.annotations;
import java.io.IOException;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.annotation.Resource;

View File

@ -18,6 +18,8 @@
package org.eclipse.jetty.annotations;
import static org.junit.Assert.assertNotNull;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
@ -28,8 +30,6 @@ import org.eclipse.jetty.webapp.FragmentDescriptor;
import org.eclipse.jetty.webapp.WebAppContext;
import org.junit.Test;
import static org.junit.Assert.assertNotNull;
/**
* TestAnnotationConfiguration
*

View File

@ -18,9 +18,15 @@
package org.eclipse.jetty.annotations;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.naming.Context;
import javax.naming.InitialContext;
@ -30,11 +36,6 @@ import org.eclipse.jetty.util.MultiMap;
import org.junit.After;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
/**
*
*/

View File

@ -18,6 +18,10 @@
package org.eclipse.jetty.annotations;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.Arrays;
import java.util.List;
@ -25,10 +29,6 @@ import org.eclipse.jetty.annotations.AnnotationParser.DiscoverableAnnotationHand
import org.eclipse.jetty.annotations.AnnotationParser.Value;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
public class TestAnnotationParser
{
@Test

View File

@ -18,8 +18,15 @@
package org.eclipse.jetty.annotations;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.Arrays;
import java.util.List;
import javax.servlet.annotation.HttpConstraint;
import javax.servlet.annotation.HttpMethodConstraint;
import javax.servlet.annotation.ServletSecurity;
@ -36,12 +43,6 @@ import org.eclipse.jetty.util.security.Constraint;
import org.eclipse.jetty.webapp.WebAppContext;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
public class TestSecurityAnnotationConversions
{
@ServletSecurity(value=@HttpConstraint(value=EmptyRoleSemantic.DENY))

View File

@ -18,6 +18,11 @@
package org.eclipse.jetty.annotations;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
@ -29,11 +34,6 @@ import org.eclipse.jetty.servlet.ServletMapping;
import org.eclipse.jetty.webapp.WebAppContext;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
/**
* TestServletAnnotations
*

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.annotations.resources;
import java.io.IOException;
import javax.annotation.Resource;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;

View File

@ -18,8 +18,12 @@
package org.eclipse.jetty.annotations.resources;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.lang.reflect.Field;
import java.util.List;
import javax.naming.Context;
import javax.naming.InitialContext;
@ -34,9 +38,6 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
public class TestResourceAnnotations
{
private Server server;

View File

@ -19,14 +19,10 @@
package org.eclipse.jetty.ant;
import java.io.File;
import java.util.Iterator;
import java.util.List;
import org.eclipse.jetty.ant.utils.TaskLog;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.webapp.WebAppClassLoader;
import org.eclipse.jetty.webapp.WebAppContext;
import org.eclipse.jetty.webapp.WebXmlConfiguration;

View File

@ -26,7 +26,6 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.apache.tools.ant.BuildException;
import org.eclipse.jetty.ant.types.Connector;
import org.eclipse.jetty.ant.types.ContextHandlers;
import org.eclipse.jetty.ant.utils.ServerProxy;

View File

@ -43,6 +43,7 @@ import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.Future;
import java.util.concurrent.TimeoutException;
import javax.net.ssl.SSLEngine;
import org.eclipse.jetty.client.api.AuthenticationStore;

View File

@ -46,5 +46,4 @@
*/
package org.eclipse.jetty.client;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.api.Response;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.client;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@ -18,6 +18,10 @@
package org.eclipse.jetty.client;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.nio.ByteBuffer;
@ -29,10 +33,6 @@ import org.eclipse.jetty.toolchain.test.TestTracker;
import org.junit.Rule;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class GZIPContentDecoderTest
{
@Rule

View File

@ -25,6 +25,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@ -22,6 +22,7 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import javax.servlet.ServletException;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;

View File

@ -29,6 +29,7 @@ import java.util.Random;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@ -18,10 +18,13 @@
package org.eclipse.jetty.client;
import static org.junit.Assert.fail;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -39,8 +42,6 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.fail;
public class HttpClientRedirectTest extends AbstractHttpClientServerTest
{
public HttpClientRedirectTest(SslContextFactory sslContextFactory)

View File

@ -18,6 +18,9 @@
package org.eclipse.jetty.client;
import static java.nio.file.StandardOpenOption.CREATE;
import static org.junit.Assert.fail;
import java.io.IOException;
import java.io.InputStream;
import java.io.InterruptedIOException;
@ -30,6 +33,7 @@ import java.util.Arrays;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -45,9 +49,6 @@ import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.junit.Assert;
import org.junit.Test;
import static java.nio.file.StandardOpenOption.CREATE;
import static org.junit.Assert.fail;
public class HttpClientStreamTest extends AbstractHttpClientServerTest
{
public HttpClientStreamTest(SslContextFactory sslContextFactory)

View File

@ -18,6 +18,8 @@
package org.eclipse.jetty.client;
import static java.nio.file.StandardOpenOption.CREATE;
import java.io.IOException;
import java.io.OutputStream;
import java.net.HttpCookie;
@ -36,6 +38,7 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicLong;
import java.util.zip.GZIPOutputStream;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
@ -58,8 +61,6 @@ import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.junit.Assert;
import org.junit.Test;
import static java.nio.file.StandardOpenOption.CREATE;
public class HttpClientTest extends AbstractHttpClientServerTest
{
public HttpClientTest(SslContextFactory sslContextFactory)

View File

@ -23,6 +23,7 @@ import java.io.IOException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@ -23,6 +23,7 @@ import java.nio.ByteBuffer;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@ -22,6 +22,7 @@ import java.io.IOException;
import java.net.HttpCookie;
import java.net.URI;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;

View File

@ -26,6 +26,7 @@ import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@ -23,6 +23,7 @@ import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@ -21,14 +21,15 @@ package org.eclipse.jetty.client.api;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import org.junit.Ignore;
import org.junit.Test;
import com.ning.http.client.AsyncHttpClient;
import com.ning.http.client.BodyDeferringAsyncHandler;
import com.ning.http.client.Cookie;
import com.ning.http.client.Realm;
import com.ning.http.client.Request;
import com.ning.http.client.Response;
import org.junit.Ignore;
import org.junit.Test;
@Ignore
public class NingUsage

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.continuation;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.continuation;
import java.util.EventListener;
import javax.servlet.ServletRequestListener;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.continuation;
import java.lang.reflect.Constructor;
import javax.servlet.ServletRequest;
import javax.servlet.ServletRequestWrapper;
import javax.servlet.ServletResponse;

View File

@ -20,6 +20,7 @@
package org.eclipse.jetty.continuation;
import java.util.ArrayList;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.ServletResponseWrapper;

View File

@ -21,6 +21,7 @@ package org.eclipse.jetty.continuation;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.AsyncContext;
import javax.servlet.AsyncEvent;
import javax.servlet.AsyncListener;

View File

@ -21,7 +21,6 @@ package org.eclipse.jetty.deploy;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

View File

@ -20,8 +20,6 @@ package org.eclipse.jetty.deploy.providers;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.Locale;
import org.eclipse.jetty.deploy.App;

View File

@ -21,6 +21,7 @@ package org.eclipse.jetty.deploy;
import java.lang.management.ManagementFactory;
import java.util.ArrayList;
import java.util.List;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;

View File

@ -18,6 +18,11 @@
package org.eclipse.jetty.deploy.bindings;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.isIn;
import static org.hamcrest.Matchers.not;
import java.io.File;
import java.util.List;
@ -34,11 +39,6 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.isIn;
import static org.hamcrest.Matchers.not;
/**
* Tests {@link ScanningAppProvider} as it starts up for the first time.
*/

View File

@ -753,7 +753,6 @@ public class HttpGenerator
break;
default:
// TODO - maybe allow forced chunking by setting te ???
break;
}

View File

@ -1381,8 +1381,8 @@ public class HttpParser
/**
* This is the method called by parser when a HTTP Header name and value is found
* @param field TODO
* @return
* @param field The field parsed
* @return True if the parser should return to its caller
*/
public boolean parsedHeader(HttpField field);

View File

@ -18,14 +18,11 @@
package org.eclipse.jetty.io;
import java.io.EOFException;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketException;
import java.nio.ByteBuffer;
import java.nio.channels.ByteChannel;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.GatheringByteChannel;
import java.nio.channels.SocketChannel;

View File

@ -1,519 +0,0 @@
//
// ========================================================================
// Copyright (c) 1995-2012 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//
package org.eclipse.jetty.io;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.net.Socket;
import java.net.SocketException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Executor;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.annotation.Name;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
/**
* TODO this class is still experimental
*/
public class FilterConnection extends AbstractConnection
{
private static final Logger LOG = Log.getLogger(FilterConnection.class);
private static final boolean DEBUG = LOG.isDebugEnabled(); // Easy for the compiler to remove the code if DEBUG==false
public interface Filter
{
/**
* <p>Callback method invoked when a connection from a remote client has been accepted.</p>
* <p>The {@code socket} parameter can be used to extract socket address information of
* the remote client.</p>
*
* @param endpoint the socket associated with the remote client
*/
public void opened(EndPoint endpoint);
/**
* <p>Callback method invoked when bytes sent by a remote client arrived on the server.</p>
*
* @param endPoint the socket associated with the remote client
* @param bytes the read-only buffer containing the incoming bytes
*/
public void incoming(EndPoint endPoint, ByteBuffer bytes);
/**
* <p>Callback method invoked when bytes are sent to a remote client from the server.</p>
* <p>This method is invoked after the bytes have been actually written to the remote client.</p>
*
* @param endPoint the socket associated with the remote client
* @param bytes the read-only buffer containing the outgoing bytes
*/
public void outgoing(EndPoint endPoint, ByteBuffer bytes);
/**
* <p>Callback method invoked when a connection to a remote client has been closed.</p>
* <p>The {@code socket} parameter is already closed when this method is called, so it
* cannot be queried for socket address information of the remote client.<br />
* However, the {@code socket} parameter is the same object passed to {@link #opened(Socket)},
* so it is possible to map socket information in {@link #opened(Socket)} and retrieve it
* in this method.
*
* @param endpoint the (closed) socket associated with the remote client
*/
public void closed(EndPoint endpoint);
}
public static class DebugFilter implements Filter
{
public DebugFilter()
{
}
@Override
public void opened(EndPoint endpoint)
{
if (DEBUG)
LOG.debug("{}@{} opened%n",endpoint.getClass().getSimpleName(),Integer.toString(endpoint.hashCode(),16));
}
@Override
public void incoming(EndPoint endpoint, ByteBuffer bytes)
{
if (DEBUG)
LOG.debug("{}@{} >>> {}%n",endpoint.getClass().getSimpleName(),Integer.toString(endpoint.hashCode(),16),BufferUtil.toDetailString(bytes));
}
@Override
public void outgoing(EndPoint endpoint, ByteBuffer bytes)
{
if (DEBUG)
LOG.debug("{}@{} <<< {}%n",endpoint.getClass().getSimpleName(),Integer.toString(endpoint.hashCode(),16),BufferUtil.toDetailString(bytes));
}
@Override
public void closed(EndPoint endpoint)
{
if (DEBUG)
LOG.debug("{}@{} closed%n",endpoint.getClass().getSimpleName(),Integer.toString(endpoint.hashCode(),16));
}
}
public static class DumpToFileFilter implements Filter
{
final ConcurrentHashMap<EndPoint,OutputStream> _in = new ConcurrentHashMap<>();
final ConcurrentHashMap<EndPoint,OutputStream> _out = new ConcurrentHashMap<>();
final File _directory;
final String _prefix;
final boolean _deleteOnExit;
public DumpToFileFilter()
{
this(new File(System.getProperty("java.io.tmpdir")+File.separator+"FilterConnection"),true);
}
public DumpToFileFilter(File directory, boolean deleteOnExit)
{
this(directory,"dump-",deleteOnExit);
}
public DumpToFileFilter(String prefix)
{
this(new File(System.getProperty("java.io.tmpdir")+File.separator+"FilterConnection"),prefix,true);
}
public DumpToFileFilter(
@Name("directory") File directory,
@Name("prefix") String prefix,
@Name("deleteOnExit") boolean deleteOnExit)
{
_directory=directory;
_prefix=prefix;
_deleteOnExit=deleteOnExit;
if (!_directory.exists() && !_directory.mkdirs())
throw new IllegalArgumentException("cannot create "+directory);
if (!_directory.isDirectory())
throw new IllegalArgumentException("not directory "+directory);
if (!_directory.canWrite())
throw new IllegalArgumentException("cannot write "+directory);
}
@Override
public void opened(EndPoint endpoint)
{
try
{
File in = new File(_directory,_prefix+Integer.toHexString(endpoint.hashCode())+".in");
File out = new File(_directory,_prefix+Integer.toHexString(endpoint.hashCode())+".out");
if (_deleteOnExit)
{
in.deleteOnExit();
out.deleteOnExit();
}
_in.put(endpoint,new FileOutputStream(in));
_out.put(endpoint,new FileOutputStream(out));
}
catch (FileNotFoundException e)
{
LOG.warn(e);
}
}
@Override
public void incoming(EndPoint endpoint, ByteBuffer bytes)
{
try
{
OutputStream out=_in.get(endpoint);
if (out!=null)
out.write(BufferUtil.toArray(bytes));
}
catch(IOException e)
{
LOG.warn(e);
}
}
@Override
public void outgoing(EndPoint endpoint, ByteBuffer bytes)
{
try
{
OutputStream out=_out.get(endpoint);
if (out!=null)
out.write(BufferUtil.toArray(bytes));
}
catch(IOException e)
{
LOG.warn(e);
}
}
@Override
public void closed(EndPoint endpoint)
{
try
{
OutputStream out=_in.remove(endpoint);
if (out!=null)
out.close();
}
catch(IOException e)
{
LOG.warn(e);
}
try
{
OutputStream out=_out.remove(endpoint);
if (out!=null)
out.close();
}
catch(IOException e)
{
LOG.warn(e);
}
}
}
private final ByteBufferPool _bufferPool;
private final FilteredEndPoint _filterEndPoint;
private final int _outputBufferSize;
private final List<Filter> _filters = new CopyOnWriteArrayList<>();
public FilterConnection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, int outputBufferSize)
{
super(endPoint, executor, false);
_bufferPool = byteBufferPool;
_filterEndPoint = newFilterEndPoint();
_outputBufferSize=outputBufferSize;
}
protected FilteredEndPoint newFilterEndPoint()
{
return new FilteredEndPoint();
}
public FilteredEndPoint getFilterEndPoint()
{
return _filterEndPoint;
}
public void addFilter(Filter filter)
{
_filters.add(filter);
}
public boolean removeFilter(Filter listener)
{
return _filters.remove(listener);
}
@Override
public void onOpen()
{
super.onOpen();
for (Filter filter: _filters)
filter.opened(getEndPoint());
getFilterEndPoint().getConnection().onOpen();
}
@Override
public void onClose()
{
for (Filter filter: _filters)
filter.closed(getEndPoint());
_filterEndPoint.getConnection().onClose();
super.onClose();
}
@Override
public int getMessagesIn()
{
return _filterEndPoint.getConnection().getMessagesIn();
}
@Override
public int getMessagesOut()
{
return _filterEndPoint.getConnection().getMessagesOut();
}
@Override
public void close()
{
getFilterEndPoint().getConnection().close();
}
/* ------------------------------------------------------------ */
@Override
public void onFillable()
{
if (DEBUG)
LOG.debug("onFillable enter {}", getEndPoint());
// wake up whoever is doing the fill or the flush so they can
// do all the filling, unwrapping, wrapping and flushing
_filterEndPoint.getFillInterest().fillable();
if (DEBUG)
LOG.debug("onFillable exit {}", getEndPoint());
}
/* ------------------------------------------------------------ */
@Override
public void onFillInterestedFailed(Throwable cause)
{
_filterEndPoint.getFillInterest().onFail(cause);
}
/* ------------------------------------------------------------ */
@Override
public String toString()
{
return String.format("%s@%x -> %s",
FilterConnection.class.getSimpleName(),
hashCode(),
_filterEndPoint.getConnection());
}
/* ------------------------------------------------------------ */
public class FilteredEndPoint extends AbstractEndPoint
{
private final Callback _writeCB = new Callback()
{
@Override
public void succeeded()
{
if (BufferUtil.isEmpty(_outBuffer))
{
_bufferPool.release(_outBuffer);
_outBuffer=null;
}
getWriteFlusher().completeWrite();
}
@Override
public void failed(Throwable x)
{
if (BufferUtil.isEmpty(_outBuffer))
{
_bufferPool.release(_outBuffer);
_outBuffer=null;
}
getWriteFlusher().onFail(x);
}
};
private ByteBuffer _outBuffer;
public FilteredEndPoint()
{
super(null,getEndPoint().getLocalAddress(), getEndPoint().getRemoteAddress());
setIdleTimeout(getEndPoint().getIdleTimeout());
}
@Override
public void setIdleTimeout(long idleTimeout)
{
super.setIdleTimeout(idleTimeout);
getEndPoint().setIdleTimeout(idleTimeout);
}
@Override
protected void onIncompleteFlush()
{
if (BufferUtil.isEmpty(_outBuffer))
{
_bufferPool.release(_outBuffer);
_outBuffer=null;
getWriteFlusher().completeWrite();
}
else
getEndPoint().write(_writeCB,_outBuffer);
}
@Override
protected boolean needsFill() throws IOException
{
FilterConnection.this.fillInterested();
return false;
}
@Override
public synchronized int fill(ByteBuffer buffer) throws IOException
{
if (DEBUG)
LOG.debug("{} fill enter", FilterConnection.this);
int orig=buffer.remaining();
int filled = getEndPoint().fill(buffer);
if (orig>0)
buffer.position(buffer.position()+orig);
for (Filter filter: _filters)
filter.incoming(getEndPoint() ,buffer);
if (orig>0)
buffer.position(buffer.position()-orig);
if (DEBUG)
LOG.debug("{} fill {} exit", FilterConnection.this,filled);
return filled;
}
@Override
public synchronized boolean flush(ByteBuffer... buffers) throws IOException
{
if (DEBUG)
LOG.debug("{} flush enter {}", FilterConnection.this, Arrays.toString(buffers));
if (BufferUtil.hasContent(_outBuffer))
return false;
if (_outBuffer==null)
_outBuffer=_bufferPool.acquire(_outputBufferSize,true);
// Take as much data as we can
boolean all_taken=true;
for (ByteBuffer buffer : buffers)
{
if (buffer==null)
continue;
BufferUtil.flipPutFlip(buffer,_outBuffer);
if (BufferUtil.hasContent(buffer))
{
all_taken=false;
break;
}
}
for (Filter filter: _filters)
filter.outgoing(getEndPoint() ,_outBuffer);
boolean flushed = getEndPoint().flush(_outBuffer);
if (BufferUtil.isEmpty(_outBuffer))
{
_bufferPool.release(_outBuffer);
_outBuffer=null;
}
if (DEBUG)
LOG.debug("{} flush exit, consumed {}", FilterConnection.this, flushed);
return all_taken && flushed;
}
@Override
public void shutdownOutput()
{
getEndPoint().shutdownOutput();
}
@Override
public boolean isOutputShutdown()
{
return getEndPoint().isOutputShutdown();
}
@Override
public void close()
{
getEndPoint().close();
}
@Override
public boolean isOpen()
{
return getEndPoint().isOpen();
}
@Override
public Object getTransport()
{
return getEndPoint();
}
@Override
public boolean isInputShutdown()
{
return getEndPoint().isInputShutdown();
}
public EndPoint getWrappedEndPoint()
{
return getEndPoint();
}
@Override
public String toString()
{
return super.toString()+"->"+getEndPoint().toString();
}
}
}

View File

@ -358,7 +358,6 @@ public class SslConnection extends AbstractConnection
_cannotAcceptMoreAppDataToFlush = true;
getEndPoint().write(_writeCallback, _encryptedOutput);
}
// TODO: use _fillRequiresFlushToProgress ?
else if (_sslEngine.getHandshakeStatus() == HandshakeStatus.NEED_UNWRAP)
{
// we are actually read blocked in order to write
@ -541,8 +540,6 @@ public class SslConnection extends AbstractConnection
if (net_filled < 0)
_sslEngine.closeInbound();
// TODO: do we need to check if there is something pending to write ?
// getWriteFlusher().completeWrite();
return 0;
case NEED_TASK:

View File

@ -18,16 +18,16 @@
package org.eclipse.jetty.io;
import java.nio.ByteBuffer;
import org.hamcrest.Matchers;
import org.junit.Test;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.nio.ByteBuffer;
import org.hamcrest.Matchers;
import org.junit.Test;
public class ArrayByteBufferPoolTest
{
@Test

View File

@ -18,6 +18,15 @@
package org.eclipse.jetty.io;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.concurrent.ExecutionException;
@ -34,15 +43,6 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@RunWith(AdvancedRunner.class)
public class ByteArrayEndPointTest
{

View File

@ -18,15 +18,15 @@
package org.eclipse.jetty.io;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.nio.ByteBuffer;
import org.eclipse.jetty.util.BufferUtil;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public abstract class EndPointTest<T extends EndPoint>
{
public static class EndPointPair<T>

View File

@ -1,50 +0,0 @@
//
// ========================================================================
// Copyright (c) 1995-2012 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//
package org.eclipse.jetty.io;
import java.nio.channels.SocketChannel;
import org.junit.Ignore;
// TODO ignore this test as it creates too many /tmp files and is not portable and does not even check the contents!
@Ignore
public class FilteredSelectChannelEndPointTest extends SelectChannelEndPointTest
{
public FilteredSelectChannelEndPointTest()
{
}
@Override
protected Connection newConnection(SocketChannel channel, EndPoint endpoint)
{
FilterConnection filter = new FilterConnection(new MappedByteBufferPool(),_threadPool,endpoint,8192);
filter.addFilter(new FilterConnection.DumpToFileFilter());
Connection connection= super.newConnection(null,filter.getFilterEndPoint());
filter.getFilterEndPoint().setConnection(connection);
return filter;
}
@Override
public void testBlockedReadIdle() throws Exception
{
super.testBlockedReadIdle();
}
}

View File

@ -18,6 +18,11 @@
package org.eclipse.jetty.io;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@ -39,11 +44,6 @@ import org.eclipse.jetty.util.IO;
import org.junit.Assert;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
public class IOTest
{
@Test

View File

@ -18,8 +18,12 @@
package org.eclipse.jetty.io;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.nio.ByteBuffer;
import java.util.Queue;

View File

@ -18,6 +18,10 @@
package org.eclipse.jetty.io;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.net.ServerSocket;
import java.net.Socket;
import java.nio.ByteBuffer;
@ -27,10 +31,6 @@ import java.nio.channels.SocketChannel;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
*
*/

View File

@ -18,6 +18,12 @@
package org.eclipse.jetty.io;
import static org.hamcrest.Matchers.greaterThan;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
@ -25,6 +31,7 @@ import java.net.Socket;
import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLEngineResult;
import javax.net.ssl.SSLEngineResult.HandshakeStatus;
@ -40,12 +47,6 @@ import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import static org.hamcrest.Matchers.greaterThan;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
public class SelectChannelEndPointSslTest extends SelectChannelEndPointTest
{

View File

@ -18,6 +18,12 @@
package org.eclipse.jetty.io;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.IOException;
@ -46,12 +52,6 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class SelectChannelEndPointTest
{
private static final Logger LOG = Log.getLogger(SelectChannelEndPointTest.class);
@ -220,7 +220,7 @@ public class SelectChannelEndPointTest
{
Socket client = newClient();
client.setSoTimeout(600000); // TODO: restore to smaller value
client.setSoTimeout(60000);
SocketChannel server = _connector.accept();
server.configureBlocking(false);

View File

@ -30,6 +30,7 @@ import java.nio.channels.SocketChannel;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLSocket;

View File

@ -18,6 +18,15 @@
package org.eclipse.jetty.io;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.when;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.WritePendingException;
@ -45,15 +54,6 @@ import org.mockito.invocation.InvocationOnMock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.stubbing.Answer;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
public class WriteFlusherTest
{

View File

@ -25,6 +25,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.Set;
import javax.security.auth.Subject;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.jaas;
import java.security.Principal;
import javax.security.auth.Subject;
import javax.security.auth.login.LoginContext;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.jaas.callback;
import java.io.IOException;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;

View File

@ -20,6 +20,7 @@ package org.eclipse.jetty.jaas.callback;
import java.io.IOException;
import java.util.Arrays;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.NameCallback;
import javax.security.auth.callback.PasswordCallback;

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.jaas.callback;
import java.util.List;
import javax.security.auth.callback.Callback;

View File

@ -25,6 +25,7 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.security.auth.Subject;
import javax.security.auth.callback.CallbackHandler;

View File

@ -24,6 +24,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.security.auth.Subject;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;

View File

@ -20,6 +20,7 @@ package org.eclipse.jetty.jaas.spi;
import java.sql.Connection;
import java.util.Map;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.security.auth.Subject;

View File

@ -21,6 +21,7 @@ package org.eclipse.jetty.jaas.spi;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Map;
import javax.security.auth.Subject;
import javax.security.auth.callback.CallbackHandler;

View File

@ -25,6 +25,7 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;

View File

@ -24,6 +24,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.security.auth.Subject;
import javax.security.auth.callback.CallbackHandler;

View File

@ -34,17 +34,15 @@ import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.eclipse.jetty.security.Authenticator;
import org.eclipse.jetty.security.IdentityService;
import org.eclipse.jetty.security.ServerAuthException;
import org.eclipse.jetty.security.UserAuthentication;
import org.eclipse.jetty.security.authentication.DeferredAuthentication;
import org.eclipse.jetty.security.authentication.LoginAuthenticator;
import org.eclipse.jetty.security.authentication.SessionAuthentication;
import org.eclipse.jetty.security.jaspi.modules.BaseAuthModule;
import org.eclipse.jetty.server.Authentication;
import org.eclipse.jetty.server.UserIdentity;
import org.eclipse.jetty.server.Authentication.User;
import org.eclipse.jetty.server.UserIdentity;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;

View File

@ -19,7 +19,6 @@
package org.eclipse.jetty.security.jaspi;
import java.security.Principal;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -34,10 +33,10 @@ import javax.security.auth.message.config.ServerAuthConfig;
import javax.servlet.ServletContext;
import org.eclipse.jetty.security.Authenticator;
import org.eclipse.jetty.security.Authenticator.AuthConfiguration;
import org.eclipse.jetty.security.DefaultAuthenticatorFactory;
import org.eclipse.jetty.security.IdentityService;
import org.eclipse.jetty.security.LoginService;
import org.eclipse.jetty.security.Authenticator.AuthConfiguration;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;

View File

@ -37,13 +37,13 @@ import javax.security.auth.message.module.ServerAuthModule;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.util.security.Credential;
import org.eclipse.jetty.util.security.Password;
import org.eclipse.jetty.security.authentication.LoginCallbackImpl;
import org.eclipse.jetty.security.jaspi.JaspiMessageInfo;
import org.eclipse.jetty.security.jaspi.callback.CredentialValidationCallback;
import org.eclipse.jetty.util.B64Code;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.security.Credential;
import org.eclipse.jetty.util.security.Password;
/**
* @deprecated use *ServerAuthentication

View File

@ -32,9 +32,9 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.util.security.Constraint;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.util.security.Constraint;
/**
* @deprecated use *ServerAuthentication

View File

@ -30,9 +30,9 @@ import javax.security.auth.message.MessageInfo;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.util.B64Code;
import org.eclipse.jetty.util.security.Constraint;
import org.eclipse.jetty.util.security.Password;
import org.eclipse.jetty.util.B64Code;
/**
* @deprecated use *ServerAuthentication

View File

@ -33,14 +33,14 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.util.security.Constraint;
import org.eclipse.jetty.util.security.Credential;
import org.eclipse.jetty.util.B64Code;
import org.eclipse.jetty.util.QuotedStringTokenizer;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.TypeUtil;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.util.security.Constraint;
import org.eclipse.jetty.util.security.Credential;
/**
* @deprecated use *ServerAuthentication

View File

@ -19,9 +19,6 @@
package org.eclipse.jetty.security.jaspi.modules;
import java.io.IOException;
import java.io.Serializable;
import java.security.Principal;
import java.util.Arrays;
import java.util.Map;
import java.util.Set;
@ -35,22 +32,18 @@ import javax.security.auth.message.MessagePolicy;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;
import org.eclipse.jetty.util.security.Constraint;
import org.eclipse.jetty.util.security.Password;
import org.eclipse.jetty.security.CrossContextPsuedoSession;
import org.eclipse.jetty.security.authentication.DeferredAuthentication;
import org.eclipse.jetty.security.authentication.LoginCallbackImpl;
import org.eclipse.jetty.security.authentication.SessionAuthentication;
import org.eclipse.jetty.security.jaspi.callback.CredentialValidationCallback;
import org.eclipse.jetty.server.Authentication;
import org.eclipse.jetty.server.UserIdentity;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.URIUtil;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.util.security.Constraint;
import org.eclipse.jetty.util.security.Password;
/**
* @deprecated use *ServerAuthentication

View File

@ -25,6 +25,7 @@ import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;
import java.util.Map;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import javax.management.remote.JMXConnectorServer;

View File

@ -30,7 +30,6 @@ import javax.management.MBeanServer;
import javax.management.ObjectInstance;
import javax.management.ObjectName;
import org.eclipse.jetty.util.component.AbstractLifeCycle;
import org.eclipse.jetty.util.component.Container;
import org.eclipse.jetty.util.component.ContainerLifeCycle;
import org.eclipse.jetty.util.component.Dumpable;

View File

@ -33,6 +33,7 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import javax.management.Attribute;
import javax.management.AttributeList;
import javax.management.AttributeNotFoundException;

View File

@ -18,7 +18,6 @@
package com.acme.jmx;
import com.acme.Derived;
import org.eclipse.jetty.jmx.ObjectMBean;
import org.eclipse.jetty.util.annotation.ManagedAttribute;
import org.eclipse.jetty.util.annotation.ManagedObject;
@ -26,6 +25,8 @@ import org.eclipse.jetty.util.annotation.ManagedOperation;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import com.acme.Derived;
@ManagedObject("Derived MBean Wrapper")
public class DerivedMBean extends ObjectMBean
{

View File

@ -18,12 +18,13 @@
package com.acme.jmx;
import com.acme.Managed;
import org.eclipse.jetty.jmx.ObjectMBean;
import org.eclipse.jetty.util.annotation.ManagedAttribute;
import org.eclipse.jetty.util.annotation.ManagedObject;
import org.eclipse.jetty.util.annotation.ManagedOperation;
import com.acme.Managed;
@ManagedObject("Managed MBean Wrapper")
public class ManagedMBean extends ObjectMBean
{

View File

@ -19,12 +19,12 @@
package org.eclipse.jetty.jmx;
import java.lang.management.ManagementFactory;
import javax.management.Attribute;
import javax.management.MBeanInfo;
import javax.management.MBeanOperationInfo;
import javax.management.MBeanParameterInfo;
import com.acme.Derived;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
@ -34,6 +34,8 @@ import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import com.acme.Derived;
public class ObjectMBeanTest
{

View File

@ -20,6 +20,7 @@
package org.eclipse.jetty.jndi;
import java.util.Iterator;
import javax.naming.Binding;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;

View File

@ -23,6 +23,7 @@ import java.io.IOException;
import java.util.Hashtable;
import java.util.Map;
import java.util.WeakHashMap;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NameParser;

View File

@ -20,6 +20,7 @@ package org.eclipse.jetty.jndi;
import java.lang.reflect.Method;
import java.sql.Statement;
import javax.sql.DataSource;
import org.eclipse.jetty.util.component.ContainerLifeCycle;

Some files were not shown because too many files have changed in this diff Show More