Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-4567-StdErrLog-throwable
This commit is contained in:
commit
3c6c9112de
|
@ -54,27 +54,18 @@ public class JettyJasperInitializer extends JasperInitializer
|
|||
super(context, namespaceAware, validation, blockExternal);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.apache.jasper.servlet.TldScanner#scan()
|
||||
*/
|
||||
@Override
|
||||
public void scan() throws IOException, SAXException
|
||||
{
|
||||
return; //do nothing
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.apache.jasper.servlet.TldScanner#getListeners()
|
||||
*/
|
||||
@Override
|
||||
public List<String> getListeners()
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.apache.jasper.servlet.TldScanner#scanJars()
|
||||
*/
|
||||
@Override
|
||||
public void scanJars()
|
||||
{
|
||||
|
|
|
@ -48,9 +48,6 @@ public class JettyTldPreScanned extends TldPreScanned
|
|||
_jettyPreScannedURLs = preScannedTlds;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.apache.jasper.servlet.TldPreScanned#scanJars()
|
||||
*/
|
||||
@Override
|
||||
public void scanJars()
|
||||
{
|
||||
|
|
|
@ -62,9 +62,6 @@ public class TestJettyJspServlet
|
|||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
|
||||
{
|
||||
|
|
|
@ -28,7 +28,6 @@ import java.util.LinkedList;
|
|||
import java.util.Map;
|
||||
import java.util.Queue;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
|
@ -94,10 +93,6 @@ public class SerialRestServlet extends AbstractRestServlet
|
|||
out.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
|
||||
* response)
|
||||
*/
|
||||
@Override
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
|
||||
{
|
||||
|
|
|
@ -332,9 +332,6 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
|||
_discoverableAnnotationHandlers.add(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.webapp.AbstractConfiguration#configure(org.eclipse.jetty.webapp.WebAppContext)
|
||||
*/
|
||||
@Override
|
||||
public void configure(WebAppContext context) throws Exception
|
||||
{
|
||||
|
@ -371,9 +368,6 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.webapp.AbstractConfiguration#postConfigure(org.eclipse.jetty.webapp.WebAppContext)
|
||||
*/
|
||||
@Override
|
||||
public void postConfigure(WebAppContext context) throws Exception
|
||||
{
|
||||
|
@ -563,9 +557,6 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
|||
return Integer.getInteger(MAX_SCAN_WAIT, DEFAULT_MAX_SCAN_WAIT).intValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.webapp.AbstractConfiguration#cloneConfigure(org.eclipse.jetty.webapp.WebAppContext, org.eclipse.jetty.webapp.WebAppContext)
|
||||
*/
|
||||
@Override
|
||||
public void cloneConfigure(WebAppContext template, WebAppContext context) throws Exception
|
||||
{
|
||||
|
|
|
@ -43,9 +43,6 @@ public class DeclareRolesAnnotationHandler extends AbstractIntrospectableAnnotat
|
|||
_context = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler#doHandle(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public void doHandle(Class clazz)
|
||||
{
|
||||
|
|
|
@ -42,9 +42,6 @@ public class MultiPartConfigAnnotationHandler extends AbstractIntrospectableAnno
|
|||
_context = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler#doHandle(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public void doHandle(Class clazz)
|
||||
{
|
||||
|
|
|
@ -43,11 +43,6 @@ public class ServletContainerInitializersStarter extends AbstractLifeCycle imple
|
|||
_context = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call the doStart method of the ServletContainerInitializers
|
||||
*
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
|
||||
*/
|
||||
@Override
|
||||
public void doStart()
|
||||
{
|
||||
|
|
|
@ -65,9 +65,6 @@ public class ServletSecurityAnnotationHandler extends AbstractIntrospectableAnno
|
|||
_context = wac;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.annotations.AnnotationIntrospector.IntrospectableAnnotationHandler#handle(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public void doHandle(Class clazz)
|
||||
{
|
||||
|
|
|
@ -54,9 +54,6 @@ public class WebFilterAnnotation extends DiscoveredAnnotation
|
|||
super(context, className, resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DiscoveredAnnotation#apply()
|
||||
*/
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
|
|
|
@ -54,9 +54,6 @@ public class WebListenerAnnotation extends DiscoveredAnnotation
|
|||
super(context, className, resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DiscoveredAnnotation#apply()
|
||||
*/
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
|
|
|
@ -57,9 +57,6 @@ public class WebServletAnnotation extends DiscoveredAnnotation
|
|||
super(context, className, resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DiscoveredAnnotation#apply()
|
||||
*/
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
|
|
|
@ -563,9 +563,6 @@ public class AntWebAppContext extends WebAppContext
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void doStart()
|
||||
{
|
||||
|
|
|
@ -49,9 +49,6 @@ public class JettyStopTask extends Task
|
|||
TaskLog.setTask(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.apache.tools.ant.Task#execute()
|
||||
*/
|
||||
@Override
|
||||
public void execute() throws BuildException
|
||||
{
|
||||
|
|
|
@ -254,9 +254,6 @@ public class ServerProxyImpl implements ServerProxy
|
|||
this.tempDirectory = tempDirectory;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.ant.utils.ServerProxy#start()
|
||||
*/
|
||||
@Override
|
||||
public void start()
|
||||
{
|
||||
|
@ -299,9 +296,6 @@ public class ServerProxyImpl implements ServerProxy
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.ant.utils.ServerProxy#getProxiedObject()
|
||||
*/
|
||||
@Override
|
||||
public Object getProxiedObject()
|
||||
{
|
||||
|
|
|
@ -70,11 +70,6 @@ public interface ConnectionPool extends Closeable
|
|||
*/
|
||||
boolean remove(Connection connection);
|
||||
|
||||
/**
|
||||
* Closes this ConnectionPool.
|
||||
*
|
||||
* @see #isClosed()
|
||||
*/
|
||||
@Override
|
||||
void close();
|
||||
|
||||
|
|
|
@ -228,6 +228,12 @@ public class HttpSenderOverHTTP extends HttpSender
|
|||
headerBuffer = byteBufferPool.acquire(httpClient.getRequestBufferSize(), useDirectByteBuffers);
|
||||
break;
|
||||
}
|
||||
case HEADER_OVERFLOW:
|
||||
{
|
||||
httpClient.getByteBufferPool().release(headerBuffer);
|
||||
headerBuffer = null;
|
||||
throw new IllegalArgumentException("Request header too large");
|
||||
}
|
||||
case NEED_CHUNK:
|
||||
{
|
||||
chunkBuffer = byteBufferPool.acquire(HttpGenerator.CHUNK_SIZE, useDirectByteBuffers);
|
||||
|
|
|
@ -81,9 +81,6 @@ public class PropertiesConfigurationManager implements ConfigurationManager, Dum
|
|||
_map.put(name, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.deploy.ConfigurationManager#getProperties()
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> getProperties()
|
||||
{
|
||||
|
|
|
@ -78,9 +78,6 @@ public class GCloudSessionDataStoreFactory extends AbstractSessionDataStoreFacto
|
|||
_namespace = namespace;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStoreFactory#getSessionDataStore(org.eclipse.jetty.server.session.SessionHandler)
|
||||
*/
|
||||
@Override
|
||||
public SessionDataStore getSessionDataStore(SessionHandler handler) throws Exception
|
||||
{
|
||||
|
|
|
@ -171,9 +171,6 @@ public class JettyHttpsExchange extends HttpsExchange implements JettyExchange
|
|||
return _delegate.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.sun.net.httpserver.HttpsExchange#getSSLSession()
|
||||
*/
|
||||
@Override
|
||||
public SSLSession getSSLSession()
|
||||
{
|
||||
|
|
|
@ -28,18 +28,12 @@ import static java.nio.charset.StandardCharsets.ISO_8859_1;
|
|||
public class Http1FieldPreEncoder implements HttpFieldPreEncoder
|
||||
{
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.http.HttpFieldPreEncoder#getHttpVersion()
|
||||
*/
|
||||
@Override
|
||||
public HttpVersion getHttpVersion()
|
||||
{
|
||||
return HttpVersion.HTTP_1_0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.http.HttpFieldPreEncoder#getEncodedField(org.eclipse.jetty.http.HttpHeader, java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public byte[] getEncodedField(HttpHeader header, String headerString, String value)
|
||||
{
|
||||
|
|
|
@ -74,6 +74,7 @@ public class HttpGenerator
|
|||
NEED_CHUNK, // Need a small chunk buffer of CHUNK_SIZE
|
||||
NEED_INFO, // Need the request/response metadata info
|
||||
NEED_HEADER, // Need a buffer to build HTTP headers into
|
||||
HEADER_OVERFLOW, // The header buffer overflowed
|
||||
NEED_CHUNK_TRAILER, // Need a large chunk buffer for last chunk and trailers
|
||||
FLUSH, // The buffers previously generated should be flushed
|
||||
CONTINUE, // Continue generating the message
|
||||
|
@ -250,7 +251,8 @@ public class HttpGenerator
|
|||
}
|
||||
catch (BufferOverflowException e)
|
||||
{
|
||||
throw new BadMessageException(INTERNAL_SERVER_ERROR_500, "Request header too large", e);
|
||||
LOG.ignore(e);
|
||||
return Result.HEADER_OVERFLOW;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -427,7 +429,8 @@ public class HttpGenerator
|
|||
}
|
||||
catch (BufferOverflowException e)
|
||||
{
|
||||
throw new BadMessageException(INTERNAL_SERVER_ERROR_500, "Response header too large", e);
|
||||
LOG.ignore(e);
|
||||
return Result.HEADER_OVERFLOW;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
@ -109,10 +109,6 @@ public class MetaData implements Iterable<HttpField>
|
|||
return _contentLength;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return an iterator over the HTTP fields
|
||||
* @see #getFields()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<HttpField> iterator()
|
||||
{
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class HttpGeneratorClientTest
|
||||
|
@ -122,6 +123,42 @@ public class HttpGeneratorClientTest
|
|||
assertThat(out, Matchers.not(Matchers.containsString("Null:")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHeaderOverflow() throws Exception
|
||||
{
|
||||
HttpGenerator gen = new HttpGenerator();
|
||||
|
||||
Info info = new Info("GET", "/index.html");
|
||||
info.getFields().add("Host", "localhost");
|
||||
info.getFields().add("Field", "SomeWhatLongValue");
|
||||
info.setHttpVersion(HttpVersion.HTTP_1_0);
|
||||
|
||||
HttpGenerator.Result result = gen.generateRequest(info, null, null, null, true);
|
||||
assertEquals(HttpGenerator.Result.NEED_HEADER, result);
|
||||
|
||||
ByteBuffer header = BufferUtil.allocate(16);
|
||||
result = gen.generateRequest(info, header, null, null, true);
|
||||
assertEquals(HttpGenerator.Result.HEADER_OVERFLOW, result);
|
||||
|
||||
header = BufferUtil.allocate(2048);
|
||||
result = gen.generateRequest(info, header, null, null, true);
|
||||
assertEquals(HttpGenerator.Result.FLUSH, result);
|
||||
assertEquals(HttpGenerator.State.COMPLETING, gen.getState());
|
||||
assertFalse(gen.isChunking());
|
||||
String out = BufferUtil.toString(header);
|
||||
BufferUtil.clear(header);
|
||||
|
||||
result = gen.generateResponse(null, false, null, null, null, false);
|
||||
assertEquals(HttpGenerator.Result.SHUTDOWN_OUT, result);
|
||||
assertEquals(HttpGenerator.State.END, gen.getState());
|
||||
assertFalse(gen.isChunking());
|
||||
|
||||
assertEquals(0, gen.getContentPrepared());
|
||||
assertThat(out, Matchers.containsString("GET /index.html HTTP/1.0"));
|
||||
assertThat(out, Matchers.not(Matchers.containsString("Content-Length")));
|
||||
assertThat(out, Matchers.containsString("Field: SomeWhatLongValue"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPOSTRequestNoContent() throws Exception
|
||||
{
|
||||
|
|
|
@ -156,6 +156,12 @@ public class HttpGeneratorServerHTTPTest
|
|||
header = BufferUtil.allocate(2048);
|
||||
continue;
|
||||
|
||||
case HEADER_OVERFLOW:
|
||||
if (header.capacity() >= 8192)
|
||||
throw new BadMessageException(500, "Header too large");
|
||||
header = BufferUtil.allocate(8192);
|
||||
continue;
|
||||
|
||||
case NEED_CHUNK:
|
||||
chunk = BufferUtil.allocate(HttpGenerator.CHUNK_SIZE);
|
||||
continue;
|
||||
|
|
|
@ -110,6 +110,38 @@ public class HttpGeneratorServerTest
|
|||
assertThat(response, containsString("\r\n0123456789"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHeaderOverflow() throws Exception
|
||||
{
|
||||
HttpGenerator gen = new HttpGenerator();
|
||||
|
||||
MetaData.Response info = new MetaData.Response(HttpVersion.HTTP_1_1, 302, null, new HttpFields(), 0);
|
||||
info.getFields().add("Location", "http://somewhere/else");
|
||||
|
||||
HttpGenerator.Result result = gen.generateResponse(info, false, null, null, null, true);
|
||||
assertEquals(HttpGenerator.Result.NEED_HEADER, result);
|
||||
|
||||
ByteBuffer header = BufferUtil.allocate(16);
|
||||
result = gen.generateResponse(info, false, header, null, null, true);
|
||||
assertEquals(HttpGenerator.Result.HEADER_OVERFLOW, result);
|
||||
|
||||
header = BufferUtil.allocate(8096);
|
||||
result = gen.generateResponse(info, false, header, null, null, true);
|
||||
assertEquals(HttpGenerator.Result.FLUSH, result);
|
||||
assertEquals(HttpGenerator.State.COMPLETING, gen.getState());
|
||||
String response = BufferUtil.toString(header);
|
||||
BufferUtil.clear(header);
|
||||
|
||||
result = gen.generateResponse(null, false, null, null, null, false);
|
||||
assertEquals(HttpGenerator.Result.DONE, result);
|
||||
assertEquals(HttpGenerator.State.END, gen.getState());
|
||||
|
||||
assertEquals(0, gen.getContentPrepared());
|
||||
|
||||
assertThat(response, containsString("HTTP/1.1 302 Found"));
|
||||
assertThat(response, containsString("Location: http://somewhere/else"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test204() throws Exception
|
||||
{
|
||||
|
|
|
@ -31,18 +31,12 @@ import org.eclipse.jetty.util.BufferUtil;
|
|||
public class HpackFieldPreEncoder implements HttpFieldPreEncoder
|
||||
{
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.http.HttpFieldPreEncoder#getHttpVersion()
|
||||
*/
|
||||
@Override
|
||||
public HttpVersion getHttpVersion()
|
||||
{
|
||||
return HttpVersion.HTTP_2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.http.HttpFieldPreEncoder#getEncodedField(org.eclipse.jetty.http.HttpHeader, java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public byte[] getEncodedField(HttpHeader header, String name, String value)
|
||||
{
|
||||
|
|
|
@ -82,9 +82,6 @@ public class InfinispanSessionDataStore extends AbstractSessionDataStore
|
|||
_queryManager = queryManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStore#load(String)
|
||||
*/
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
|
|
|
@ -49,9 +49,6 @@ public class InfinispanSessionDataStoreFactory extends AbstractSessionDataStoreF
|
|||
_infinispanIdleTimeoutSec = infinispanIdleTimeoutSec;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStoreFactory#getSessionDataStore(org.eclipse.jetty.server.session.SessionHandler)
|
||||
*/
|
||||
@Override
|
||||
public SessionDataStore getSessionDataStore(SessionHandler handler) throws Exception
|
||||
{
|
||||
|
|
|
@ -355,9 +355,6 @@ public class ByteArrayEndPoint extends AbstractEndPoint
|
|||
return getOutput().position() > 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.io.EndPoint#fill(org.eclipse.io.Buffer)
|
||||
*/
|
||||
@Override
|
||||
public int fill(ByteBuffer buffer) throws IOException
|
||||
{
|
||||
|
@ -400,9 +397,6 @@ public class ByteArrayEndPoint extends AbstractEndPoint
|
|||
return filled;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.io.EndPoint#flush(org.eclipse.io.Buffer, org.eclipse.io.Buffer, org.eclipse.io.Buffer)
|
||||
*/
|
||||
@Override
|
||||
public boolean flush(ByteBuffer... buffers) throws IOException
|
||||
{
|
||||
|
@ -450,9 +444,6 @@ public class ByteArrayEndPoint extends AbstractEndPoint
|
|||
return flushed;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void reset()
|
||||
{
|
||||
|
@ -465,9 +456,6 @@ public class ByteArrayEndPoint extends AbstractEndPoint
|
|||
super.reset();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.io.EndPoint#getConnection()
|
||||
*/
|
||||
@Override
|
||||
public Object getTransport()
|
||||
{
|
||||
|
|
|
@ -179,10 +179,6 @@ public abstract class AbstractLoginModule implements LoginModule
|
|||
this.commitState = commitState;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws LoginException if unable to abort
|
||||
* @see javax.security.auth.spi.LoginModule#abort()
|
||||
*/
|
||||
@Override
|
||||
public boolean abort() throws LoginException
|
||||
{
|
||||
|
|
|
@ -94,9 +94,6 @@ public class JaspiAuthenticator extends LoginAuthenticator
|
|||
return "JASPI";
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.authentication.LoginAuthenticator#login(java.lang.String, java.lang.Object, javax.servlet.ServletRequest)
|
||||
*/
|
||||
@Override
|
||||
public UserIdentity login(String username, Object password, ServletRequest request)
|
||||
{
|
||||
|
|
|
@ -69,18 +69,12 @@ public class JaspiTest
|
|||
_roles.put(username, roles);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.AbstractLoginService#loadRoleInfo(org.eclipse.jetty.security.AbstractLoginService.UserPrincipal)
|
||||
*/
|
||||
@Override
|
||||
protected String[] loadRoleInfo(UserPrincipal user)
|
||||
{
|
||||
return _roles.get(user.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.AbstractLoginService#loadUserInfo(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
protected UserPrincipal loadUserInfo(String username)
|
||||
{
|
||||
|
|
|
@ -98,44 +98,29 @@ public class localContextRoot implements Context
|
|||
_env = new Hashtable(env);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#close()
|
||||
*/
|
||||
@Override
|
||||
public void close() throws NamingException
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#getNameInNamespace()
|
||||
*/
|
||||
@Override
|
||||
public String getNameInNamespace() throws NamingException
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#destroySubcontext(javax.naming.Name)
|
||||
*/
|
||||
@Override
|
||||
public void destroySubcontext(Name name) throws NamingException
|
||||
{
|
||||
__root.destroySubcontext(getSuffix(name));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#destroySubcontext(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void destroySubcontext(String name) throws NamingException
|
||||
{
|
||||
destroySubcontext(__root.getNameParser("").parse(getSuffix(name)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#getEnvironment()
|
||||
*/
|
||||
@Override
|
||||
public Hashtable getEnvironment() throws NamingException
|
||||
{
|
||||
|
@ -186,9 +171,6 @@ public class localContextRoot implements Context
|
|||
return (Context)ctx;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#unbind(javax.naming.Name)
|
||||
*/
|
||||
@Override
|
||||
public void unbind(Name name) throws NamingException
|
||||
{
|
||||
|
@ -219,27 +201,18 @@ public class localContextRoot implements Context
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#unbind(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void unbind(String name) throws NamingException
|
||||
{
|
||||
unbind(__root.getNameParser("").parse(getSuffix(name)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#lookupLink(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Object lookupLink(String name) throws NamingException
|
||||
{
|
||||
return lookupLink(__root.getNameParser("").parse(getSuffix(name)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#lookupLink(javax.naming.Name)
|
||||
*/
|
||||
@Override
|
||||
public Object lookupLink(Name name) throws NamingException
|
||||
{
|
||||
|
@ -292,18 +265,12 @@ public class localContextRoot implements Context
|
|||
return getContext(cname).lookup(cname.getSuffix(1));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#removeFromEnvironment(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Object removeFromEnvironment(String propName) throws NamingException
|
||||
{
|
||||
return _env.remove(propName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#lookup(javax.naming.Name)
|
||||
*/
|
||||
@Override
|
||||
public Object lookup(Name name) throws NamingException
|
||||
{
|
||||
|
@ -370,27 +337,18 @@ public class localContextRoot implements Context
|
|||
return getContext(cname).lookup(cname.getSuffix(1));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#lookup(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Object lookup(String name) throws NamingException
|
||||
{
|
||||
return lookup(__root.getNameParser("").parse(getSuffix(name)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#bind(java.lang.String, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void bind(String name, Object obj) throws NamingException
|
||||
{
|
||||
bind(__root.getNameParser("").parse(getSuffix(name)), obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#bind(javax.naming.Name, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void bind(Name name, Object obj) throws NamingException
|
||||
{
|
||||
|
@ -428,9 +386,6 @@ public class localContextRoot implements Context
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#rebind(javax.naming.Name, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void rebind(Name name, Object obj) throws NamingException
|
||||
{
|
||||
|
@ -468,36 +423,24 @@ public class localContextRoot implements Context
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#rebind(java.lang.String, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void rebind(String name, Object obj) throws NamingException
|
||||
{
|
||||
rebind(__root.getNameParser("").parse(getSuffix(name)), obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#rename(javax.naming.Name, javax.naming.Name)
|
||||
*/
|
||||
@Override
|
||||
public void rename(Name oldName, Name newName) throws NamingException
|
||||
{
|
||||
throw new OperationNotSupportedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#rename(java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void rename(String oldName, String newName) throws NamingException
|
||||
{
|
||||
throw new OperationNotSupportedException();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#createSubcontext(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Context createSubcontext(String name) throws NamingException
|
||||
{
|
||||
|
@ -512,9 +455,6 @@ public class localContextRoot implements Context
|
|||
return createSubcontext(__root.getNameParser("").parse(name));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#createSubcontext(javax.naming.Name)
|
||||
*/
|
||||
@Override
|
||||
public Context createSubcontext(Name name) throws NamingException
|
||||
{
|
||||
|
@ -557,64 +497,42 @@ public class localContextRoot implements Context
|
|||
return getContext(cname).createSubcontext(cname.getSuffix(1));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#getNameParser(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public NameParser getNameParser(String name) throws NamingException
|
||||
{
|
||||
return __root.getNameParser(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#getNameParser(javax.naming.Name)
|
||||
*/
|
||||
@Override
|
||||
public NameParser getNameParser(Name name) throws NamingException
|
||||
{
|
||||
return __root.getNameParser(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#list(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public NamingEnumeration list(String name) throws NamingException
|
||||
{
|
||||
return __root.list(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#list(javax.naming.Name)
|
||||
*/
|
||||
@Override
|
||||
public NamingEnumeration list(Name name) throws NamingException
|
||||
{
|
||||
return __root.list(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#listBindings(javax.naming.Name)
|
||||
*/
|
||||
@Override
|
||||
public NamingEnumeration listBindings(Name name) throws NamingException
|
||||
{
|
||||
return __root.listBindings(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#listBindings(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public NamingEnumeration listBindings(String name) throws NamingException
|
||||
{
|
||||
return __root.listBindings(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#addToEnvironment(java.lang.String,
|
||||
* java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Object addToEnvironment(String propName, Object propVal)
|
||||
throws NamingException
|
||||
|
@ -622,9 +540,6 @@ public class localContextRoot implements Context
|
|||
return _env.put(propName, propVal);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#composeName(java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String composeName(String name, String prefix)
|
||||
throws NamingException
|
||||
|
@ -632,10 +547,6 @@ public class localContextRoot implements Context
|
|||
return __root.composeName(name, prefix);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.naming.Context#composeName(javax.naming.Name,
|
||||
* javax.naming.Name)
|
||||
*/
|
||||
@Override
|
||||
public Name composeName(Name name, Name prefix) throws NamingException
|
||||
{
|
||||
|
|
|
@ -165,9 +165,6 @@ public class JettyDistroForker extends AbstractForker
|
|||
this.baseDir = baseDir;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.maven.plugin.AbstractForker#createCommand()
|
||||
*/
|
||||
@Override
|
||||
protected ProcessBuilder createCommand()
|
||||
{
|
||||
|
@ -324,9 +321,6 @@ public class JettyDistroForker extends AbstractForker
|
|||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.nio.file.SimpleFileVisitor#visitFile(java.lang.Object, java.nio.file.attribute.BasicFileAttributes)
|
||||
*/
|
||||
@Override
|
||||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException
|
||||
{
|
||||
|
|
|
@ -83,9 +83,6 @@ public class MemcachedSessionDataMapFactory implements SessionDataMapFactory
|
|||
_heartbeats = heartbeats;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataMapFactory#getSessionDataMap()
|
||||
*/
|
||||
@Override
|
||||
public SessionDataMap getSessionDataMap()
|
||||
{
|
||||
|
|
|
@ -194,9 +194,6 @@ public class AnnotationConfiguration extends org.eclipse.jetty.annotations.Annot
|
|||
parseBundle(context, parser, webbundle, webbundle);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.annotations.AnnotationConfiguration#parseWebInfClasses(org.eclipse.jetty.webapp.WebAppContext, org.eclipse.jetty.annotations.AnnotationParser)
|
||||
*/
|
||||
@Override
|
||||
public void parseWebInfClasses(WebAppContext context, org.eclipse.jetty.annotations.AnnotationParser parser)
|
||||
throws Exception
|
||||
|
|
|
@ -208,9 +208,6 @@ public abstract class AbstractContextProvider extends AbstractLifeCycle implemen
|
|||
return _serverWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.deploy.AppProvider#createContextHandler(org.eclipse.jetty.deploy.App)
|
||||
*/
|
||||
@Override
|
||||
public ContextHandler createContextHandler(App app) throws Exception
|
||||
{
|
||||
|
|
|
@ -530,9 +530,6 @@ public abstract class AbstractWebAppProvider extends AbstractLifeCycle implement
|
|||
return _deploymentManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.deploy.AppProvider#setDeploymentManager(org.eclipse.jetty.deploy.DeploymentManager)
|
||||
*/
|
||||
@Override
|
||||
public void setDeploymentManager(DeploymentManager deploymentManager)
|
||||
{
|
||||
|
|
|
@ -64,9 +64,6 @@ public class BundleContextProvider extends AbstractContextProvider implements Bu
|
|||
_managedServerName = managedServerName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.osgi.util.tracker.BundleTracker#addingBundle(org.osgi.framework.Bundle, org.osgi.framework.BundleEvent)
|
||||
*/
|
||||
@Override
|
||||
public Object addingBundle(Bundle bundle, BundleEvent event)
|
||||
{
|
||||
|
@ -87,9 +84,6 @@ public class BundleContextProvider extends AbstractContextProvider implements Bu
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.osgi.util.tracker.BundleTracker#removedBundle(org.osgi.framework.Bundle, org.osgi.framework.BundleEvent, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void removedBundle(Bundle bundle, BundleEvent event, Object object)
|
||||
{
|
||||
|
|
|
@ -64,9 +64,6 @@ public class BundleWebAppProvider extends AbstractWebAppProvider implements Bund
|
|||
_managedServerName = managedServerName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.osgi.util.tracker.BundleTracker#addingBundle(org.osgi.framework.Bundle, org.osgi.framework.BundleEvent)
|
||||
*/
|
||||
@Override
|
||||
public Object addingBundle(Bundle bundle, BundleEvent event)
|
||||
{
|
||||
|
@ -87,9 +84,6 @@ public class BundleWebAppProvider extends AbstractWebAppProvider implements Bund
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.osgi.util.tracker.BundleTracker#removedBundle(org.osgi.framework.Bundle, org.osgi.framework.BundleEvent, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void removedBundle(Bundle bundle, BundleEvent event, Object object)
|
||||
{
|
||||
|
@ -109,9 +103,6 @@ public class BundleWebAppProvider extends AbstractWebAppProvider implements Bund
|
|||
super(wrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
|
||||
*/
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
|
@ -124,9 +115,6 @@ public class BundleWebAppProvider extends AbstractWebAppProvider implements Bund
|
|||
super.doStart();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStop()
|
||||
*/
|
||||
@Override
|
||||
protected void doStop() throws Exception
|
||||
{
|
||||
|
|
|
@ -66,9 +66,6 @@ public class ServiceContextProvider extends AbstractContextProvider implements S
|
|||
super(bundleContext, filter, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.osgi.util.tracker.ServiceTracker#addingService(org.osgi.framework.ServiceReference)
|
||||
*/
|
||||
@Override
|
||||
public Object addingService(ServiceReference reference)
|
||||
{
|
||||
|
@ -77,9 +74,6 @@ public class ServiceContextProvider extends AbstractContextProvider implements S
|
|||
return h;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.osgi.util.tracker.ServiceTracker#modifiedService(org.osgi.framework.ServiceReference, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void modifiedService(ServiceReference reference, Object service)
|
||||
{
|
||||
|
@ -87,9 +81,6 @@ public class ServiceContextProvider extends AbstractContextProvider implements S
|
|||
addingService(reference);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.osgi.util.tracker.ServiceTracker#removedService(org.osgi.framework.ServiceReference, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void removedService(ServiceReference reference, Object service)
|
||||
{
|
||||
|
|
|
@ -72,9 +72,6 @@ public class ServiceWebAppProvider extends AbstractWebAppProvider implements Ser
|
|||
super(bundleContext, filter, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.osgi.util.tracker.ServiceTracker#addingService(org.osgi.framework.ServiceReference)
|
||||
*/
|
||||
@Override
|
||||
public Object addingService(ServiceReference reference)
|
||||
{
|
||||
|
@ -83,9 +80,6 @@ public class ServiceWebAppProvider extends AbstractWebAppProvider implements Ser
|
|||
return wac;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.osgi.util.tracker.ServiceTracker#modifiedService(org.osgi.framework.ServiceReference, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void modifiedService(ServiceReference reference, Object service)
|
||||
{
|
||||
|
@ -93,9 +87,6 @@ public class ServiceWebAppProvider extends AbstractWebAppProvider implements Ser
|
|||
addingService(reference);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.osgi.util.tracker.ServiceTracker#removedService(org.osgi.framework.ServiceReference, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void removedService(ServiceReference reference, Object service)
|
||||
{
|
||||
|
@ -229,9 +220,6 @@ public class ServiceWebAppProvider extends AbstractWebAppProvider implements Ser
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
|
||||
*/
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
|
@ -251,9 +239,6 @@ public class ServiceWebAppProvider extends AbstractWebAppProvider implements Ser
|
|||
super.doStart();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStop()
|
||||
*/
|
||||
@Override
|
||||
protected void doStop() throws Exception
|
||||
{
|
||||
|
|
|
@ -39,9 +39,6 @@ public class JettyServerServiceTracker implements ServiceTrackerCustomizer
|
|||
{
|
||||
private static Logger LOG = Log.getLogger(JettyServerServiceTracker.class.getName());
|
||||
|
||||
/**
|
||||
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
|
||||
*/
|
||||
@Override
|
||||
public Object addingService(ServiceReference sr)
|
||||
{
|
||||
|
@ -73,9 +70,6 @@ public class JettyServerServiceTracker implements ServiceTrackerCustomizer
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(org.osgi.framework.ServiceReference, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void modifiedService(ServiceReference reference, Object service)
|
||||
{
|
||||
|
@ -83,9 +77,6 @@ public class JettyServerServiceTracker implements ServiceTrackerCustomizer
|
|||
addingService(reference);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#removedService(org.osgi.framework.ServiceReference, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void removedService(ServiceReference reference, Object service)
|
||||
{
|
||||
|
|
|
@ -52,9 +52,6 @@ public class FakeURLClassLoader extends URLClassLoader
|
|||
return _jars;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
|
|
@ -38,9 +38,6 @@ public class ServerConnectorListener extends AbstractLifeCycleListener
|
|||
private Path _filePath;
|
||||
private String _sysPropertyName;
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener#lifeCycleStarted(org.eclipse.jetty.util.component.LifeCycle)
|
||||
*/
|
||||
@Override
|
||||
public void lifeCycleStarted(LifeCycle event)
|
||||
{
|
||||
|
|
|
@ -49,9 +49,6 @@ public class Activator implements BundleActivator
|
|||
server.getConnectors()[0].addEventListener(new AbstractLifeCycleListener()
|
||||
{
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener#lifeCycleStarted(org.eclipse.jetty.util.component.LifeCycle)
|
||||
*/
|
||||
@Override
|
||||
public void lifeCycleStarted(LifeCycle event)
|
||||
{
|
||||
|
|
|
@ -45,9 +45,6 @@ public class Activator implements BundleActivator
|
|||
public static class TestServlet extends HttpServlet
|
||||
{
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
|
||||
{
|
||||
|
|
|
@ -147,16 +147,17 @@ public class TestOSGiUtil
|
|||
res.add(mavenBundle().groupId("org.eclipse.jetty").artifactId("jetty-plus").versionAsInProject().start());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty").artifactId("jetty-annotations").versionAsInProject().start());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-core").versionAsInProject().start());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-jetty-api").versionAsInProject().start());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-jetty-common").versionAsInProject().start());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-servlet").versionAsInProject().start());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-util").versionAsInProject().start());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-jetty-api").versionAsInProject().start());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-jetty-server").versionAsInProject().start());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-jetty-client").versionAsInProject().start());
|
||||
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-javax-common").versionAsInProject().noStart());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-javax-client").versionAsInProject().noStart());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-javax-server").versionAsInProject().noStart());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-jetty-common").versionAsInProject().start());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.toolchain").artifactId("jetty-javax-websocket-api").versionAsInProject().noStart());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-javax-server").versionAsInProject().noStart());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-javax-client").versionAsInProject().noStart());
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.websocket").artifactId("websocket-javax-common").versionAsInProject().noStart());
|
||||
|
||||
res.add(mavenBundle().groupId("org.eclipse.jetty.osgi").artifactId("jetty-osgi-boot").versionAsInProject().start());
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -69,9 +69,6 @@ public class PlusDescriptorProcessor extends IterativeDescriptorProcessor
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.webapp.IterativeDescriptorProcessor#start(WebAppContext, org.eclipse.jetty.webapp.Descriptor)
|
||||
*/
|
||||
@Override
|
||||
public void start(WebAppContext context, Descriptor descriptor)
|
||||
{
|
||||
|
@ -98,9 +95,6 @@ public class PlusDescriptorProcessor extends IterativeDescriptorProcessor
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void end(WebAppContext context, Descriptor descriptor)
|
||||
{
|
||||
|
|
|
@ -65,18 +65,12 @@ public class QuickStartDescriptorProcessor extends IterativeDescriptorProcessor
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.webapp.IterativeDescriptorProcessor#start(org.eclipse.jetty.webapp.WebAppContext, org.eclipse.jetty.webapp.Descriptor)
|
||||
*/
|
||||
@Override
|
||||
public void start(WebAppContext context, Descriptor descriptor)
|
||||
{
|
||||
_originAttributeName = context.getInitParameter(QuickStartGeneratorConfiguration.ORIGIN);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.webapp.IterativeDescriptorProcessor#end(org.eclipse.jetty.webapp.WebAppContext, org.eclipse.jetty.webapp.Descriptor)
|
||||
*/
|
||||
@Override
|
||||
public void end(WebAppContext context, Descriptor descriptor)
|
||||
{
|
||||
|
|
|
@ -27,9 +27,6 @@ import javax.servlet.http.HttpServletResponse;
|
|||
public class FooServlet extends HttpServlet
|
||||
{
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
|
||||
{
|
||||
|
|
|
@ -70,10 +70,6 @@ public class CookiePatternRule extends PatternRule
|
|||
_value = value;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.jetty.server.server.handler.rules.RuleBase#apply(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
public String apply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException
|
||||
{
|
||||
|
|
|
@ -57,9 +57,6 @@ public abstract class PatternRule extends Rule
|
|||
_pattern = pattern;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.jetty.server.server.handler.rules.RuleBase#matchAndApply(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
public String matchAndApply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException
|
||||
{
|
||||
|
|
|
@ -68,10 +68,6 @@ public class ResponsePatternRule extends PatternRule
|
|||
_message = message;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.jetty.server.server.handler.rules.RuleBase#apply(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
public String apply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException
|
||||
{
|
||||
|
|
|
@ -293,9 +293,6 @@ public class RewriteHandler extends HandlerWrapper
|
|||
_dispatchTypes = EnumSet.copyOf(Arrays.asList(types));
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.jetty.server.handler.HandlerWrapper#handle(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, int)
|
||||
*/
|
||||
@Override
|
||||
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
|
||||
{
|
||||
|
|
|
@ -75,9 +75,6 @@ public class RewriteRegexRule extends RegexRule implements Rule.ApplyURI
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.jetty.server.handler.rules.RegexRule#apply(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.util.regex.Matcher)
|
||||
*/
|
||||
@Override
|
||||
public String apply(String target, HttpServletRequest request, HttpServletResponse response, Matcher matcher) throws IOException
|
||||
{
|
||||
|
|
|
@ -107,9 +107,6 @@ public abstract class AbstractLoginService extends ContainerLifeCycle implements
|
|||
addBean(_identityService);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.LoginService#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
|
@ -148,9 +145,6 @@ public abstract class AbstractLoginService extends ContainerLifeCycle implements
|
|||
return String.format("%s@%x[%s]", this.getClass().getSimpleName(), hashCode(), _name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.LoginService#login(java.lang.String, java.lang.Object, javax.servlet.ServletRequest)
|
||||
*/
|
||||
@Override
|
||||
public UserIdentity login(String username, Object credentials, ServletRequest request)
|
||||
{
|
||||
|
@ -178,9 +172,6 @@ public abstract class AbstractLoginService extends ContainerLifeCycle implements
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.LoginService#validate(org.eclipse.jetty.server.UserIdentity)
|
||||
*/
|
||||
@Override
|
||||
public boolean validate(UserIdentity user)
|
||||
{
|
||||
|
@ -200,18 +191,12 @@ public abstract class AbstractLoginService extends ContainerLifeCycle implements
|
|||
throw new IllegalStateException("UserPrincipal not KnownUser"); //can't validate
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.LoginService#getIdentityService()
|
||||
*/
|
||||
@Override
|
||||
public IdentityService getIdentityService()
|
||||
{
|
||||
return _identityService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.LoginService#logout(org.eclipse.jetty.server.UserIdentity)
|
||||
*/
|
||||
@Override
|
||||
public void logout(UserIdentity user)
|
||||
{
|
||||
|
|
|
@ -352,9 +352,6 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
|
|||
_roles.addAll(roles);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.ConstraintAware#addConstraintMapping(org.eclipse.jetty.security.ConstraintMapping)
|
||||
*/
|
||||
@Override
|
||||
public void addConstraintMapping(ConstraintMapping mapping)
|
||||
{
|
||||
|
@ -377,9 +374,6 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.ConstraintAware#addRole(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void addRole(String role)
|
||||
{
|
||||
|
@ -399,9 +393,6 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.SecurityHandler#doStart()
|
||||
*/
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
|
@ -677,9 +668,6 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
|
|||
return constraintInfo != null && ((RoleInfo)constraintInfo).isChecked();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.SecurityHandler#checkWebResourcePermissions(java.lang.String, org.eclipse.jetty.server.Request, org.eclipse.jetty.server.Response, java.lang.Object, org.eclipse.jetty.server.UserIdentity)
|
||||
*/
|
||||
@Override
|
||||
protected boolean checkWebResourcePermissions(String pathInContext, Request request, Response response, Object constraintInfo, UserIdentity userIdentity)
|
||||
throws IOException
|
||||
|
@ -735,9 +723,6 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
|
|||
DumpableCollection.from("constraints", _constraintMappings));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.ConstraintAware#setDenyUncoveredHttpMethods(boolean)
|
||||
*/
|
||||
@Override
|
||||
public void setDenyUncoveredHttpMethods(boolean deny)
|
||||
{
|
||||
|
|
|
@ -150,9 +150,6 @@ public class HashLoginService extends AbstractLoginService
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
|
||||
*/
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
|
@ -191,9 +188,6 @@ public class HashLoginService extends AbstractLoginService
|
|||
return _userStoreAutoCreate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStop()
|
||||
*/
|
||||
@Override
|
||||
protected void doStop() throws Exception
|
||||
{
|
||||
|
|
|
@ -262,9 +262,6 @@ public class JDBCLoginService extends AbstractLoginService
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStop()
|
||||
*/
|
||||
@Override
|
||||
protected void doStop() throws Exception
|
||||
{
|
||||
|
|
|
@ -444,9 +444,6 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.Authenticator.AuthConfiguration#isSessionRenewedOnAuthentication()
|
||||
*/
|
||||
@Override
|
||||
public boolean isSessionRenewedOnAuthentication()
|
||||
{
|
||||
|
|
|
@ -44,18 +44,12 @@ public class BasicAuthenticator extends LoginAuthenticator
|
|||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.Authenticator#getAuthMethod()
|
||||
*/
|
||||
@Override
|
||||
public String getAuthMethod()
|
||||
{
|
||||
return Constraint.__BASIC_AUTH;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.Authenticator#validateRequest(javax.servlet.ServletRequest, javax.servlet.ServletResponse, boolean)
|
||||
*/
|
||||
@Override
|
||||
public Authentication validateRequest(ServletRequest req, ServletResponse res, boolean mandatory) throws ServerAuthException
|
||||
{
|
||||
|
|
|
@ -55,9 +55,6 @@ public class DeferredAuthentication implements Authentication.Deferred
|
|||
this._authenticator = authenticator;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.Authentication.Deferred#authenticate(ServletRequest)
|
||||
*/
|
||||
@Override
|
||||
public Authentication authenticate(ServletRequest request)
|
||||
{
|
||||
|
@ -83,9 +80,6 @@ public class DeferredAuthentication implements Authentication.Deferred
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.Authentication.Deferred#authenticate(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
|
||||
*/
|
||||
@Override
|
||||
public Authentication authenticate(ServletRequest request, ServletResponse response)
|
||||
{
|
||||
|
@ -106,9 +100,6 @@ public class DeferredAuthentication implements Authentication.Deferred
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.Authentication.Deferred#login(String, Object, ServletRequest)
|
||||
*/
|
||||
@Override
|
||||
public Authentication login(String username, Object password, ServletRequest request)
|
||||
{
|
||||
|
|
|
@ -117,9 +117,6 @@ public class FormAuthenticator extends LoginAuthenticator
|
|||
return _alwaysSaveUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.authentication.LoginAuthenticator#setConfiguration(org.eclipse.jetty.security.Authenticator.AuthConfiguration)
|
||||
*/
|
||||
@Override
|
||||
public void setConfiguration(AuthConfiguration configuration)
|
||||
{
|
||||
|
|
|
@ -1747,9 +1747,6 @@ public class ConstraintTest
|
|||
private class RoleRefHandler extends HandlerWrapper
|
||||
{
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.handler.HandlerWrapper#handle(java.lang.String, Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
|
||||
{
|
||||
|
|
|
@ -43,9 +43,6 @@ public class TestLoginService extends AbstractLoginService
|
|||
userStore.addUser(username, credential, roles);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.AbstractLoginService#loadRoleInfo(org.eclipse.jetty.security.AbstractLoginService.UserPrincipal)
|
||||
*/
|
||||
@Override
|
||||
protected String[] loadRoleInfo(UserPrincipal user)
|
||||
{
|
||||
|
@ -63,9 +60,6 @@ public class TestLoginService extends AbstractLoginService
|
|||
return list.toArray(new String[roles.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.security.AbstractLoginService#loadUserInfo(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
protected UserPrincipal loadUserInfo(String username)
|
||||
{
|
||||
|
|
|
@ -20,6 +20,7 @@ package org.eclipse.jetty.server;
|
|||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jetty.io.AbstractConnection;
|
||||
|
@ -76,6 +77,26 @@ public abstract class AbstractConnectionFactory extends ContainerLifeCycle imple
|
|||
_inputbufferSize = size;
|
||||
}
|
||||
|
||||
protected String findNextProtocol(Connector connector)
|
||||
{
|
||||
return findNextProtocol(connector, getProtocol());
|
||||
}
|
||||
|
||||
protected static String findNextProtocol(Connector connector, String currentProtocol)
|
||||
{
|
||||
String nextProtocol = null;
|
||||
for (Iterator<String> it = connector.getProtocols().iterator(); it.hasNext(); )
|
||||
{
|
||||
String protocol = it.next();
|
||||
if (currentProtocol.equalsIgnoreCase(protocol))
|
||||
{
|
||||
nextProtocol = it.hasNext() ? it.next() : null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return nextProtocol;
|
||||
}
|
||||
|
||||
protected AbstractConnection configure(AbstractConnection connection, Connector connector, EndPoint endPoint)
|
||||
{
|
||||
connection.setInputBufferSize(getInputBufferSize());
|
||||
|
|
|
@ -34,6 +34,7 @@ import java.util.concurrent.CompletableFuture;
|
|||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.locks.Condition;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.eclipse.jetty.io.ArrayByteBufferPool;
|
||||
import org.eclipse.jetty.io.ByteBufferPool;
|
||||
|
@ -798,9 +799,9 @@ public abstract class AbstractConnector extends ContainerLifeCycle implements Co
|
|||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("%s@%x{%s,%s}",
|
||||
return String.format("%s@%x{%s, %s}",
|
||||
_name == null ? getClass().getSimpleName() : _name,
|
||||
hashCode(),
|
||||
getDefaultProtocol(), getProtocols());
|
||||
getDefaultProtocol(), getProtocols().stream().collect(Collectors.joining(", ", "(", ")")));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package org.eclipse.jetty.server;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jetty.http.BadMessageException;
|
||||
|
@ -85,4 +86,43 @@ public interface ConnectionFactory
|
|||
*/
|
||||
public Connection upgradeConnection(Connector connector, EndPoint endPoint, MetaData.Request upgradeRequest, HttpFields responseFields) throws BadMessageException;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Connections created by this factory MUST implement {@link Connection.UpgradeTo}.</p>
|
||||
*/
|
||||
interface Detecting extends ConnectionFactory
|
||||
{
|
||||
/**
|
||||
* The possible outcomes of the {@link #detect(ByteBuffer)} method.
|
||||
*/
|
||||
enum Detection
|
||||
{
|
||||
/**
|
||||
* A {@link Detecting} can work with the given bytes.
|
||||
*/
|
||||
RECOGNIZED,
|
||||
/**
|
||||
* A {@link Detecting} cannot work with the given bytes.
|
||||
*/
|
||||
NOT_RECOGNIZED,
|
||||
/**
|
||||
* A {@link Detecting} requires more bytes to make a decision.
|
||||
*/
|
||||
NEED_MORE_BYTES
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Check the bytes in the given {@code buffer} to figure out if this {@link Detecting} instance
|
||||
* can work with them or not.</p>
|
||||
* <p>The {@code buffer} MUST be left untouched by this method: bytes MUST NOT be consumed and MUST NOT be modified.</p>
|
||||
* @param buffer the buffer.
|
||||
* @return One of:
|
||||
* <ul>
|
||||
* <li>{@link Detection#RECOGNIZED} if this {@link Detecting} instance can work with the bytes in the buffer</li>
|
||||
* <li>{@link Detection#NOT_RECOGNIZED} if this {@link Detecting} instance cannot work with the bytes in the buffer</li>
|
||||
* <li>{@link Detection#NEED_MORE_BYTES} if this {@link Detecting} instance requires more bytes to make a decision</li>
|
||||
* </ul>
|
||||
*/
|
||||
Detection detect(ByteBuffer buffer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,301 @@
|
|||
//
|
||||
// ========================================================================
|
||||
// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under
|
||||
// the terms of the Eclipse Public License 2.0 which is available at
|
||||
// https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// This Source Code may also be made available under the following
|
||||
// Secondary Licenses when the conditions for such availability set
|
||||
// forth in the Eclipse Public License, v. 2.0 are satisfied:
|
||||
// the Apache License v2.0 which is available at
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
|
||||
// ========================================================================
|
||||
//
|
||||
|
||||
package org.eclipse.jetty.server;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.eclipse.jetty.io.AbstractConnection;
|
||||
import org.eclipse.jetty.io.Connection;
|
||||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
||||
/**
|
||||
* A {@link ConnectionFactory} combining multiple {@link Detecting} instances that will upgrade to
|
||||
* the first one recognizing the bytes in the buffer.
|
||||
*/
|
||||
public class DetectorConnectionFactory extends AbstractConnectionFactory implements ConnectionFactory.Detecting
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(DetectorConnectionFactory.class);
|
||||
|
||||
private final List<Detecting> _detectingConnectionFactories;
|
||||
|
||||
/**
|
||||
* <p>When the first bytes are not recognized by the {@code detectingConnectionFactories}, the default behavior is to
|
||||
* upgrade to the protocol returned by {@link #findNextProtocol(Connector)}.</p>
|
||||
* @param detectingConnectionFactories the {@link Detecting} instances.
|
||||
*/
|
||||
public DetectorConnectionFactory(Detecting... detectingConnectionFactories)
|
||||
{
|
||||
super(toProtocolString(detectingConnectionFactories));
|
||||
_detectingConnectionFactories = Arrays.asList(detectingConnectionFactories);
|
||||
for (Detecting detectingConnectionFactory : detectingConnectionFactories)
|
||||
{
|
||||
addBean(detectingConnectionFactory);
|
||||
}
|
||||
}
|
||||
|
||||
private static String toProtocolString(Detecting... detectingConnectionFactories)
|
||||
{
|
||||
if (detectingConnectionFactories.length == 0)
|
||||
throw new IllegalArgumentException("At least one detecting instance is required");
|
||||
|
||||
// remove protocol duplicates while keeping their ordering -> use LinkedHashSet
|
||||
LinkedHashSet<String> protocols = Arrays.stream(detectingConnectionFactories).map(ConnectionFactory::getProtocol).collect(Collectors.toCollection(LinkedHashSet::new));
|
||||
|
||||
String protocol = protocols.stream().collect(Collectors.joining("|", "[", "]"));
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector generated protocol name : {}", protocol);
|
||||
return protocol;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a detection using multiple {@link ConnectionFactory.Detecting} instances and returns the aggregated outcome.
|
||||
* @param buffer the buffer to perform a detection against.
|
||||
* @return A {@link Detecting.Detection} value with the detection outcome of the {@code detectingConnectionFactories}.
|
||||
*/
|
||||
@Override
|
||||
public Detecting.Detection detect(ByteBuffer buffer)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} detecting from buffer {} using {}", getProtocol(), BufferUtil.toHexString(buffer), _detectingConnectionFactories);
|
||||
boolean needMoreBytes = true;
|
||||
for (Detecting detectingConnectionFactory : _detectingConnectionFactories)
|
||||
{
|
||||
Detecting.Detection detection = detectingConnectionFactory.detect(buffer);
|
||||
if (detection == Detecting.Detection.RECOGNIZED)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} recognized bytes using {}", getProtocol(), detection);
|
||||
return Detecting.Detection.RECOGNIZED;
|
||||
}
|
||||
needMoreBytes &= detection == Detection.NEED_MORE_BYTES;
|
||||
}
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} {}", getProtocol(), (needMoreBytes ? "requires more bytes" : "failed to recognize bytes"));
|
||||
return needMoreBytes ? Detection.NEED_MORE_BYTES : Detection.NOT_RECOGNIZED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method that performs an upgrade to the specified connection factory, disposing of the given resources when needed.
|
||||
* @param connectionFactory the connection factory to upgrade to.
|
||||
* @param connector the connector.
|
||||
* @param endPoint the endpoint.
|
||||
*/
|
||||
protected static void upgradeToConnectionFactory(ConnectionFactory connectionFactory, Connector connector, EndPoint endPoint) throws IllegalStateException
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Upgrading to connection factory {}", connectionFactory);
|
||||
if (connectionFactory == null)
|
||||
throw new IllegalStateException("Cannot upgrade: connection factory must not be null for " + endPoint);
|
||||
Connection nextConnection = connectionFactory.newConnection(connector, endPoint);
|
||||
if (!(nextConnection instanceof Connection.UpgradeTo))
|
||||
throw new IllegalStateException("Cannot upgrade: " + nextConnection + " does not implement " + Connection.UpgradeTo.class.getName() + " for " + endPoint);
|
||||
endPoint.upgrade(nextConnection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Upgraded to connection factory {} and released buffer", connectionFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Callback method called when detection was unsuccessful.
|
||||
* This implementation upgrades to the protocol returned by {@link #findNextProtocol(Connector)}.</p>
|
||||
* @param connector the connector.
|
||||
* @param endPoint the endpoint.
|
||||
* @param buffer the buffer.
|
||||
*/
|
||||
protected void nextProtocol(Connector connector, EndPoint endPoint, ByteBuffer buffer) throws IllegalStateException
|
||||
{
|
||||
String nextProtocol = findNextProtocol(connector);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} detection unsuccessful, found '{}' as the next protocol to upgrade to", getProtocol(), nextProtocol);
|
||||
if (nextProtocol == null)
|
||||
throw new IllegalStateException("Cannot find protocol following '" + getProtocol() + "' in connector's protocol list " + connector.getProtocols() + " for " + endPoint);
|
||||
upgradeToConnectionFactory(connector.getConnectionFactory(nextProtocol), connector, endPoint);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection newConnection(Connector connector, EndPoint endPoint)
|
||||
{
|
||||
return configure(new DetectorConnection(endPoint, connector), connector, endPoint);
|
||||
}
|
||||
|
||||
private class DetectorConnection extends AbstractConnection implements Connection.UpgradeFrom, Connection.UpgradeTo
|
||||
{
|
||||
private final Connector _connector;
|
||||
private final ByteBuffer _buffer;
|
||||
|
||||
private DetectorConnection(EndPoint endp, Connector connector)
|
||||
{
|
||||
super(endp, connector.getExecutor());
|
||||
_connector = connector;
|
||||
_buffer = connector.getByteBufferPool().acquire(getInputBufferSize(), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpgradeTo(ByteBuffer prefilled)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} copying prefilled buffer {}", getProtocol(), BufferUtil.toDetailString(prefilled));
|
||||
if (BufferUtil.hasContent(prefilled))
|
||||
BufferUtil.append(_buffer, prefilled);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByteBuffer onUpgradeFrom()
|
||||
{
|
||||
return _buffer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOpen()
|
||||
{
|
||||
super.onOpen();
|
||||
if (!detectAndUpgrade())
|
||||
fillInterested();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFillable()
|
||||
{
|
||||
try
|
||||
{
|
||||
while (BufferUtil.space(_buffer) > 0)
|
||||
{
|
||||
// Read data
|
||||
int fill = getEndPoint().fill(_buffer);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} filled buffer with {} bytes", getProtocol(), fill);
|
||||
if (fill < 0)
|
||||
{
|
||||
_connector.getByteBufferPool().release(_buffer);
|
||||
getEndPoint().shutdownOutput();
|
||||
return;
|
||||
}
|
||||
if (fill == 0)
|
||||
{
|
||||
fillInterested();
|
||||
return;
|
||||
}
|
||||
|
||||
if (detectAndUpgrade())
|
||||
return;
|
||||
}
|
||||
|
||||
// all Detecting instances want more bytes than this buffer can store
|
||||
LOG.warn("Detector {} failed to detect upgrade target on {} for {}", getProtocol(), _detectingConnectionFactories, getEndPoint());
|
||||
releaseAndClose();
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.warn("Detector {} error for {}", getProtocol(), getEndPoint(), x);
|
||||
releaseAndClose();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true when upgrade was performed, false otherwise.
|
||||
*/
|
||||
private boolean detectAndUpgrade()
|
||||
{
|
||||
if (BufferUtil.isEmpty(_buffer))
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} skipping detection on an empty buffer", getProtocol());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} performing detection with {} bytes", getProtocol(), _buffer.remaining());
|
||||
boolean notRecognized = true;
|
||||
for (Detecting detectingConnectionFactory : _detectingConnectionFactories)
|
||||
{
|
||||
Detecting.Detection detection = detectingConnectionFactory.detect(_buffer);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} performed detection from {} with {} which returned {}", getProtocol(), BufferUtil.toDetailString(_buffer), detectingConnectionFactory, detection);
|
||||
if (detection == Detecting.Detection.RECOGNIZED)
|
||||
{
|
||||
try
|
||||
{
|
||||
// This DetectingConnectionFactory recognized those bytes -> upgrade to the next one.
|
||||
Connection nextConnection = detectingConnectionFactory.newConnection(_connector, getEndPoint());
|
||||
if (!(nextConnection instanceof UpgradeTo))
|
||||
throw new IllegalStateException("Cannot upgrade: " + nextConnection + " does not implement " + UpgradeTo.class.getName());
|
||||
getEndPoint().upgrade(nextConnection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} upgraded to {}", getProtocol(), nextConnection);
|
||||
return true;
|
||||
}
|
||||
catch (DetectionFailureException e)
|
||||
{
|
||||
// It's just bubbling up from a nested Detector, so it's already handled, just rethrow it.
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} failed to upgrade, rethrowing", getProtocol(), e);
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Two reasons that can make us end up here:
|
||||
// 1) detectingConnectionFactory.newConnection() failed? probably because it cannot find the next protocol
|
||||
// 2) nextConnection is not instanceof UpgradeTo
|
||||
// -> release the resources before rethrowing as DetectionFailureException
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} failed to upgrade", getProtocol());
|
||||
releaseAndClose();
|
||||
throw new DetectionFailureException(e);
|
||||
}
|
||||
}
|
||||
notRecognized &= detection == Detecting.Detection.NOT_RECOGNIZED;
|
||||
}
|
||||
|
||||
if (notRecognized)
|
||||
{
|
||||
// No DetectingConnectionFactory recognized those bytes -> call unsuccessful detection callback.
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} failed to detect a known protocol, falling back to nextProtocol()", getProtocol());
|
||||
nextProtocol(_connector, getEndPoint(), _buffer);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} call to nextProtocol() succeeded, assuming upgrade performed", getProtocol());
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void releaseAndClose()
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detector {} releasing buffer and closing", getProtocol());
|
||||
_connector.getByteBufferPool().release(_buffer);
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
private static class DetectionFailureException extends RuntimeException
|
||||
{
|
||||
public DetectionFailureException(Throwable cause)
|
||||
{
|
||||
super(cause);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -587,13 +587,14 @@ public class ForwardedRequestCustomizer implements Customizer
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public void handleHost(HttpField field)
|
||||
{
|
||||
if (getForwardedPortAsAuthority() && !StringUtil.isEmpty(getForwardedPortHeader()))
|
||||
{
|
||||
if (_host == null)
|
||||
_host = new PossiblyPartialHostPort(getLeftMost(field.getValue()));
|
||||
else if (_for instanceof PortSetHostPort)
|
||||
else if (_host instanceof PortSetHostPort)
|
||||
_host = new HostPort(HostPort.normalizeHost(getLeftMost(field.getValue())), _host.getPort());
|
||||
}
|
||||
else if (_host == null)
|
||||
|
|
|
@ -25,6 +25,7 @@ import java.util.concurrent.RejectedExecutionException;
|
|||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.LongAdder;
|
||||
|
||||
import org.eclipse.jetty.http.BadMessageException;
|
||||
import org.eclipse.jetty.http.HttpCompliance;
|
||||
import org.eclipse.jetty.http.HttpField;
|
||||
import org.eclipse.jetty.http.HttpGenerator;
|
||||
|
@ -33,6 +34,7 @@ import org.eclipse.jetty.http.HttpHeaderValue;
|
|||
import org.eclipse.jetty.http.HttpMethod;
|
||||
import org.eclipse.jetty.http.HttpParser;
|
||||
import org.eclipse.jetty.http.HttpParser.RequestHandler;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.http.MetaData;
|
||||
import org.eclipse.jetty.http.PreEncodedHttpField;
|
||||
import org.eclipse.jetty.io.AbstractConnection;
|
||||
|
@ -781,6 +783,15 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
|
|||
|
||||
case NEED_HEADER:
|
||||
{
|
||||
_header = _bufferPool.acquire(Math.min(_config.getResponseHeaderSize(), _config.getOutputBufferSize()), useDirectByteBuffers);
|
||||
continue;
|
||||
}
|
||||
case HEADER_OVERFLOW:
|
||||
{
|
||||
int capacity = _header.capacity();
|
||||
_bufferPool.release(_header);
|
||||
if (capacity >= _config.getResponseHeaderSize())
|
||||
throw new BadMessageException(HttpStatus.INTERNAL_SERVER_ERROR_500, "Response header too large");
|
||||
_header = _bufferPool.acquire(_config.getResponseHeaderSize(), useDirectByteBuffers);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -18,14 +18,10 @@
|
|||
|
||||
package org.eclipse.jetty.server;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.eclipse.jetty.io.AbstractConnection;
|
||||
import org.eclipse.jetty.io.Connection;
|
||||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
@ -34,62 +30,70 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
* <p>A ConnectionFactory whose connections detect whether the first bytes are
|
||||
* TLS bytes and upgrades to either a TLS connection or to another configurable
|
||||
* connection.</p>
|
||||
*
|
||||
* @deprecated Use {@link DetectorConnectionFactory} with a {@link SslConnectionFactory} instead.
|
||||
*/
|
||||
public class OptionalSslConnectionFactory extends AbstractConnectionFactory
|
||||
@Deprecated
|
||||
public class OptionalSslConnectionFactory extends DetectorConnectionFactory
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(OptionalSslConnection.class);
|
||||
private static final int TLS_ALERT_FRAME_TYPE = 0x15;
|
||||
private static final int TLS_HANDSHAKE_FRAME_TYPE = 0x16;
|
||||
private static final int TLS_MAJOR_VERSION = 3;
|
||||
|
||||
private final SslConnectionFactory sslConnectionFactory;
|
||||
private final String otherProtocol;
|
||||
private static final Logger LOG = Log.getLogger(OptionalSslConnectionFactory.class);
|
||||
private final String _nextProtocol;
|
||||
|
||||
/**
|
||||
* <p>Creates a new ConnectionFactory whose connections can upgrade to TLS or another protocol.</p>
|
||||
* <p>If {@code otherProtocol} is {@code null}, and the first bytes are not TLS, then
|
||||
* {@link #otherProtocol(ByteBuffer, EndPoint)} is called.</p>
|
||||
*
|
||||
* @param sslConnectionFactory The SslConnectionFactory to use if the first bytes are TLS
|
||||
* @param otherProtocol the protocol of the ConnectionFactory to use if the first bytes are not TLS,
|
||||
* @param sslConnectionFactory The {@link SslConnectionFactory} to use if the first bytes are TLS
|
||||
* @param nextProtocol the protocol of the {@link ConnectionFactory} to use if the first bytes are not TLS,
|
||||
* or null to explicitly handle the non-TLS case
|
||||
*/
|
||||
public OptionalSslConnectionFactory(SslConnectionFactory sslConnectionFactory, String otherProtocol)
|
||||
public OptionalSslConnectionFactory(SslConnectionFactory sslConnectionFactory, String nextProtocol)
|
||||
{
|
||||
super("ssl|other");
|
||||
this.sslConnectionFactory = sslConnectionFactory;
|
||||
this.otherProtocol = otherProtocol;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection newConnection(Connector connector, EndPoint endPoint)
|
||||
{
|
||||
return configure(new OptionalSslConnection(endPoint, connector), connector, endPoint);
|
||||
super(sslConnectionFactory);
|
||||
_nextProtocol = nextProtocol;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param buffer The buffer with the first bytes of the connection
|
||||
* @return whether the bytes seem TLS bytes
|
||||
*/
|
||||
protected boolean seemsTLS(ByteBuffer buffer)
|
||||
{
|
||||
int tlsFrameType = buffer.get(0) & 0xFF;
|
||||
int tlsMajorVersion = buffer.get(1) & 0xFF;
|
||||
return (tlsFrameType == TLS_HANDSHAKE_FRAME_TYPE || tlsFrameType == TLS_ALERT_FRAME_TYPE) && tlsMajorVersion == TLS_MAJOR_VERSION;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Callback method invoked when {@code otherProtocol} is {@code null}
|
||||
* and the first bytes are not TLS.</p>
|
||||
* <p>Callback method invoked when the detected bytes are not TLS.</p>
|
||||
* <p>This typically happens when a client is trying to connect to a TLS
|
||||
* port using the {@code http} scheme (and not the {@code https} scheme).</p>
|
||||
*
|
||||
* @param connector The connector object
|
||||
* @param endPoint The connection EndPoint object
|
||||
* @param buffer The buffer with the first bytes of the connection
|
||||
*/
|
||||
protected void nextProtocol(Connector connector, EndPoint endPoint, ByteBuffer buffer)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("OptionalSSL TLS detection unsuccessful, attempting to upgrade to {}", _nextProtocol);
|
||||
if (_nextProtocol != null)
|
||||
{
|
||||
ConnectionFactory connectionFactory = connector.getConnectionFactory(_nextProtocol);
|
||||
if (connectionFactory == null)
|
||||
throw new IllegalStateException("Cannot find protocol '" + _nextProtocol + "' in connector's protocol list " + connector.getProtocols() + " for " + endPoint);
|
||||
upgradeToConnectionFactory(connectionFactory, connector, endPoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
otherProtocol(buffer, endPoint);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Legacy callback method invoked when {@code nextProtocol} is {@code null}
|
||||
* and the first bytes are not TLS.</p>
|
||||
* <p>This typically happens when a client is trying to connect to a TLS
|
||||
* port using the {@code http} scheme (and not the {@code https} scheme).</p>
|
||||
* <p>This method is kept around for backward compatibility.</p>
|
||||
*
|
||||
* @param buffer The buffer with the first bytes of the connection
|
||||
* @param endPoint The connection EndPoint object
|
||||
* @see #seemsTLS(ByteBuffer)
|
||||
* @deprecated Override {@link #nextProtocol(Connector, EndPoint, ByteBuffer)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
protected void otherProtocol(ByteBuffer buffer, EndPoint endPoint)
|
||||
{
|
||||
LOG.warn("Detected non-TLS bytes, but no other protocol to upgrade to for {}", endPoint);
|
||||
|
||||
// There are always at least 2 bytes.
|
||||
int byte1 = buffer.get(0) & 0xFF;
|
||||
int byte2 = buffer.get(1) & 0xFF;
|
||||
|
@ -122,105 +126,4 @@ public class OptionalSslConnectionFactory extends AbstractConnectionFactory
|
|||
endPoint.close();
|
||||
}
|
||||
}
|
||||
|
||||
private class OptionalSslConnection extends AbstractConnection implements Connection.UpgradeFrom
|
||||
{
|
||||
private final Connector connector;
|
||||
private final ByteBuffer buffer;
|
||||
|
||||
public OptionalSslConnection(EndPoint endPoint, Connector connector)
|
||||
{
|
||||
super(endPoint, connector.getExecutor());
|
||||
this.connector = connector;
|
||||
this.buffer = BufferUtil.allocateDirect(1536);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOpen()
|
||||
{
|
||||
super.onOpen();
|
||||
fillInterested();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFillable()
|
||||
{
|
||||
try
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
int filled = getEndPoint().fill(buffer);
|
||||
if (filled > 0)
|
||||
{
|
||||
// Always have at least 2 bytes.
|
||||
if (BufferUtil.length(buffer) >= 2)
|
||||
{
|
||||
upgrade(buffer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (filled == 0)
|
||||
{
|
||||
fillInterested();
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException x)
|
||||
{
|
||||
LOG.warn(x);
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByteBuffer onUpgradeFrom()
|
||||
{
|
||||
return buffer;
|
||||
}
|
||||
|
||||
private void upgrade(ByteBuffer buffer)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Read {}", BufferUtil.toDetailString(buffer));
|
||||
|
||||
EndPoint endPoint = getEndPoint();
|
||||
if (seemsTLS(buffer))
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detected TLS bytes, upgrading to {}", sslConnectionFactory);
|
||||
endPoint.upgrade(sslConnectionFactory.newConnection(connector, endPoint));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (otherProtocol != null)
|
||||
{
|
||||
ConnectionFactory connectionFactory = connector.getConnectionFactory(otherProtocol);
|
||||
if (connectionFactory != null)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detected non-TLS bytes, upgrading to {}", connectionFactory);
|
||||
Connection next = connectionFactory.newConnection(connector, endPoint);
|
||||
endPoint.upgrade(next);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.warn("Missing {} {} in {}", otherProtocol, ConnectionFactory.class.getSimpleName(), connector);
|
||||
close();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Detected non-TLS bytes, but no other protocol to upgrade to");
|
||||
otherProtocol(buffer, endPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -630,9 +630,6 @@ public class Request implements HttpServletRequest
|
|||
return (_attributes == null) ? null : _attributes.getAttribute(name);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getAttributeNames()
|
||||
*/
|
||||
@Override
|
||||
public Enumeration<String> getAttributeNames()
|
||||
{
|
||||
|
@ -659,9 +656,6 @@ public class Request implements HttpServletRequest
|
|||
return _authentication;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getAuthType()
|
||||
*/
|
||||
@Override
|
||||
public String getAuthType()
|
||||
{
|
||||
|
@ -673,9 +667,6 @@ public class Request implements HttpServletRequest
|
|||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getCharacterEncoding()
|
||||
*/
|
||||
@Override
|
||||
public String getCharacterEncoding()
|
||||
{
|
||||
|
@ -707,9 +698,6 @@ public class Request implements HttpServletRequest
|
|||
return _channel;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getContentLength()
|
||||
*/
|
||||
@Override
|
||||
public int getContentLength()
|
||||
{
|
||||
|
@ -733,9 +721,6 @@ public class Request implements HttpServletRequest
|
|||
return (int)metadata.getFields().getLongField(HttpHeader.CONTENT_LENGTH.asString());
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest.getContentLengthLong()
|
||||
*/
|
||||
@Override
|
||||
public long getContentLengthLong()
|
||||
{
|
||||
|
@ -752,9 +737,6 @@ public class Request implements HttpServletRequest
|
|||
return _input.getContentConsumed();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getContentType()
|
||||
*/
|
||||
@Override
|
||||
public String getContentType()
|
||||
{
|
||||
|
@ -790,18 +772,12 @@ public class Request implements HttpServletRequest
|
|||
return _errorContext;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getContextPath()
|
||||
*/
|
||||
@Override
|
||||
public String getContextPath()
|
||||
{
|
||||
return _contextPath;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getCookies()
|
||||
*/
|
||||
@Override
|
||||
public Cookie[] getCookies()
|
||||
{
|
||||
|
@ -833,9 +809,6 @@ public class Request implements HttpServletRequest
|
|||
return _cookies.getCookies();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getDateHeader(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public long getDateHeader(String name)
|
||||
{
|
||||
|
@ -849,9 +822,6 @@ public class Request implements HttpServletRequest
|
|||
return _dispatcherType;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getHeader(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String getHeader(String name)
|
||||
{
|
||||
|
@ -859,9 +829,6 @@ public class Request implements HttpServletRequest
|
|||
return metadata == null ? null : metadata.getFields().get(name);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getHeaderNames()
|
||||
*/
|
||||
@Override
|
||||
public Enumeration<String> getHeaderNames()
|
||||
{
|
||||
|
@ -869,9 +836,6 @@ public class Request implements HttpServletRequest
|
|||
return metadata == null ? Collections.emptyEnumeration() : metadata.getFields().getFieldNames();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getHeaders(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Enumeration<String> getHeaders(String name)
|
||||
{
|
||||
|
@ -892,9 +856,6 @@ public class Request implements HttpServletRequest
|
|||
return _inputState;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getInputStream()
|
||||
*/
|
||||
@Override
|
||||
public ServletInputStream getInputStream() throws IOException
|
||||
{
|
||||
|
@ -908,9 +869,6 @@ public class Request implements HttpServletRequest
|
|||
return _input;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getIntHeader(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public int getIntHeader(String name)
|
||||
{
|
||||
|
@ -918,9 +876,6 @@ public class Request implements HttpServletRequest
|
|||
return metadata == null ? -1 : (int)metadata.getFields().getLongField(name);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getLocale()
|
||||
*/
|
||||
@Override
|
||||
public Locale getLocale()
|
||||
{
|
||||
|
@ -946,9 +901,6 @@ public class Request implements HttpServletRequest
|
|||
return new Locale(language, country);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getLocales()
|
||||
*/
|
||||
@Override
|
||||
public Enumeration<Locale> getLocales()
|
||||
{
|
||||
|
@ -978,9 +930,6 @@ public class Request implements HttpServletRequest
|
|||
return Collections.enumeration(locales);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getLocalAddr()
|
||||
*/
|
||||
@Override
|
||||
public String getLocalAddr()
|
||||
{
|
||||
|
@ -1008,9 +957,6 @@ public class Request implements HttpServletRequest
|
|||
return address.getHostAddress();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getLocalName()
|
||||
*/
|
||||
@Override
|
||||
public String getLocalName()
|
||||
{
|
||||
|
@ -1035,9 +981,6 @@ public class Request implements HttpServletRequest
|
|||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getLocalPort()
|
||||
*/
|
||||
@Override
|
||||
public int getLocalPort()
|
||||
{
|
||||
|
@ -1047,9 +990,6 @@ public class Request implements HttpServletRequest
|
|||
return local == null ? 0 : local.getPort();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getMethod()
|
||||
*/
|
||||
@Override
|
||||
public String getMethod()
|
||||
{
|
||||
|
@ -1059,36 +999,24 @@ public class Request implements HttpServletRequest
|
|||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getParameter(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String getParameter(String name)
|
||||
{
|
||||
return getParameters().getValue(name, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getParameterMap()
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String[]> getParameterMap()
|
||||
{
|
||||
return Collections.unmodifiableMap(getParameters().toStringArrayMap());
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getParameterNames()
|
||||
*/
|
||||
@Override
|
||||
public Enumeration<String> getParameterNames()
|
||||
{
|
||||
return Collections.enumeration(getParameters().keySet());
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getParameterValues(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String[] getParameterValues(String name)
|
||||
{
|
||||
|
@ -1118,18 +1046,12 @@ public class Request implements HttpServletRequest
|
|||
_parameters = null;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getPathInfo()
|
||||
*/
|
||||
@Override
|
||||
public String getPathInfo()
|
||||
{
|
||||
return _pathInfo;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getPathTranslated()
|
||||
*/
|
||||
@Override
|
||||
public String getPathTranslated()
|
||||
{
|
||||
|
@ -1138,9 +1060,6 @@ public class Request implements HttpServletRequest
|
|||
return _context.getRealPath(_pathInfo);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getProtocol()
|
||||
*/
|
||||
@Override
|
||||
public String getProtocol()
|
||||
{
|
||||
|
@ -1167,9 +1086,6 @@ public class Request implements HttpServletRequest
|
|||
return _queryEncoding;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getQueryString()
|
||||
*/
|
||||
@Override
|
||||
public String getQueryString()
|
||||
{
|
||||
|
@ -1177,9 +1093,6 @@ public class Request implements HttpServletRequest
|
|||
return metadata == null ? null : metadata.getURI().getQuery();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getReader()
|
||||
*/
|
||||
@Override
|
||||
public BufferedReader getReader() throws IOException
|
||||
{
|
||||
|
@ -1234,9 +1147,6 @@ public class Request implements HttpServletRequest
|
|||
return remote;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getRemoteAddr()
|
||||
*/
|
||||
@Override
|
||||
public String getRemoteAddr()
|
||||
{
|
||||
|
@ -1254,9 +1164,6 @@ public class Request implements HttpServletRequest
|
|||
return address.getHostAddress();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getRemoteHost()
|
||||
*/
|
||||
@Override
|
||||
public String getRemoteHost()
|
||||
{
|
||||
|
@ -1266,9 +1173,6 @@ public class Request implements HttpServletRequest
|
|||
return remote == null ? "" : remote.getHostString();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getRemotePort()
|
||||
*/
|
||||
@Override
|
||||
public int getRemotePort()
|
||||
{
|
||||
|
@ -1278,9 +1182,6 @@ public class Request implements HttpServletRequest
|
|||
return remote == null ? 0 : remote.getPort();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getRemoteUser()
|
||||
*/
|
||||
@Override
|
||||
public String getRemoteUser()
|
||||
{
|
||||
|
@ -1290,9 +1191,6 @@ public class Request implements HttpServletRequest
|
|||
return p.getName();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getRequestDispatcher(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public RequestDispatcher getRequestDispatcher(String path)
|
||||
{
|
||||
|
@ -1318,18 +1216,12 @@ public class Request implements HttpServletRequest
|
|||
return _context.getRequestDispatcher(path);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getRequestedSessionId()
|
||||
*/
|
||||
@Override
|
||||
public String getRequestedSessionId()
|
||||
{
|
||||
return _requestedSessionId;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getRequestURI()
|
||||
*/
|
||||
@Override
|
||||
public String getRequestURI()
|
||||
{
|
||||
|
@ -1337,9 +1229,6 @@ public class Request implements HttpServletRequest
|
|||
return metadata == null ? null : metadata.getURI().getPath();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getRequestURL()
|
||||
*/
|
||||
@Override
|
||||
public StringBuffer getRequestURL()
|
||||
{
|
||||
|
@ -1371,9 +1260,6 @@ public class Request implements HttpServletRequest
|
|||
return url;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getScheme()
|
||||
*/
|
||||
@Override
|
||||
public String getScheme()
|
||||
{
|
||||
|
@ -1382,9 +1268,6 @@ public class Request implements HttpServletRequest
|
|||
return scheme == null ? HttpScheme.HTTP.asString() : scheme;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getServerName()
|
||||
*/
|
||||
@Override
|
||||
public String getServerName()
|
||||
{
|
||||
|
@ -1417,9 +1300,6 @@ public class Request implements HttpServletRequest
|
|||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#getServerPort()
|
||||
*/
|
||||
@Override
|
||||
public int getServerPort()
|
||||
{
|
||||
|
@ -1461,9 +1341,6 @@ public class Request implements HttpServletRequest
|
|||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getServletPath()
|
||||
*/
|
||||
@Override
|
||||
public String getServletPath()
|
||||
{
|
||||
|
@ -1564,18 +1441,12 @@ public class Request implements HttpServletRequest
|
|||
return session;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getSession()
|
||||
*/
|
||||
@Override
|
||||
public HttpSession getSession()
|
||||
{
|
||||
return getSession(true);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getSession(boolean)
|
||||
*/
|
||||
@Override
|
||||
public HttpSession getSession(boolean create)
|
||||
{
|
||||
|
@ -1675,9 +1546,6 @@ public class Request implements HttpServletRequest
|
|||
return _scope;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#getUserPrincipal()
|
||||
*/
|
||||
@Override
|
||||
public Principal getUserPrincipal()
|
||||
{
|
||||
|
@ -1710,18 +1578,12 @@ public class Request implements HttpServletRequest
|
|||
return _asyncNotSupportedSource == null;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdFromCookie()
|
||||
*/
|
||||
@Override
|
||||
public boolean isRequestedSessionIdFromCookie()
|
||||
{
|
||||
return _requestedSessionId != null && _requestedSessionIdFromCookie;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdFromUrl()
|
||||
*/
|
||||
@Override
|
||||
@Deprecated(since = "Servlet API 2.1")
|
||||
public boolean isRequestedSessionIdFromUrl()
|
||||
|
@ -1729,18 +1591,12 @@ public class Request implements HttpServletRequest
|
|||
return _requestedSessionId != null && !_requestedSessionIdFromCookie;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdFromURL()
|
||||
*/
|
||||
@Override
|
||||
public boolean isRequestedSessionIdFromURL()
|
||||
{
|
||||
return _requestedSessionId != null && !_requestedSessionIdFromCookie;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#isRequestedSessionIdValid()
|
||||
*/
|
||||
@Override
|
||||
public boolean isRequestedSessionIdValid()
|
||||
{
|
||||
|
@ -1751,9 +1607,6 @@ public class Request implements HttpServletRequest
|
|||
return (session != null && _sessionHandler.getSessionIdManager().getId(_requestedSessionId).equals(_sessionHandler.getId(session)));
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#isSecure()
|
||||
*/
|
||||
@Override
|
||||
public boolean isSecure()
|
||||
{
|
||||
|
@ -1765,9 +1618,6 @@ public class Request implements HttpServletRequest
|
|||
_secure = secure;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.http.HttpServletRequest#isUserInRole(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean isUserInRole(String role)
|
||||
{
|
||||
|
@ -1907,9 +1757,6 @@ public class Request implements HttpServletRequest
|
|||
_requestAttributeListeners.clear();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#removeAttribute(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void removeAttribute(String name)
|
||||
{
|
||||
|
@ -1938,7 +1785,7 @@ public class Request implements HttpServletRequest
|
|||
_asyncNotSupportedSource = supported ? null : (source == null ? "unknown" : source);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set a request attribute. if the attribute name is "org.eclipse.jetty.server.server.Request.queryEncoding" then the value is also passed in a call to
|
||||
* {@link #setQueryEncoding}.
|
||||
*
|
||||
|
@ -1988,9 +1835,6 @@ public class Request implements HttpServletRequest
|
|||
_authentication = authentication;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletRequest#setCharacterEncoding(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void setCharacterEncoding(String encoding) throws UnsupportedEncodingException
|
||||
{
|
||||
|
@ -2491,9 +2335,6 @@ public class Request implements HttpServletRequest
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletRequest#upgrade(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletException
|
||||
{
|
||||
|
|
|
@ -612,45 +612,30 @@ public class Server extends HandlerWrapper implements Attributes
|
|||
_sessionIdManager = sessionIdManager;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.util.AttributesMap#clearAttributes()
|
||||
*/
|
||||
@Override
|
||||
public void clearAttributes()
|
||||
{
|
||||
_attributes.clearAttributes();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.util.AttributesMap#getAttribute(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Object getAttribute(String name)
|
||||
{
|
||||
return _attributes.getAttribute(name);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.util.AttributesMap#getAttributeNames()
|
||||
*/
|
||||
@Override
|
||||
public Enumeration<String> getAttributeNames()
|
||||
{
|
||||
return _attributes.getAttributeNames();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.util.AttributesMap#removeAttribute(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void removeAttribute(String name)
|
||||
{
|
||||
_attributes.removeAttribute(name);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.util.AttributesMap#setAttribute(java.lang.String, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void setAttribute(String name, Object attribute)
|
||||
{
|
||||
|
|
|
@ -195,54 +195,36 @@ public class ServletRequestHttpWrapper extends ServletRequestWrapper implements
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletRequest#authenticate(javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
public boolean authenticate(HttpServletResponse response) throws IOException, ServletException
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletRequest#getPart(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Part getPart(String name) throws IOException, ServletException
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletRequest#getParts()
|
||||
*/
|
||||
@Override
|
||||
public Collection<Part> getParts() throws IOException, ServletException
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletRequest#login(java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void login(String username, String password) throws ServletException
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletRequest#logout()
|
||||
*/
|
||||
@Override
|
||||
public void logout() throws ServletException
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletRequest#changeSessionId()
|
||||
*/
|
||||
@Override
|
||||
public String changeSessionId()
|
||||
{
|
||||
|
@ -250,9 +232,6 @@ public class ServletRequestHttpWrapper extends ServletRequestWrapper implements
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletRequest#upgrade(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletException
|
||||
{
|
||||
|
|
|
@ -130,36 +130,24 @@ public class ServletResponseHttpWrapper extends ServletResponseWrapper implement
|
|||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletResponse#getHeader(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String getHeader(String name)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletResponse#getHeaderNames()
|
||||
*/
|
||||
@Override
|
||||
public Collection<String> getHeaderNames()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletResponse#getHeaders(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Collection<String> getHeaders(String name)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletResponse#getStatus()
|
||||
*/
|
||||
@Override
|
||||
public int getStatus()
|
||||
{
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package org.eclipse.jetty.server;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import javax.net.ssl.SSLEngine;
|
||||
import javax.net.ssl.SSLSession;
|
||||
|
||||
|
@ -31,8 +32,12 @@ import org.eclipse.jetty.util.annotation.Name;
|
|||
import org.eclipse.jetty.util.component.ContainerLifeCycle;
|
||||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
|
||||
public class SslConnectionFactory extends AbstractConnectionFactory
|
||||
public class SslConnectionFactory extends AbstractConnectionFactory implements ConnectionFactory.Detecting
|
||||
{
|
||||
private static final int TLS_ALERT_FRAME_TYPE = 0x15;
|
||||
private static final int TLS_HANDSHAKE_FRAME_TYPE = 0x16;
|
||||
private static final int TLS_MAJOR_VERSION = 3;
|
||||
|
||||
private final SslContextFactory.Server _sslContextFactory;
|
||||
private final String _nextProtocol;
|
||||
private boolean _directBuffersForEncryption = false;
|
||||
|
@ -99,6 +104,17 @@ public class SslConnectionFactory extends AbstractConnectionFactory
|
|||
setInputBufferSize(session.getPacketBufferSize());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Detection detect(ByteBuffer buffer)
|
||||
{
|
||||
if (buffer.remaining() < 2)
|
||||
return Detection.NEED_MORE_BYTES;
|
||||
int tlsFrameType = buffer.get(0) & 0xFF;
|
||||
int tlsMajorVersion = buffer.get(1) & 0xFF;
|
||||
boolean seemsSsl = (tlsFrameType == TLS_HANDSHAKE_FRAME_TYPE || tlsFrameType == TLS_ALERT_FRAME_TYPE) && tlsMajorVersion == TLS_MAJOR_VERSION;
|
||||
return seemsSsl ? Detection.RECOGNIZED : Detection.NOT_RECOGNIZED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection newConnection(Connector connector, EndPoint endPoint)
|
||||
{
|
||||
|
|
|
@ -84,9 +84,6 @@ public abstract class AbstractHandler extends ContainerLifeCycle implements Hand
|
|||
baseRequest.setHandled(true);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.thread.LifeCycle#start()
|
||||
*/
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
|
@ -97,9 +94,6 @@ public abstract class AbstractHandler extends ContainerLifeCycle implements Hand
|
|||
super.doStart();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.thread.LifeCycle#stop()
|
||||
*/
|
||||
@Override
|
||||
protected void doStop() throws Exception
|
||||
{
|
||||
|
|
|
@ -100,9 +100,6 @@ public class BufferedResponseHandler extends HandlerWrapper
|
|||
return _mimeTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.handler.HandlerWrapper#handle(java.lang.String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
|
||||
{
|
||||
|
|
|
@ -477,18 +477,12 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
return vhosts;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#getAttribute(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Object getAttribute(String name)
|
||||
{
|
||||
return _attributes.getAttribute(name);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#getAttributeNames()
|
||||
*/
|
||||
@Override
|
||||
public Enumeration<String> getAttributeNames()
|
||||
{
|
||||
|
@ -747,9 +741,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
_logger = logger;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.thread.AbstractLifeCycle#doStart()
|
||||
*/
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
|
@ -904,9 +895,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
l.contextDestroyed(e);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.thread.AbstractLifeCycle#doStop()
|
||||
*/
|
||||
@Override
|
||||
protected void doStop() throws Exception
|
||||
{
|
||||
|
@ -1080,10 +1068,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.handler.ScopedHandler#doScope(java.lang.String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest,
|
||||
* javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
public void doScope(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
|
||||
{
|
||||
|
@ -1229,10 +1213,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.handler.ScopedHandler#doHandle(java.lang.String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest,
|
||||
* javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
public void doHandle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
|
||||
{
|
||||
|
@ -1414,9 +1394,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
return Arrays.copyOf(_protectedTargets, _protectedTargets.length);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#removeAttribute(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void removeAttribute(String name)
|
||||
{
|
||||
|
@ -1988,9 +1965,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
return ContextHandler.this;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#getContext(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public ServletContext getContext(String uripath)
|
||||
{
|
||||
|
@ -2077,9 +2051,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#getMimeType(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String getMimeType(String file)
|
||||
{
|
||||
|
@ -2088,9 +2059,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
return _mimeTypes.getMimeByExtension(file);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#getRequestDispatcher(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public RequestDispatcher getRequestDispatcher(String uriInContext)
|
||||
{
|
||||
|
@ -2123,9 +2091,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#getRealPath(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String getRealPath(String path)
|
||||
{
|
||||
|
@ -2163,9 +2128,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#getResourceAsStream(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public InputStream getResourceAsStream(String path)
|
||||
{
|
||||
|
@ -2187,36 +2149,24 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#getResourcePaths(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Set<String> getResourcePaths(String path)
|
||||
{
|
||||
return ContextHandler.this.getResourcePaths(path);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#log(java.lang.Exception, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void log(Exception exception, String msg)
|
||||
{
|
||||
_logger.warn(msg, exception);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#log(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void log(String msg)
|
||||
{
|
||||
_logger.info(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#log(java.lang.String, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public void log(String message, Throwable throwable)
|
||||
{
|
||||
|
@ -2226,27 +2176,18 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
_logger.warn(message, throwable);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#getInitParameter(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String getInitParameter(String name)
|
||||
{
|
||||
return ContextHandler.this.getInitParameter(name);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#getInitParameterNames()
|
||||
*/
|
||||
@Override
|
||||
public Enumeration<String> getInitParameterNames()
|
||||
{
|
||||
return ContextHandler.this.getInitParameterNames();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#getAttribute(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public synchronized Object getAttribute(String name)
|
||||
{
|
||||
|
@ -2256,9 +2197,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
return o;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#getAttributeNames()
|
||||
*/
|
||||
@Override
|
||||
public synchronized Enumeration<String> getAttributeNames()
|
||||
{
|
||||
|
@ -2277,9 +2215,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
return Collections.enumeration(set);
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#setAttribute(java.lang.String, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public synchronized void setAttribute(String name, Object value)
|
||||
{
|
||||
|
@ -2306,9 +2241,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#removeAttribute(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public synchronized void removeAttribute(String name)
|
||||
{
|
||||
|
@ -2325,9 +2257,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @see javax.servlet.ServletContext#getServletContextName()
|
||||
*/
|
||||
@Override
|
||||
public String getServletContextName()
|
||||
{
|
||||
|
|
|
@ -47,9 +47,6 @@ public class DebugHandler extends HandlerWrapper implements Connection.Listener
|
|||
private OutputStream _out;
|
||||
private PrintStream _print;
|
||||
|
||||
/*
|
||||
* @see org.eclipse.jetty.server.Handler#handle(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, int)
|
||||
*/
|
||||
@Override
|
||||
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
|
||||
throws IOException, ServletException
|
||||
|
@ -120,9 +117,6 @@ public class DebugHandler extends HandlerWrapper implements Connection.Listener
|
|||
_print.println(d + (ms > 99 ? "." : (ms > 9 ? ".0" : ".00")) + ms + ":" + name + " " + message);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.jetty.server.handler.HandlerWrapper#doStart()
|
||||
*/
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
|
@ -139,9 +133,6 @@ public class DebugHandler extends HandlerWrapper implements Connection.Listener
|
|||
super.doStart();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.jetty.server.handler.HandlerWrapper#doStop()
|
||||
*/
|
||||
@Override
|
||||
protected void doStop() throws Exception
|
||||
{
|
||||
|
|
|
@ -81,9 +81,6 @@ public class DefaultHandler extends AbstractHandler
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.jetty.server.server.Handler#handle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, int)
|
||||
*/
|
||||
@Override
|
||||
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
|
||||
{
|
||||
|
|
|
@ -43,9 +43,6 @@ public class HandlerList extends HandlerCollection
|
|||
super(handlers);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Handler#handle(String, Request, HttpServletRequest, HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
|
||||
throws IOException, ServletException
|
||||
|
|
|
@ -81,27 +81,18 @@ public class HotSwapHandler extends AbstractHandlerContainer
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.thread.AbstractLifeCycle#doStart()
|
||||
*/
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
super.doStart();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.thread.AbstractLifeCycle#doStop()
|
||||
*/
|
||||
@Override
|
||||
protected void doStop() throws Exception
|
||||
{
|
||||
super.doStop();
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.jetty.server.server.EventHandler#handle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
|
||||
{
|
||||
|
|
|
@ -41,9 +41,6 @@ public class RequestLogHandler extends HandlerWrapper
|
|||
{
|
||||
private RequestLog _requestLog;
|
||||
|
||||
/*
|
||||
* @see org.eclipse.jetty.server.server.Handler#handle(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, int)
|
||||
*/
|
||||
@Override
|
||||
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
|
||||
throws IOException, ServletException
|
||||
|
|
|
@ -214,9 +214,6 @@ public class ResourceHandler extends HandlerWrapper implements ResourceFactory,
|
|||
return _welcomes;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.jetty.server.Handler#handle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, int)
|
||||
*/
|
||||
@Override
|
||||
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
|
||||
{
|
||||
|
|
|
@ -105,9 +105,6 @@ public abstract class ScopedHandler extends HandlerWrapper
|
|||
protected ScopedHandler _outerScope;
|
||||
protected ScopedHandler _nextScope;
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.handler.HandlerWrapper#doStart()
|
||||
*/
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
|
|
|
@ -183,9 +183,6 @@ public abstract class AbstractSessionCache extends ContainerLifeCycle implements
|
|||
return _handler;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionCache#initialize(org.eclipse.jetty.server.session.SessionContext)
|
||||
*/
|
||||
@Override
|
||||
public void initialize(SessionContext context)
|
||||
{
|
||||
|
@ -194,9 +191,6 @@ public abstract class AbstractSessionCache extends ContainerLifeCycle implements
|
|||
_context = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
|
||||
*/
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
|
@ -213,9 +207,6 @@ public abstract class AbstractSessionCache extends ContainerLifeCycle implements
|
|||
super.doStart();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStop()
|
||||
*/
|
||||
@Override
|
||||
protected void doStop() throws Exception
|
||||
{
|
||||
|
@ -232,9 +223,6 @@ public abstract class AbstractSessionCache extends ContainerLifeCycle implements
|
|||
return _sessionDataStore;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionCache#setSessionDataStore(org.eclipse.jetty.server.session.SessionDataStore)
|
||||
*/
|
||||
@Override
|
||||
public void setSessionDataStore(SessionDataStore sessionStore)
|
||||
{
|
||||
|
@ -669,9 +657,6 @@ public abstract class AbstractSessionCache extends ContainerLifeCycle implements
|
|||
return doDelete(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionCache#checkExpiration(Set)
|
||||
*/
|
||||
@Override
|
||||
public Set<String> checkExpiration(Set<String> candidates)
|
||||
{
|
||||
|
@ -806,9 +791,6 @@ public abstract class AbstractSessionCache extends ContainerLifeCycle implements
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionCache#setSaveOnInactiveEviction(boolean)
|
||||
*/
|
||||
@Override
|
||||
public void setSaveOnInactiveEviction(boolean saveOnEvict)
|
||||
{
|
||||
|
@ -828,9 +810,6 @@ public abstract class AbstractSessionCache extends ContainerLifeCycle implements
|
|||
return _saveOnInactiveEviction;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionCache#newSession(javax.servlet.http.HttpServletRequest, java.lang.String, long, long)
|
||||
*/
|
||||
@Override
|
||||
public Session newSession(HttpServletRequest request, String id, long time, long maxInactiveMs)
|
||||
{
|
||||
|
|
|
@ -83,9 +83,6 @@ public class CachingSessionDataStore extends ContainerLifeCycle implements Sessi
|
|||
return _cache;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStore#load(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public SessionData load(String id) throws Exception
|
||||
{
|
||||
|
@ -110,9 +107,6 @@ public class CachingSessionDataStore extends ContainerLifeCycle implements Sessi
|
|||
return d;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStore#delete(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean delete(String id) throws Exception
|
||||
{
|
||||
|
@ -124,9 +118,6 @@ public class CachingSessionDataStore extends ContainerLifeCycle implements Sessi
|
|||
return deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStore#getExpired(Set)
|
||||
*/
|
||||
@Override
|
||||
public Set<String> getExpired(Set<String> candidates)
|
||||
{
|
||||
|
@ -134,9 +125,6 @@ public class CachingSessionDataStore extends ContainerLifeCycle implements Sessi
|
|||
return _store.getExpired(candidates);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStore#store(java.lang.String, org.eclipse.jetty.server.session.SessionData)
|
||||
*/
|
||||
@Override
|
||||
public void store(String id, SessionData data) throws Exception
|
||||
{
|
||||
|
@ -162,18 +150,12 @@ public class CachingSessionDataStore extends ContainerLifeCycle implements Sessi
|
|||
super.doStop();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStore#isPassivating()
|
||||
*/
|
||||
@Override
|
||||
public boolean isPassivating()
|
||||
{
|
||||
return _store.isPassivating();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStore#exists(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean exists(String id) throws Exception
|
||||
{
|
||||
|
@ -193,9 +175,6 @@ public class CachingSessionDataStore extends ContainerLifeCycle implements Sessi
|
|||
return _store.exists(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStore#initialize(org.eclipse.jetty.server.session.SessionContext)
|
||||
*/
|
||||
@Override
|
||||
public void initialize(SessionContext context) throws Exception
|
||||
{
|
||||
|
@ -204,9 +183,6 @@ public class CachingSessionDataStore extends ContainerLifeCycle implements Sessi
|
|||
_cache.initialize(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStore#newSessionData(java.lang.String, long, long, long, long)
|
||||
*/
|
||||
@Override
|
||||
public SessionData newSessionData(String id, long created, long accessed, long lastAccessed, long maxInactiveMs)
|
||||
{
|
||||
|
|
|
@ -56,9 +56,6 @@ public class CachingSessionDataStoreFactory extends AbstractSessionDataStoreFact
|
|||
_sessionStoreFactory = factory;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStoreFactory#getSessionDataStore(org.eclipse.jetty.server.session.SessionHandler)
|
||||
*/
|
||||
@Override
|
||||
public SessionDataStore getSessionDataStore(SessionHandler handler) throws Exception
|
||||
{
|
||||
|
|
|
@ -305,9 +305,6 @@ public class DatabaseAdaptor
|
|||
return DriverManager.getConnection(_connectionUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
|
|
@ -274,9 +274,6 @@ public class DefaultSessionIdManager extends ContainerLifeCycle implements Sessi
|
|||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.SessionIdManager#isIdInUse(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean isIdInUse(String id)
|
||||
{
|
||||
|
@ -312,9 +309,6 @@ public class DefaultSessionIdManager extends ContainerLifeCycle implements Sessi
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
|
||||
*/
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
|
@ -344,9 +338,6 @@ public class DefaultSessionIdManager extends ContainerLifeCycle implements Sessi
|
|||
_houseKeeper.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStop()
|
||||
*/
|
||||
@Override
|
||||
protected void doStop() throws Exception
|
||||
{
|
||||
|
@ -488,9 +479,6 @@ public class DefaultSessionIdManager extends ContainerLifeCycle implements Sessi
|
|||
return handlers;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
|
|
@ -60,9 +60,6 @@ public class FileSessionDataStoreFactory extends AbstractSessionDataStoreFactory
|
|||
_storeDir = storeDir;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStoreFactory#getSessionDataStore(org.eclipse.jetty.server.session.SessionHandler)
|
||||
*/
|
||||
@Override
|
||||
public SessionDataStore getSessionDataStore(SessionHandler handler)
|
||||
{
|
||||
|
|
|
@ -78,9 +78,6 @@ public class HouseKeeper extends AbstractLifeCycle
|
|||
_sessionIdManager = sessionIdManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
|
||||
*/
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
|
@ -167,9 +164,6 @@ public class HouseKeeper extends AbstractLifeCycle
|
|||
_runner = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStop()
|
||||
*/
|
||||
@Override
|
||||
protected void doStop() throws Exception
|
||||
{
|
||||
|
@ -263,9 +257,6 @@ public class HouseKeeper extends AbstractLifeCycle
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
|
|
@ -34,9 +34,6 @@ public class JDBCSessionDataStoreFactory extends AbstractSessionDataStoreFactory
|
|||
*/
|
||||
JDBCSessionDataStore.SessionTableSchema _schema;
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStoreFactory#getSessionDataStore(org.eclipse.jetty.server.session.SessionHandler)
|
||||
*/
|
||||
@Override
|
||||
public SessionDataStore getSessionDataStore(SessionHandler handler)
|
||||
{
|
||||
|
|
|
@ -24,9 +24,6 @@ package org.eclipse.jetty.server.session;
|
|||
public class NullSessionDataStoreFactory extends AbstractSessionDataStoreFactory
|
||||
{
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.server.session.SessionDataStoreFactory#getSessionDataStore(org.eclipse.jetty.server.session.SessionHandler)
|
||||
*/
|
||||
@Override
|
||||
public SessionDataStore getSessionDataStore(SessionHandler handler) throws Exception
|
||||
{
|
||||
|
|
|
@ -445,9 +445,6 @@ public class Session implements SessionHandler.SessionIf
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpSession#getId()
|
||||
*/
|
||||
@Override
|
||||
public String getId()
|
||||
{
|
||||
|
@ -472,9 +469,6 @@ public class Session implements SessionHandler.SessionIf
|
|||
return _sessionData.getVhost();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpSession#getLastAccessedTime()
|
||||
*/
|
||||
@Override
|
||||
public long getLastAccessedTime()
|
||||
{
|
||||
|
@ -488,9 +482,6 @@ public class Session implements SessionHandler.SessionIf
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpSession#getServletContext()
|
||||
*/
|
||||
@Override
|
||||
public ServletContext getServletContext()
|
||||
{
|
||||
|
@ -499,9 +490,6 @@ public class Session implements SessionHandler.SessionIf
|
|||
return _handler._context;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpSession#setMaxInactiveInterval(int)
|
||||
*/
|
||||
@Override
|
||||
public void setMaxInactiveInterval(int secs)
|
||||
{
|
||||
|
@ -596,9 +584,6 @@ public class Session implements SessionHandler.SessionIf
|
|||
return time;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpSession#getMaxInactiveInterval()
|
||||
*/
|
||||
@Override
|
||||
public int getMaxInactiveInterval()
|
||||
{
|
||||
|
@ -609,9 +594,6 @@ public class Session implements SessionHandler.SessionIf
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpSession#getSessionContext()
|
||||
*/
|
||||
@Override
|
||||
@Deprecated(since = "Servlet API 2.1")
|
||||
public HttpSessionContext getSessionContext()
|
||||
|
@ -670,9 +652,6 @@ public class Session implements SessionHandler.SessionIf
|
|||
throw new IllegalStateException("Invalid for read: id=" + _sessionData.getId() + " not resident");
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpSession#getAttribute(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Object getAttribute(String name)
|
||||
{
|
||||
|
@ -683,9 +662,6 @@ public class Session implements SessionHandler.SessionIf
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpSession#getValue(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
@Deprecated(since = "Servlet API 2.2")
|
||||
public Object getValue(String name)
|
||||
|
@ -697,9 +673,6 @@ public class Session implements SessionHandler.SessionIf
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpSession#getAttributeNames()
|
||||
*/
|
||||
@Override
|
||||
public Enumeration<String> getAttributeNames()
|
||||
{
|
||||
|
@ -758,10 +731,6 @@ public class Session implements SessionHandler.SessionIf
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpSession#setAttribute(java.lang.String,
|
||||
* java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void setAttribute(String name, Object value)
|
||||
{
|
||||
|
@ -778,10 +747,6 @@ public class Session implements SessionHandler.SessionIf
|
|||
callSessionAttributeListeners(name, value, old);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpSession#putValue(java.lang.String,
|
||||
* java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
@Deprecated(since = "Servlet API 2.2")
|
||||
public void putValue(String name, Object value)
|
||||
|
@ -789,18 +754,12 @@ public class Session implements SessionHandler.SessionIf
|
|||
setAttribute(name, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpSession#removeAttribute(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void removeAttribute(String name)
|
||||
{
|
||||
setAttribute(name, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpSession#removeValue(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
@Deprecated(since = "Servlet API 2.1")
|
||||
public void removeValue(String name)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue