Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-4382-h1_to_h2_upgrade'.
This commit is contained in:
commit
2940eb8ab5
|
@ -63,6 +63,10 @@
|
|||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-util</artifactId>
|
||||
|
@ -81,6 +85,10 @@
|
|||
<artifactId>jetty-annotations</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
|
@ -101,6 +109,12 @@
|
|||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-slf4j-impl</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-test-helper</artifactId>
|
||||
|
|
|
@ -31,6 +31,7 @@ module org.eclipse.jetty.apache.jsp
|
|||
requires jetty.servlet.api;
|
||||
requires org.eclipse.jetty.util;
|
||||
requires org.mortbay.apache.jasper;
|
||||
requires org.slf4j;
|
||||
|
||||
provides Log with JuliLog;
|
||||
provides ServletContainerInitializer with JettyJasperInitializer;
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
package org.eclipse.jetty.apache.jsp;
|
||||
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class JuliLog implements org.apache.juli.logging.Log
|
||||
{
|
||||
public static org.apache.juli.logging.Log getInstance(String name)
|
||||
|
@ -25,19 +27,16 @@ public class JuliLog implements org.apache.juli.logging.Log
|
|||
return new JuliLog(name);
|
||||
}
|
||||
|
||||
private final org.eclipse.jetty.util.log.Logger _logger;
|
||||
private final org.eclipse.jetty.util.log.StdErrLog _stdErrLog;
|
||||
private final org.slf4j.Logger _logger;
|
||||
|
||||
public JuliLog()
|
||||
{
|
||||
_logger = org.eclipse.jetty.util.log.Log.getRootLogger();
|
||||
_stdErrLog = (_logger instanceof org.eclipse.jetty.util.log.StdErrLog) ? (org.eclipse.jetty.util.log.StdErrLog)_logger : null;
|
||||
_logger = LoggerFactory.getLogger("");
|
||||
}
|
||||
|
||||
public JuliLog(String name)
|
||||
{
|
||||
_logger = org.eclipse.jetty.util.log.Log.getLogger(name);
|
||||
_stdErrLog = (_logger instanceof org.eclipse.jetty.util.log.StdErrLog) ? (org.eclipse.jetty.util.log.StdErrLog)_logger : null;
|
||||
_logger = LoggerFactory.getLogger(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,31 +48,31 @@ public class JuliLog implements org.apache.juli.logging.Log
|
|||
@Override
|
||||
public boolean isErrorEnabled()
|
||||
{
|
||||
return _stdErrLog == null ? true : _stdErrLog.getLevel() <= org.eclipse.jetty.util.log.StdErrLog.LEVEL_WARN;
|
||||
return _logger.isErrorEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFatalEnabled()
|
||||
{
|
||||
return _stdErrLog == null ? true : _stdErrLog.getLevel() <= org.eclipse.jetty.util.log.StdErrLog.LEVEL_WARN;
|
||||
return _logger.isErrorEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInfoEnabled()
|
||||
{
|
||||
return _stdErrLog == null ? true : _stdErrLog.getLevel() <= org.eclipse.jetty.util.log.StdErrLog.LEVEL_INFO;
|
||||
return _logger.isInfoEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTraceEnabled()
|
||||
{
|
||||
return _stdErrLog == null ? true : _stdErrLog.getLevel() <= org.eclipse.jetty.util.log.StdErrLog.LEVEL_DEBUG;
|
||||
return _logger.isTraceEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWarnEnabled()
|
||||
{
|
||||
return _stdErrLog == null ? true : _stdErrLog.getLevel() <= org.eclipse.jetty.util.log.StdErrLog.LEVEL_WARN;
|
||||
return _logger.isWarnEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
|
||||
# Jetty Logging using jetty-slf4j-impl
|
||||
# org.eclipse.jetty.LEVEL=INFO
|
||||
# org.eclipse.jetty.util.LEVEL=DEBUG
|
||||
|
|
|
@ -15,6 +15,14 @@
|
|||
<bundle-symbolic-name>${project.groupId}.embedded</bundle-symbolic-name>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-slf4j-impl</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-util-ajax</artifactId>
|
||||
|
|
|
@ -23,8 +23,8 @@ import java.nio.file.Path;
|
|||
import java.nio.file.Paths;
|
||||
|
||||
import org.eclipse.jetty.util.StringUtil;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* A utility test class to locate a Jetty Distribution for testing purposes by searching:
|
||||
|
@ -36,7 +36,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
*/
|
||||
public class JettyDistribution
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(JettyDistribution.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(JettyDistribution.class);
|
||||
public static final Path DISTRIBUTION;
|
||||
|
||||
static
|
||||
|
@ -64,7 +64,7 @@ public class JettyDistribution
|
|||
}
|
||||
catch (Throwable th)
|
||||
{
|
||||
LOG.warn(th);
|
||||
LOG.warn("Unable to resolve Jetty Distribution location", th);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ public class JettyDistribution
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOG.ignore(e);
|
||||
LOG.trace("IGNORED", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog
|
||||
## Jetty Logging using jetty-slf4j-impl
|
||||
#org.eclipse.jetty.util.log.javautil.PROPERTIES=java-util-logging.properties
|
||||
#org.eclipse.jetty.util.log.SOURCE=true
|
||||
#org.eclipse.jetty.LEVEL=INFO
|
||||
|
|
|
@ -25,8 +25,6 @@ import java.util.concurrent.LinkedBlockingQueue;
|
|||
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.util.component.LifeCycle;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.websocket.api.Session;
|
||||
import org.eclipse.jetty.websocket.api.annotations.OnWebSocketClose;
|
||||
import org.eclipse.jetty.websocket.api.annotations.OnWebSocketError;
|
||||
|
@ -37,6 +35,8 @@ import org.eclipse.jetty.websocket.client.WebSocketClient;
|
|||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
@ -87,7 +87,7 @@ public class WebSocketServerTest
|
|||
@WebSocket
|
||||
public static class TrackingClientEndpoint
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(TrackingClientEndpoint.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(TrackingClientEndpoint.class);
|
||||
public LinkedBlockingQueue<String> messages = new LinkedBlockingQueue<>();
|
||||
|
||||
@OnWebSocketMessage
|
||||
|
@ -99,7 +99,7 @@ public class WebSocketServerTest
|
|||
@OnWebSocketError
|
||||
public void onError(Throwable cause)
|
||||
{
|
||||
LOG.warn(cause);
|
||||
LOG.warn("TrackingClientEndpoint Error", cause);
|
||||
}
|
||||
|
||||
@OnWebSocketClose
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
|
||||
# Jetty Logging using jetty-slf4j-impl
|
||||
org.eclipse.jetty.LEVEL=INFO
|
||||
org.eclipse.jetty.embedded.JettyDistribution.LEVEL=DEBUG
|
||||
#org.eclipse.jetty.STACKS=true
|
||||
|
|
|
@ -51,6 +51,16 @@
|
|||
<artifactId>jetty-io</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-slf4j-impl</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-test-helper</artifactId>
|
||||
|
|
|
@ -23,6 +23,7 @@ module org.eclipse.jetty.alpn.client
|
|||
exports org.eclipse.jetty.alpn.client;
|
||||
|
||||
requires transitive org.eclipse.jetty.io;
|
||||
requires org.slf4j;
|
||||
|
||||
uses ALPNProcessor.Client;
|
||||
}
|
||||
|
|
|
@ -32,12 +32,12 @@ import org.eclipse.jetty.io.EndPoint;
|
|||
import org.eclipse.jetty.io.NegotiatingClientConnectionFactory;
|
||||
import org.eclipse.jetty.io.ssl.ALPNProcessor.Client;
|
||||
import org.eclipse.jetty.io.ssl.SslClientConnectionFactory;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ALPNClientConnectionFactory extends NegotiatingClientConnectionFactory
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ALPNClientConnectionFactory.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ALPNClientConnectionFactory.class);
|
||||
|
||||
private final List<Client> processors = new ArrayList<>();
|
||||
private final Executor executor;
|
||||
|
@ -64,7 +64,7 @@ public class ALPNClientConnectionFactory extends NegotiatingClientConnectionFact
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(x);
|
||||
LOG.debug("Unable to load client processor", x);
|
||||
failure.addSuppressed(x);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -26,12 +26,23 @@
|
|||
<artifactId>jetty-alpn-client</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-client</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-slf4j-impl</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
|
@ -23,6 +23,7 @@ module org.eclipse.jetty.alpn.conscrypt.client
|
|||
{
|
||||
requires org.conscrypt;
|
||||
requires transitive org.eclipse.jetty.alpn.client;
|
||||
requires org.slf4j;
|
||||
|
||||
provides ALPNProcessor.Client with ConscryptClientALPNProcessor;
|
||||
}
|
||||
|
|
|
@ -28,12 +28,12 @@ import org.eclipse.jetty.io.Connection;
|
|||
import org.eclipse.jetty.io.ssl.ALPNProcessor;
|
||||
import org.eclipse.jetty.io.ssl.SslConnection;
|
||||
import org.eclipse.jetty.io.ssl.SslHandshakeListener;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ConscryptClientALPNProcessor implements ALPNProcessor.Client
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ConscryptClientALPNProcessor.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ConscryptClientALPNProcessor.class);
|
||||
|
||||
@Override
|
||||
public void init()
|
||||
|
@ -95,8 +95,8 @@ public class ConscryptClientALPNProcessor implements ALPNProcessor.Client
|
|||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
LOG.warn("Unable to process Conscrypt ApplicationProtocol for {}", alpnConnection, e);
|
||||
alpnConnection.selected(null);
|
||||
LOG.warn(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
|
||||
# Jetty Logging using jetty-slf4j-impl
|
||||
#org.eclipse.jetty.LEVEL=DEBUG
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.eclipse.jetty.io.ssl.ALPNProcessor;
|
|||
module org.eclipse.jetty.alpn.conscrypt.server
|
||||
{
|
||||
requires org.conscrypt;
|
||||
requires org.slf4j;
|
||||
requires transitive org.eclipse.jetty.alpn.server;
|
||||
|
||||
provides ALPNProcessor.Server with ConscryptServerALPNProcessor;
|
||||
|
|
|
@ -31,12 +31,12 @@ import org.eclipse.jetty.io.Connection;
|
|||
import org.eclipse.jetty.io.ssl.ALPNProcessor;
|
||||
import org.eclipse.jetty.io.ssl.SslConnection.DecryptedEndPoint;
|
||||
import org.eclipse.jetty.io.ssl.SslHandshakeListener;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ConscryptServerALPNProcessor implements ALPNProcessor.Server
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ConscryptServerALPNProcessor.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ConscryptServerALPNProcessor.class);
|
||||
|
||||
@Override
|
||||
public void init()
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
|
||||
# Jetty Logging using jetty-slf4j-impl
|
||||
#org.eclipse.jetty.LEVEL=DEBUG
|
||||
#org.eclipse.jetty.alpn.LEVEL=DEBUG
|
||||
|
|
|
@ -40,6 +40,10 @@
|
|||
<artifactId>jetty-alpn-client</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
|
@ -47,6 +51,12 @@
|
|||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-slf4j-impl</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.eclipse.jetty.io.ssl.ALPNProcessor;
|
|||
module org.eclipse.jetty.alpn.java.client
|
||||
{
|
||||
requires transitive org.eclipse.jetty.alpn.client;
|
||||
requires org.slf4j;
|
||||
|
||||
provides ALPNProcessor.Client with JDK9ClientALPNProcessor;
|
||||
}
|
||||
|
|
|
@ -28,12 +28,12 @@ import org.eclipse.jetty.io.ssl.ALPNProcessor;
|
|||
import org.eclipse.jetty.io.ssl.SslConnection.DecryptedEndPoint;
|
||||
import org.eclipse.jetty.io.ssl.SslHandshakeListener;
|
||||
import org.eclipse.jetty.util.JavaVersion;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class JDK9ClientALPNProcessor implements ALPNProcessor.Client
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(JDK9ClientALPNProcessor.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(JDK9ClientALPNProcessor.class);
|
||||
|
||||
@Override
|
||||
public void init()
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
|
||||
# Jetty Logging using jetty-slf4j-impl
|
||||
#org.eclipse.jetty.LEVEL=DEBUG
|
||||
|
|
|
@ -21,6 +21,7 @@ import org.eclipse.jetty.io.ssl.ALPNProcessor;
|
|||
|
||||
module org.eclipse.jetty.alpn.java.server
|
||||
{
|
||||
requires org.slf4j;
|
||||
requires transitive org.eclipse.jetty.alpn.server;
|
||||
|
||||
provides ALPNProcessor.Server with JDK9ServerALPNProcessor;
|
||||
|
|
|
@ -28,12 +28,12 @@ import org.eclipse.jetty.io.ssl.ALPNProcessor;
|
|||
import org.eclipse.jetty.io.ssl.SslConnection;
|
||||
import org.eclipse.jetty.io.ssl.SslHandshakeListener;
|
||||
import org.eclipse.jetty.util.JavaVersion;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class JDK9ServerALPNProcessor implements ALPNProcessor.Server, SslHandshakeListener
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(JDK9ServerALPNProcessor.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(JDK9ServerALPNProcessor.class);
|
||||
|
||||
@Override
|
||||
public void init()
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
|
||||
# Jetty Logging using jetty-slf4j-impl
|
||||
#org.eclipse.jetty.LEVEL=DEBUG
|
||||
#org.eclipse.jetty.alpn.LEVEL=DEBUG
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
|
||||
|
||||
[depend]
|
||||
alpn-impl/alpn-11
|
|
@ -23,6 +23,7 @@ module org.eclipse.jetty.alpn.server
|
|||
exports org.eclipse.jetty.alpn.server;
|
||||
|
||||
requires transitive org.eclipse.jetty.server;
|
||||
requires org.slf4j;
|
||||
|
||||
uses ALPNProcessor.Server;
|
||||
}
|
||||
|
|
|
@ -27,12 +27,12 @@ import org.eclipse.jetty.io.EndPoint;
|
|||
import org.eclipse.jetty.server.ConnectionFactory;
|
||||
import org.eclipse.jetty.server.Connector;
|
||||
import org.eclipse.jetty.server.NegotiatingServerConnection;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ALPNServerConnection extends NegotiatingServerConnection
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ALPNServerConnection.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ALPNServerConnection.class);
|
||||
|
||||
public ALPNServerConnection(Connector connector, EndPoint endPoint, SSLEngine engine, List<String> protocols, String defaultProtocol)
|
||||
{
|
||||
|
|
|
@ -31,12 +31,12 @@ import org.eclipse.jetty.io.ssl.ALPNProcessor.Server;
|
|||
import org.eclipse.jetty.server.Connector;
|
||||
import org.eclipse.jetty.server.NegotiatingServerConnectionFactory;
|
||||
import org.eclipse.jetty.util.annotation.Name;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ALPNServerConnectionFactory extends NegotiatingServerConnectionFactory
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ALPNServerConnectionFactory.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ALPNServerConnectionFactory.class);
|
||||
|
||||
private final List<Server> processors = new ArrayList<>();
|
||||
|
||||
|
@ -61,7 +61,7 @@ public class ALPNServerConnectionFactory extends NegotiatingServerConnectionFact
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(x);
|
||||
LOG.debug(x.getMessage(), x);
|
||||
if (x != failure)
|
||||
failure.addSuppressed(x);
|
||||
continue;
|
||||
|
@ -75,7 +75,7 @@ public class ALPNServerConnectionFactory extends NegotiatingServerConnectionFact
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Could not initialize " + processor, x);
|
||||
LOG.debug("Could not initialize {}", processor, x);
|
||||
if (x != failure)
|
||||
failure.addSuppressed(x);
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ module org.eclipse.jetty.annotations
|
|||
requires java.naming;
|
||||
requires transitive org.eclipse.jetty.plus;
|
||||
requires transitive org.objectweb.asm;
|
||||
requires org.slf4j;
|
||||
|
||||
uses ServletContainerInitializer;
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ import java.util.concurrent.CountDownLatch;
|
|||
import java.util.concurrent.Semaphore;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.servlet.ServletContainerInitializer;
|
||||
import javax.servlet.annotation.HandlesTypes;
|
||||
|
||||
|
@ -51,8 +50,6 @@ import org.eclipse.jetty.util.MultiException;
|
|||
import org.eclipse.jetty.util.ProcessorUtils;
|
||||
import org.eclipse.jetty.util.StringUtil;
|
||||
import org.eclipse.jetty.util.TypeUtil;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
import org.eclipse.jetty.util.statistic.CounterStatistic;
|
||||
import org.eclipse.jetty.webapp.AbstractConfiguration;
|
||||
|
@ -63,13 +60,15 @@ import org.eclipse.jetty.webapp.MetaInfConfiguration;
|
|||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.eclipse.jetty.webapp.WebDescriptor;
|
||||
import org.eclipse.jetty.webapp.WebXmlConfiguration;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Configuration for Annotations
|
||||
*/
|
||||
public class AnnotationConfiguration extends AbstractConfiguration
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(AnnotationConfiguration.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AnnotationConfiguration.class);
|
||||
|
||||
public static final String SERVLET_CONTAINER_INITIALIZER_EXCLUSION_PATTERN = "org.eclipse.jetty.containerInitializerExclusionPattern";
|
||||
public static final String SERVLET_CONTAINER_INITIALIZER_ORDER = "org.eclipse.jetty.containerInitializerOrder";
|
||||
|
@ -337,7 +336,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
|||
{
|
||||
//handle introspectable annotations (postconstruct,predestroy, multipart etc etc)
|
||||
context.getObjectFactory().addDecorator(new AnnotationDecorator(context));
|
||||
|
||||
|
||||
if (!context.getMetaData().isMetaDataComplete())
|
||||
{
|
||||
//If web.xml not metadata-complete, if this is a servlet 3 webapp or above
|
||||
|
@ -411,7 +410,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
|||
|
||||
/**
|
||||
* Perform scanning of classes for discoverable
|
||||
* annotations such as WebServlet/WebFilter/WebListener
|
||||
* annotations such as WebServlet/WebFilter/WebListener
|
||||
*
|
||||
* @param context the context for the scan
|
||||
* @throws Exception if unable to scan
|
||||
|
@ -836,8 +835,10 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
|||
catch (Error e)
|
||||
{
|
||||
// Probably a SCI discovered on the system classpath that is hidden by the context classloader
|
||||
LOG.info("Error: {} for {}", e.getMessage(), context);
|
||||
LOG.debug(e);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Error: {} for {}", e.getMessage(), context, e);
|
||||
else
|
||||
LOG.info("Error: {} for {}", e.getMessage(), context);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1026,7 +1027,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
|||
|
||||
/**
|
||||
* Scan jars in WEB-INF/lib.
|
||||
*
|
||||
*
|
||||
* Only jars selected by MetaInfConfiguration, and that are not excluded
|
||||
* by an ordering will be considered.
|
||||
*
|
||||
|
|
|
@ -27,11 +27,11 @@ import java.util.Set;
|
|||
|
||||
import org.eclipse.jetty.servlet.BaseHolder;
|
||||
import org.eclipse.jetty.servlet.Source.Origin;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.eclipse.jetty.webapp.WebDescriptor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* AnnotationIntrospector
|
||||
|
@ -40,7 +40,7 @@ import org.eclipse.jetty.webapp.WebDescriptor;
|
|||
*/
|
||||
public class AnnotationIntrospector
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(AnnotationIntrospector.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AnnotationIntrospector.class);
|
||||
private final Set<Class<?>> _introspectedClasses = new HashSet<>();
|
||||
private final List<IntrospectableAnnotationHandler> _handlers = new ArrayList<IntrospectableAnnotationHandler>();
|
||||
private final WebAppContext _context;
|
||||
|
@ -89,13 +89,13 @@ public class AnnotationIntrospector
|
|||
c = c.getSuperclass();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public WebAppContext getContext()
|
||||
{
|
||||
return _context;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public AnnotationIntrospector(WebAppContext context)
|
||||
{
|
||||
_context = Objects.requireNonNull(context);
|
||||
|
@ -105,11 +105,11 @@ public class AnnotationIntrospector
|
|||
{
|
||||
_handlers.add(handler);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test if an object should be introspected for some specific types of annotations
|
||||
* Test if an object should be introspected for some specific types of annotations
|
||||
* like PostConstruct/PreDestroy/MultiPart etc etc.
|
||||
*
|
||||
*
|
||||
* According to servlet 4.0, these types of annotations should only be evaluated iff any
|
||||
* of the following are true:
|
||||
* <ol>
|
||||
|
@ -118,10 +118,10 @@ public class AnnotationIntrospector
|
|||
* in a descriptor AND web.xml is NOT metadata-complete AND any web-fragment.xml associated with the location of
|
||||
* the class is NOT metadata-complete</li>
|
||||
* </ol>
|
||||
*
|
||||
*
|
||||
* We also support evaluations of these types of annotations for objects that were created directly
|
||||
* by the jetty api.
|
||||
*
|
||||
*
|
||||
* @param o the object to check for its ability to be introspected for annotations
|
||||
* @param metaInfo meta information about the object to be introspected
|
||||
* @return true if it can be introspected according to servlet 4.0 rules
|
||||
|
@ -130,27 +130,27 @@ public class AnnotationIntrospector
|
|||
{
|
||||
if (o == null)
|
||||
return false; //nothing to introspect
|
||||
|
||||
|
||||
if (metaInfo == null)
|
||||
return true; //no information about the object to introspect, assume introspectable
|
||||
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
BaseHolder holder = null;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
holder = (BaseHolder)metaInfo;
|
||||
}
|
||||
catch (ClassCastException e)
|
||||
{
|
||||
LOG.warn(e);
|
||||
LOG.warn("Not introspectable {}", metaInfo.getClass().getName(), e);
|
||||
return true; //not the type of information we were expecting, assume introspectable
|
||||
}
|
||||
|
||||
|
||||
Origin origin = (holder.getSource() == null ? null : holder.getSource().getOrigin());
|
||||
if (origin == null)
|
||||
return true; //assume introspectable
|
||||
|
||||
|
||||
switch (origin)
|
||||
{
|
||||
case EMBEDDED:
|
||||
|
@ -168,7 +168,7 @@ public class AnnotationIntrospector
|
|||
//is not metadata-complete
|
||||
if (_context.getMetaData().isMetaDataComplete())
|
||||
return false;
|
||||
|
||||
|
||||
String descriptorLocation = holder.getSource().getResource();
|
||||
if (descriptorLocation == null)
|
||||
return true; //no descriptor, can't be metadata-complete
|
||||
|
@ -186,16 +186,15 @@ public class AnnotationIntrospector
|
|||
}
|
||||
|
||||
/**
|
||||
* @param o
|
||||
* @param metaInfo
|
||||
*
|
||||
*/
|
||||
public void introspect(Object o, Object metaInfo)
|
||||
{
|
||||
if (!isIntrospectable(o, metaInfo))
|
||||
return;
|
||||
|
||||
|
||||
Class<?> clazz = o.getClass();
|
||||
|
||||
|
||||
synchronized (_introspectedClasses)
|
||||
{
|
||||
//Synchronize on the set of already introspected classes.
|
||||
|
|
|
@ -39,8 +39,6 @@ import org.eclipse.jetty.util.MultiException;
|
|||
import org.eclipse.jetty.util.MultiReleaseJarFile;
|
||||
import org.eclipse.jetty.util.StringUtil;
|
||||
import org.eclipse.jetty.util.TypeUtil;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
import org.objectweb.asm.AnnotationVisitor;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
|
@ -48,6 +46,8 @@ import org.objectweb.asm.ClassVisitor;
|
|||
import org.objectweb.asm.FieldVisitor;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* AnnotationParser
|
||||
|
@ -69,7 +69,7 @@ import org.objectweb.asm.Opcodes;
|
|||
*/
|
||||
public class AnnotationParser
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(AnnotationParser.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AnnotationParser.class);
|
||||
protected static int ASM_OPCODE_VERSION = Opcodes.ASM7; //compatibility of api
|
||||
protected static String ASM_OPCODE_VERSION_STR = "ASM7";
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
|
||||
import org.eclipse.jetty.annotations.AnnotationParser.AbstractHandler;
|
||||
import org.eclipse.jetty.annotations.AnnotationParser.ClassInfo;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* ClassInheritanceHandler
|
||||
|
@ -34,7 +34,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
*/
|
||||
public class ClassInheritanceHandler extends AbstractHandler
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ClassInheritanceHandler.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ClassInheritanceHandler.class);
|
||||
|
||||
Map<String, Set<String>> _inheritanceMap;
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class ClassInheritanceHandler extends AbstractHandler
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOG.warn(e);
|
||||
LOG.warn("Failed to handle {}", classInfo, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,16 +24,16 @@ import javax.servlet.Servlet;
|
|||
import org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler;
|
||||
import org.eclipse.jetty.security.ConstraintAware;
|
||||
import org.eclipse.jetty.security.ConstraintSecurityHandler;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* DeclaresRolesAnnotationHandler
|
||||
*/
|
||||
public class DeclareRolesAnnotationHandler extends AbstractIntrospectableAnnotationHandler
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(DeclareRolesAnnotationHandler.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(DeclareRolesAnnotationHandler.class);
|
||||
|
||||
public DeclareRolesAnnotationHandler(WebAppContext context)
|
||||
{
|
||||
|
|
|
@ -32,21 +32,21 @@ import javax.naming.NamingException;
|
|||
import org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler;
|
||||
import org.eclipse.jetty.plus.annotation.Injection;
|
||||
import org.eclipse.jetty.plus.annotation.InjectionCollection;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.webapp.MetaData;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationHandler
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ResourceAnnotationHandler.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ResourceAnnotationHandler.class);
|
||||
|
||||
protected static final List<Class<?>> ENV_ENTRY_TYPES =
|
||||
Arrays.asList(new Class[]
|
||||
{
|
||||
String.class, Character.class, Integer.class, Boolean.class, Double.class, Byte.class, Short.class, Long.class,
|
||||
Float.class
|
||||
});
|
||||
{
|
||||
String.class, Character.class, Integer.class, Boolean.class, Double.class, Byte.class, Short.class, Long.class,
|
||||
Float.class
|
||||
});
|
||||
|
||||
public ResourceAnnotationHandler(WebAppContext wac)
|
||||
{
|
||||
|
@ -98,7 +98,7 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
|
|||
}
|
||||
catch (NamingException e)
|
||||
{
|
||||
LOG.warn(e);
|
||||
LOG.warn("Unable to bind name {} to {} from class {}", name, mappedName, clazz, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,13 +23,13 @@ import javax.annotation.Resources;
|
|||
import javax.naming.NamingException;
|
||||
|
||||
import org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ResourcesAnnotationHandler extends AbstractIntrospectableAnnotationHandler
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ResourcesAnnotationHandler.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ResourcesAnnotationHandler.class);
|
||||
|
||||
public ResourcesAnnotationHandler(WebAppContext wac)
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ public class ResourcesAnnotationHandler extends AbstractIntrospectableAnnotation
|
|||
}
|
||||
catch (NamingException e)
|
||||
{
|
||||
LOG.warn(e);
|
||||
LOG.warn("Unable to bind {} to {}", name, mappedName, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,15 +23,15 @@ import javax.servlet.Servlet;
|
|||
import org.eclipse.jetty.annotations.AnnotationIntrospector.AbstractIntrospectableAnnotationHandler;
|
||||
import org.eclipse.jetty.plus.annotation.RunAsCollection;
|
||||
import org.eclipse.jetty.servlet.ServletHolder;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.webapp.Descriptor;
|
||||
import org.eclipse.jetty.webapp.MetaData;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class RunAsAnnotationHandler extends AbstractIntrospectableAnnotationHandler
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(RunAsAnnotationHandler.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(RunAsAnnotationHandler.class);
|
||||
|
||||
public RunAsAnnotationHandler(WebAppContext wac)
|
||||
{
|
||||
|
|
|
@ -23,9 +23,9 @@ import java.util.List;
|
|||
import org.eclipse.jetty.plus.annotation.ContainerInitializer;
|
||||
import org.eclipse.jetty.servlet.ServletContextHandler;
|
||||
import org.eclipse.jetty.util.component.AbstractLifeCycle;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* ServletContainerInitializersStarter
|
||||
|
@ -35,7 +35,7 @@ import org.eclipse.jetty.webapp.WebAppContext;
|
|||
*/
|
||||
public class ServletContainerInitializersStarter extends AbstractLifeCycle implements ServletContextHandler.ServletContainerInitializerCaller
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ServletContainerInitializersStarter.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ServletContainerInitializersStarter.class);
|
||||
WebAppContext _context;
|
||||
|
||||
public ServletContainerInitializersStarter(WebAppContext context)
|
||||
|
@ -60,7 +60,7 @@ public class ServletContainerInitializersStarter extends AbstractLifeCycle imple
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOG.warn(e);
|
||||
LOG.warn("Failed to call startup on {}", i, e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,10 +31,10 @@ import org.eclipse.jetty.security.ConstraintMapping;
|
|||
import org.eclipse.jetty.security.ConstraintSecurityHandler;
|
||||
import org.eclipse.jetty.servlet.ServletHolder;
|
||||
import org.eclipse.jetty.servlet.ServletMapping;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.security.Constraint;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* ServletSecurityAnnotationHandler
|
||||
|
@ -55,7 +55,7 @@ import org.eclipse.jetty.webapp.WebAppContext;
|
|||
*/
|
||||
public class ServletSecurityAnnotationHandler extends AbstractIntrospectableAnnotationHandler
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ServletSecurityAnnotationHandler.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ServletSecurityAnnotationHandler.class);
|
||||
|
||||
public ServletSecurityAnnotationHandler(WebAppContext wac)
|
||||
{
|
||||
|
|
|
@ -29,20 +29,20 @@ import org.eclipse.jetty.http.pathmap.ServletPathSpec;
|
|||
import org.eclipse.jetty.servlet.FilterHolder;
|
||||
import org.eclipse.jetty.servlet.FilterMapping;
|
||||
import org.eclipse.jetty.servlet.Source;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
import org.eclipse.jetty.webapp.DiscoveredAnnotation;
|
||||
import org.eclipse.jetty.webapp.MetaData;
|
||||
import org.eclipse.jetty.webapp.Origin;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* WebFilterAnnotation
|
||||
*/
|
||||
public class WebFilterAnnotation extends DiscoveredAnnotation
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(WebFilterAnnotation.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(WebFilterAnnotation.class);
|
||||
|
||||
public WebFilterAnnotation(WebAppContext context, String className)
|
||||
{
|
||||
|
|
|
@ -21,16 +21,16 @@ package org.eclipse.jetty.annotations;
|
|||
import org.eclipse.jetty.annotations.AnnotationParser.ClassInfo;
|
||||
import org.eclipse.jetty.annotations.AnnotationParser.FieldInfo;
|
||||
import org.eclipse.jetty.annotations.AnnotationParser.MethodInfo;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* WebFilterAnnotationHandler
|
||||
*/
|
||||
public class WebFilterAnnotationHandler extends AbstractDiscoverableAnnotationHandler
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(WebFilterAnnotationHandler.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(WebFilterAnnotationHandler.class);
|
||||
|
||||
public WebFilterAnnotationHandler(WebAppContext context)
|
||||
{
|
||||
|
|
|
@ -29,20 +29,20 @@ import javax.servlet.http.HttpSessionListener;
|
|||
|
||||
import org.eclipse.jetty.servlet.ListenerHolder;
|
||||
import org.eclipse.jetty.servlet.Source;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
import org.eclipse.jetty.webapp.DiscoveredAnnotation;
|
||||
import org.eclipse.jetty.webapp.MetaData;
|
||||
import org.eclipse.jetty.webapp.Origin;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* WebListenerAnnotation
|
||||
*/
|
||||
public class WebListenerAnnotation extends DiscoveredAnnotation
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(WebListenerAnnotation.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(WebListenerAnnotation.class);
|
||||
|
||||
public WebListenerAnnotation(WebAppContext context, String className)
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ public class WebListenerAnnotation extends DiscoveredAnnotation
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOG.warn(e);
|
||||
LOG.warn("Unable to add listener {}", clazz, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,13 +21,13 @@ package org.eclipse.jetty.annotations;
|
|||
import org.eclipse.jetty.annotations.AnnotationParser.ClassInfo;
|
||||
import org.eclipse.jetty.annotations.AnnotationParser.FieldInfo;
|
||||
import org.eclipse.jetty.annotations.AnnotationParser.MethodInfo;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class WebListenerAnnotationHandler extends AbstractDiscoverableAnnotationHandler
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(WebListenerAnnotationHandler.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(WebListenerAnnotationHandler.class);
|
||||
|
||||
public WebListenerAnnotationHandler(WebAppContext context)
|
||||
{
|
||||
|
|
|
@ -32,20 +32,20 @@ import org.eclipse.jetty.servlet.ServletMapping;
|
|||
import org.eclipse.jetty.servlet.Source;
|
||||
import org.eclipse.jetty.util.ArrayUtil;
|
||||
import org.eclipse.jetty.util.LazyList;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
import org.eclipse.jetty.webapp.DiscoveredAnnotation;
|
||||
import org.eclipse.jetty.webapp.MetaData;
|
||||
import org.eclipse.jetty.webapp.Origin;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* WebServletAnnotation
|
||||
*/
|
||||
public class WebServletAnnotation extends DiscoveredAnnotation
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(WebServletAnnotation.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(WebServletAnnotation.class);
|
||||
|
||||
public WebServletAnnotation(WebAppContext context, String className)
|
||||
{
|
||||
|
|
|
@ -21,9 +21,9 @@ package org.eclipse.jetty.annotations;
|
|||
import org.eclipse.jetty.annotations.AnnotationParser.ClassInfo;
|
||||
import org.eclipse.jetty.annotations.AnnotationParser.FieldInfo;
|
||||
import org.eclipse.jetty.annotations.AnnotationParser.MethodInfo;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* WebServletAnnotationHandler
|
||||
|
@ -32,7 +32,7 @@ import org.eclipse.jetty.webapp.WebAppContext;
|
|||
*/
|
||||
public class WebServletAnnotationHandler extends AbstractDiscoverableAnnotationHandler
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(WebServletAnnotationHandler.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(WebServletAnnotationHandler.class);
|
||||
|
||||
public WebServletAnnotationHandler(WebAppContext context)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,6 @@ package org.eclipse.jetty.annotations;
|
|||
import java.io.File;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.ServletContainerInitializer;
|
||||
|
@ -30,7 +29,6 @@ import org.eclipse.jetty.toolchain.test.FS;
|
|||
import org.eclipse.jetty.toolchain.test.JAR;
|
||||
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
import org.eclipse.jetty.webapp.FragmentDescriptor;
|
||||
import org.eclipse.jetty.webapp.RelativeOrdering;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.eclipse.jetty.webapp.WebDescriptor;
|
||||
|
|
|
@ -85,7 +85,7 @@ public class TestAnnotationDecorator
|
|||
{
|
||||
new AnnotationDecorator(null);
|
||||
});
|
||||
|
||||
|
||||
WebAppContext context = new WebAppContext();
|
||||
AnnotationDecorator decorator = new AnnotationDecorator(context);
|
||||
ServletE servlet = new ServletE();
|
||||
|
@ -94,10 +94,10 @@ public class TestAnnotationDecorator
|
|||
LifeCycleCallbackCollection callbacks = (LifeCycleCallbackCollection)context.getAttribute(LifeCycleCallbackCollection.LIFECYCLE_CALLBACK_COLLECTION);
|
||||
assertNotNull(callbacks);
|
||||
assertFalse(callbacks.getPreDestroyCallbacks().isEmpty());
|
||||
|
||||
|
||||
//reset
|
||||
context.removeAttribute(LifeCycleCallbackCollection.LIFECYCLE_CALLBACK_COLLECTION);
|
||||
|
||||
|
||||
//test with BaseHolder metadata, should not introspect with metdata-complete==true
|
||||
context.getMetaData().setWebDescriptor(new TestWebDescriptor(MetaData.Complete.True));
|
||||
assertTrue(context.getMetaData().isMetaDataComplete());
|
||||
|
@ -110,10 +110,10 @@ public class TestAnnotationDecorator
|
|||
DecoratedObjectFactory.disassociateInfo();
|
||||
callbacks = (LifeCycleCallbackCollection)context.getAttribute(LifeCycleCallbackCollection.LIFECYCLE_CALLBACK_COLLECTION);
|
||||
assertNull(callbacks);
|
||||
|
||||
|
||||
//reset
|
||||
context.removeAttribute(LifeCycleCallbackCollection.LIFECYCLE_CALLBACK_COLLECTION);
|
||||
|
||||
|
||||
//test with BaseHolder metadata, should introspect with metadata-complete==false
|
||||
context.getMetaData().setWebDescriptor(new TestWebDescriptor(MetaData.Complete.False));
|
||||
DecoratedObjectFactory.associateInfo(holder);
|
||||
|
|
|
@ -20,10 +20,10 @@ package org.eclipse.jetty.annotations;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.eclipse.jetty.logging.StacklessLogging;
|
||||
import org.eclipse.jetty.servlet.ServletHolder;
|
||||
import org.eclipse.jetty.servlet.Source;
|
||||
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
||||
import org.eclipse.jetty.util.log.StacklessLogging;
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
import org.eclipse.jetty.webapp.FragmentDescriptor;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
|
|
|
@ -76,7 +76,7 @@ public class TestResourceAnnotations
|
|||
AnnotationIntrospector parser = new AnnotationIntrospector(wac);
|
||||
ResourceAnnotationHandler handler = new ResourceAnnotationHandler(wac);
|
||||
parser.registerHandler(handler);
|
||||
|
||||
|
||||
ResourceA resourceA = new ResourceA();
|
||||
ResourceB resourceB = new ResourceB();
|
||||
parser.introspect(resourceA, null);
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
|
||||
# Jetty Logging using jetty-slf4j-impl
|
||||
#org.eclipse.jetty.LEVEL=DEBUG
|
||||
#org.eclipse.jetty.annotations.LEVEL=DEBUG
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<web-fragment
|
||||
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-fragment_4_0.xsd"
|
||||
version="4.0">
|
||||
<web-fragment xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-fragment_4_0.xsd" version="4.0">
|
||||
<name>ardvaark</name>
|
||||
</web-fragment>
|
||||
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<web-fragment
|
||||
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-fragment_4_0.xsd"
|
||||
metadata-complete="true"
|
||||
version="4.0">
|
||||
<web-fragment xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-fragment_4_0.xsd" metadata-complete="true" version="4.0">
|
||||
|
||||
<name>badger</name>
|
||||
|
||||
|
|
|
@ -49,21 +49,21 @@ import org.eclipse.jetty.servlet.ServletHandler;
|
|||
import org.eclipse.jetty.servlet.ServletHolder;
|
||||
import org.eclipse.jetty.servlet.ServletMapping;
|
||||
import org.eclipse.jetty.servlet.Source;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.resource.PathResource;
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
import org.eclipse.jetty.webapp.MetaInfConfiguration;
|
||||
import org.eclipse.jetty.webapp.WebAppClassLoader;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.eclipse.jetty.xml.XmlConfiguration;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Extension of WebAppContext to allow configuration via Ant environment.
|
||||
*/
|
||||
public class AntWebAppContext extends WebAppContext
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(WebAppContext.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(WebAppContext.class);
|
||||
|
||||
public static final String DEFAULT_CONTAINER_INCLUDE_JAR_PATTERN =
|
||||
".*/.*jsp-api-[^/]*\\.jar$|.*/.*jsp-[^/]*\\.jar$|.*/.*taglibs[^/]*\\.jar$|.*/.*jstl[^/]*\\.jar$|.*/.*jsf-impl-[^/]*\\.jar$|.*/.*javax.faces-[^/]*\\.jar$|.*/.*myfaces-impl-[^/]*\\.jar$";
|
||||
|
@ -176,7 +176,7 @@ public class AntWebAppContext extends WebAppContext
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOG.ignore(e);
|
||||
LOG.trace("IGNORED", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,10 @@ package org.eclipse.jetty.ant;
|
|||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.webapp.Configuration;
|
||||
import org.eclipse.jetty.webapp.WebXmlConfiguration;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* This configuration object provides additional way to inject application
|
||||
|
@ -34,7 +34,7 @@ import org.eclipse.jetty.webapp.WebXmlConfiguration;
|
|||
*/
|
||||
public class AntWebXmlConfiguration extends WebXmlConfiguration
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(WebXmlConfiguration.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(WebXmlConfiguration.class);
|
||||
|
||||
/**
|
||||
* List of classpath files.
|
||||
|
|
|
@ -26,8 +26,8 @@ import javax.servlet.ServletContext;
|
|||
import org.eclipse.jetty.annotations.AnnotationConfiguration;
|
||||
import org.eclipse.jetty.servlet.ServletContextHandler;
|
||||
import org.eclipse.jetty.util.Loader;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* <p>A {@link ServletContainerInitializer} that introspects for a CDI API
|
||||
|
@ -48,7 +48,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
public class CdiServletContainerInitializer implements ServletContainerInitializer
|
||||
{
|
||||
public static final String CDI_INTEGRATION_ATTRIBUTE = "org.eclipse.jetty.cdi";
|
||||
private static final Logger LOG = Log.getLogger(CdiServletContainerInitializer.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(CdiServletContainerInitializer.class);
|
||||
|
||||
@Override
|
||||
public void onStartup(Set<Class<?>> c, ServletContext ctx)
|
||||
|
|
|
@ -26,8 +26,8 @@ import java.util.Map;
|
|||
|
||||
import org.eclipse.jetty.servlet.ServletContextHandler;
|
||||
import org.eclipse.jetty.util.Decorator;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* A Decorator that invokes the CDI provider within a webapp to decorate objects created by
|
||||
|
@ -47,7 +47,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
*/
|
||||
public class CdiSpiDecorator implements Decorator
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(CdiServletContainerInitializer.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(CdiServletContainerInitializer.class);
|
||||
public static final String MODE = "CdiSpiDecorator";
|
||||
|
||||
private final ServletContextHandler _context;
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
@{argLine} ${jetty.surefire.argLine}
|
||||
--add-modules java.security.jgss
|
||||
--add-modules org.eclipse.jetty.jmx
|
||||
--add-modules org.slf4j
|
||||
</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
@ -157,11 +156,10 @@
|
|||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-slf4j-impl</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -28,9 +28,11 @@ module org.eclipse.jetty.client
|
|||
|
||||
requires org.eclipse.jetty.alpn.client;
|
||||
requires transitive org.eclipse.jetty.http;
|
||||
requires org.slf4j;
|
||||
|
||||
// Only required if using SPNEGO.
|
||||
requires static java.security.jgss;
|
||||
// Only required if using JMX.
|
||||
requires static java.management;
|
||||
requires static org.eclipse.jetty.jmx;
|
||||
}
|
||||
|
|
|
@ -29,13 +29,13 @@ import org.eclipse.jetty.util.Promise;
|
|||
import org.eclipse.jetty.util.annotation.ManagedAttribute;
|
||||
import org.eclipse.jetty.util.annotation.ManagedObject;
|
||||
import org.eclipse.jetty.util.component.Dumpable;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ManagedObject
|
||||
public abstract class AbstractConnectionPool implements ConnectionPool, Dumpable
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(AbstractConnectionPool.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AbstractConnectionPool.class);
|
||||
|
||||
private final AtomicBoolean closed = new AtomicBoolean();
|
||||
|
||||
|
|
|
@ -24,13 +24,13 @@ import org.eclipse.jetty.client.api.Connection;
|
|||
import org.eclipse.jetty.util.Promise;
|
||||
import org.eclipse.jetty.util.annotation.ManagedObject;
|
||||
import org.eclipse.jetty.util.component.ContainerLifeCycle;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ManagedObject
|
||||
public abstract class AbstractHttpClientTransport extends ContainerLifeCycle implements HttpClientTransport
|
||||
{
|
||||
protected static final Logger LOG = Log.getLogger(HttpClientTransport.class);
|
||||
protected static final Logger LOG = LoggerFactory.getLogger(HttpClientTransport.class);
|
||||
|
||||
private HttpClient client;
|
||||
private ConnectionPool.Factory factory;
|
||||
|
|
|
@ -40,13 +40,13 @@ import org.eclipse.jetty.http.HttpField;
|
|||
import org.eclipse.jetty.http.HttpHeader;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.http.QuotedCSV;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public abstract class AuthenticationProtocolHandler implements ProtocolHandler
|
||||
{
|
||||
public static final int DEFAULT_MAX_CONTENT_LENGTH = 16 * 1024;
|
||||
public static final Logger LOG = Log.getLogger(AuthenticationProtocolHandler.class);
|
||||
public static final Logger LOG = LoggerFactory.getLogger(AuthenticationProtocolHandler.class);
|
||||
private final HttpClient client;
|
||||
private final int maxContentLength;
|
||||
private final ResponseNotifier notifier;
|
||||
|
|
|
@ -37,14 +37,14 @@ import org.eclipse.jetty.util.annotation.ManagedAttribute;
|
|||
import org.eclipse.jetty.util.annotation.ManagedObject;
|
||||
import org.eclipse.jetty.util.component.Dumpable;
|
||||
import org.eclipse.jetty.util.component.DumpableCollection;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.thread.Sweeper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ManagedObject
|
||||
public class DuplexConnectionPool extends AbstractConnectionPool implements Sweeper.Sweepable
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(DuplexConnectionPool.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(DuplexConnectionPool.class);
|
||||
|
||||
private final ReentrantLock lock = new ReentrantLock();
|
||||
private final Deque<Connection> idleConnections;
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
package org.eclipse.jetty.client;
|
||||
|
||||
import org.eclipse.jetty.client.api.Result;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public abstract class HttpChannel
|
||||
{
|
||||
protected static final Logger LOG = Log.getLogger(HttpChannel.class);
|
||||
protected static final Logger LOG = LoggerFactory.getLogger(HttpChannel.class);
|
||||
|
||||
private final HttpDestination _destination;
|
||||
private final TimeoutCompleteListener _totalTimeout;
|
||||
|
|
|
@ -74,13 +74,13 @@ import org.eclipse.jetty.util.annotation.ManagedAttribute;
|
|||
import org.eclipse.jetty.util.annotation.ManagedObject;
|
||||
import org.eclipse.jetty.util.component.ContainerLifeCycle;
|
||||
import org.eclipse.jetty.util.component.DumpableCollection;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
import org.eclipse.jetty.util.thread.QueuedThreadPool;
|
||||
import org.eclipse.jetty.util.thread.ScheduledExecutorScheduler;
|
||||
import org.eclipse.jetty.util.thread.Scheduler;
|
||||
import org.eclipse.jetty.util.thread.ThreadPool;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* <p>HttpClient provides an efficient, asynchronous, non-blocking implementation
|
||||
|
@ -122,7 +122,7 @@ import org.eclipse.jetty.util.thread.ThreadPool;
|
|||
public class HttpClient extends ContainerLifeCycle
|
||||
{
|
||||
public static final String USER_AGENT = "Jetty/" + Jetty.VERSION;
|
||||
private static final Logger LOG = Log.getLogger(HttpClient.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HttpClient.class);
|
||||
|
||||
private final ConcurrentMap<Origin, HttpDestination> destinations = new ConcurrentHashMap<>();
|
||||
private final ProtocolHandlers handlers = new ProtocolHandlers();
|
||||
|
|
|
@ -34,12 +34,12 @@ import org.eclipse.jetty.http.HttpFields;
|
|||
import org.eclipse.jetty.http.HttpHeader;
|
||||
import org.eclipse.jetty.http.HttpVersion;
|
||||
import org.eclipse.jetty.util.HttpCookieStore;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public abstract class HttpConnection implements IConnection
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(HttpConnection.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HttpConnection.class);
|
||||
|
||||
private final HttpDestination destination;
|
||||
private int idleTimeoutGuard;
|
||||
|
|
|
@ -27,8 +27,8 @@ import org.eclipse.jetty.client.api.ContentProvider;
|
|||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.IO;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* {@link HttpContent} is a stateful, linear representation of the request content provided
|
||||
|
@ -66,7 +66,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
*/
|
||||
public class HttpContent implements Callback, Closeable
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(HttpContent.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HttpContent.class);
|
||||
private static final ByteBuffer AFTER = ByteBuffer.allocate(0);
|
||||
private static final ByteBuffer CLOSE = ByteBuffer.allocate(0);
|
||||
|
||||
|
|
|
@ -25,12 +25,12 @@ import java.util.concurrent.ConcurrentLinkedDeque;
|
|||
|
||||
import org.eclipse.jetty.client.api.Response;
|
||||
import org.eclipse.jetty.util.AttributesMap;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class HttpConversation extends AttributesMap
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(HttpConversation.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HttpConversation.class);
|
||||
|
||||
private final Deque<HttpExchange> exchanges = new ConcurrentLinkedDeque<>();
|
||||
private volatile List<Response.ResponseListener> listeners;
|
||||
|
|
|
@ -46,16 +46,16 @@ import org.eclipse.jetty.util.annotation.ManagedObject;
|
|||
import org.eclipse.jetty.util.component.ContainerLifeCycle;
|
||||
import org.eclipse.jetty.util.component.Dumpable;
|
||||
import org.eclipse.jetty.util.component.DumpableCollection;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
import org.eclipse.jetty.util.thread.Scheduler;
|
||||
import org.eclipse.jetty.util.thread.Sweeper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ManagedObject
|
||||
public abstract class HttpDestination extends ContainerLifeCycle implements Destination, Closeable, Callback, Dumpable
|
||||
{
|
||||
protected static final Logger LOG = Log.getLogger(HttpDestination.class);
|
||||
protected static final Logger LOG = LoggerFactory.getLogger(HttpDestination.class);
|
||||
|
||||
private final HttpClient client;
|
||||
private final Origin origin;
|
||||
|
|
|
@ -22,12 +22,12 @@ import java.util.List;
|
|||
|
||||
import org.eclipse.jetty.client.api.Response;
|
||||
import org.eclipse.jetty.client.api.Result;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class HttpExchange
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(HttpExchange.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HttpExchange.class);
|
||||
|
||||
private final HttpDestination destination;
|
||||
private final HttpRequest request;
|
||||
|
|
|
@ -38,13 +38,13 @@ import org.eclipse.jetty.io.ClientConnectionFactory;
|
|||
import org.eclipse.jetty.io.ClientConnector;
|
||||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.util.Promise;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class HttpProxy extends ProxyConfiguration.Proxy
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(HttpProxy.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HttpProxy.class);
|
||||
|
||||
public HttpProxy(String host, int port)
|
||||
{
|
||||
|
|
|
@ -42,8 +42,8 @@ import org.eclipse.jetty.util.BufferUtil;
|
|||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.MathUtils;
|
||||
import org.eclipse.jetty.util.component.Destroyable;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* {@link HttpReceiver} provides the abstract code to implement the various steps of the receive of HTTP responses.
|
||||
|
@ -72,7 +72,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
*/
|
||||
public abstract class HttpReceiver
|
||||
{
|
||||
protected static final Logger LOG = Log.getLogger(HttpReceiver.class);
|
||||
protected static final Logger LOG = LoggerFactory.getLogger(HttpReceiver.class);
|
||||
|
||||
private final AtomicReference<ResponseState> responseState = new AtomicReference<>(ResponseState.IDLE);
|
||||
private final HttpChannel channel;
|
||||
|
@ -286,7 +286,7 @@ public abstract class HttpReceiver
|
|||
catch (IOException x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(x);
|
||||
LOG.debug("Unable to store cookies {} from {}", field, uri, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ import org.eclipse.jetty.client.api.Response;
|
|||
import org.eclipse.jetty.client.api.Result;
|
||||
import org.eclipse.jetty.client.util.BufferingResponseListener;
|
||||
import org.eclipse.jetty.http.HttpMethod;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Utility class that handles HTTP redirects.
|
||||
|
@ -60,7 +60,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
*/
|
||||
public class HttpRedirector
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(HttpRedirector.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HttpRedirector.class);
|
||||
private static final String SCHEME_REGEXP = "(^https?)";
|
||||
private static final String AUTHORITY_REGEXP = "([^/?#]+)";
|
||||
// The location may be relative so the scheme://authority part may be missing
|
||||
|
|
|
@ -31,8 +31,8 @@ import org.eclipse.jetty.http.HttpHeaderValue;
|
|||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.IteratingCallback;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* {@link HttpSender} abstracts the algorithm to send HTTP requests, so that subclasses only implement
|
||||
|
@ -59,7 +59,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
*/
|
||||
public abstract class HttpSender implements AsyncContentProvider.Listener
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(HttpSender.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HttpSender.class);
|
||||
|
||||
private final AtomicReference<RequestState> requestState = new AtomicReference<>(RequestState.QUEUED);
|
||||
private final AtomicReference<SenderState> senderState = new AtomicReference<>(SenderState.IDLE);
|
||||
|
@ -363,7 +363,7 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
catch (RejectedExecutionException x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(x);
|
||||
LOG.debug("Exchange aborted {}", exchange, x);
|
||||
abort(exchange, failure);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,12 +22,12 @@ import org.eclipse.jetty.client.api.Connection;
|
|||
import org.eclipse.jetty.client.api.Destination;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.LeakDetector;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class LeakTrackingConnectionPool extends DuplexConnectionPool
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(LeakTrackingConnectionPool.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(LeakTrackingConnectionPool.class);
|
||||
|
||||
private final LeakDetector<Connection> leakDetector = new LeakDetector<Connection>()
|
||||
{
|
||||
|
|
|
@ -32,13 +32,13 @@ import org.eclipse.jetty.client.api.Connection;
|
|||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.component.Dumpable;
|
||||
import org.eclipse.jetty.util.component.DumpableCollection;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.thread.Sweeper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class MultiplexConnectionPool extends AbstractConnectionPool implements ConnectionPool.Multiplexable, Sweeper.Sweepable
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(MultiplexConnectionPool.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MultiplexConnectionPool.class);
|
||||
|
||||
private final HttpDestination destination;
|
||||
private final Deque<Holder> idleConnections;
|
||||
|
|
|
@ -36,8 +36,8 @@ import org.eclipse.jetty.io.Connection;
|
|||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.Promise;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* <p>ClientConnectionFactory for the
|
||||
|
@ -446,7 +446,7 @@ public abstract class ProxyProtocolClientConnectionFactory implements ClientConn
|
|||
|
||||
protected abstract static class ProxyProtocolConnection extends AbstractConnection implements Callback
|
||||
{
|
||||
protected static final Logger LOG = Log.getLogger(ProxyProtocolConnection.class);
|
||||
protected static final Logger LOG = LoggerFactory.getLogger(ProxyProtocolConnection.class);
|
||||
|
||||
private final ClientConnectionFactory factory;
|
||||
private final Map<String, Object> context;
|
||||
|
|
|
@ -22,12 +22,12 @@ import java.nio.ByteBuffer;
|
|||
import java.util.List;
|
||||
|
||||
import org.eclipse.jetty.client.api.Request;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class RequestNotifier
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ResponseNotifier.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ResponseNotifier.class);
|
||||
|
||||
private final HttpClient client;
|
||||
|
||||
|
|
|
@ -32,12 +32,12 @@ import org.eclipse.jetty.client.api.Result;
|
|||
import org.eclipse.jetty.http.HttpField;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.CountingCallback;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ResponseNotifier
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ResponseNotifier.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ResponseNotifier.class);
|
||||
|
||||
public void notifyBegin(List<Response.ResponseListener> listeners, Response response)
|
||||
{
|
||||
|
|
|
@ -35,8 +35,8 @@ import org.eclipse.jetty.io.EndPoint;
|
|||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.Promise;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class Socks4Proxy extends ProxyConfiguration.Proxy
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ public class Socks4Proxy extends ProxyConfiguration.Proxy
|
|||
private static class Socks4ProxyConnection extends AbstractConnection implements Callback
|
||||
{
|
||||
private static final Pattern IPv4_PATTERN = Pattern.compile("(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})");
|
||||
private static final Logger LOG = Log.getLogger(Socks4ProxyConnection.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(Socks4ProxyConnection.class);
|
||||
|
||||
private final Socks4Parser parser = new Socks4Parser();
|
||||
private final ClientConnectionFactory connectionFactory;
|
||||
|
|
|
@ -26,13 +26,13 @@ import org.eclipse.jetty.client.api.Request;
|
|||
import org.eclipse.jetty.client.api.Response;
|
||||
import org.eclipse.jetty.client.api.Result;
|
||||
import org.eclipse.jetty.io.CyclicTimeout;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.thread.Scheduler;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class TimeoutCompleteListener extends CyclicTimeout implements Response.CompleteListener
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(TimeoutCompleteListener.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(TimeoutCompleteListener.class);
|
||||
|
||||
private final AtomicReference<Request> request = new AtomicReference<>();
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@ import org.eclipse.jetty.client.api.Destination;
|
|||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.annotation.ManagedAttribute;
|
||||
import org.eclipse.jetty.util.component.DumpableCollection;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.thread.Scheduler;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* <p>A connection pool that validates connections before
|
||||
|
@ -59,7 +59,7 @@ import org.eclipse.jetty.util.thread.Scheduler;
|
|||
*/
|
||||
public class ValidatingConnectionPool extends DuplexConnectionPool
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ValidatingConnectionPool.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ValidatingConnectionPool.class);
|
||||
|
||||
private final Scheduler scheduler;
|
||||
private final long timeout;
|
||||
|
|
|
@ -45,13 +45,13 @@ import org.eclipse.jetty.http.HttpVersion;
|
|||
import org.eclipse.jetty.io.AbstractConnection;
|
||||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.util.Promise;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.thread.Sweeper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class HttpConnectionOverHTTP extends AbstractConnection implements IConnection, org.eclipse.jetty.io.Connection.UpgradeFrom, Sweeper.Sweepable
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(HttpConnectionOverHTTP.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HttpConnectionOverHTTP.class);
|
||||
|
||||
private final AtomicBoolean closed = new AtomicBoolean();
|
||||
private final AtomicInteger sweeps = new AtomicInteger();
|
||||
|
|
|
@ -142,10 +142,10 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
|
|||
|
||||
private void process()
|
||||
{
|
||||
HttpConnectionOverHTTP connection = getHttpConnection();
|
||||
EndPoint endPoint = connection.getEndPoint();
|
||||
try
|
||||
{
|
||||
HttpConnectionOverHTTP connection = getHttpConnection();
|
||||
EndPoint endPoint = connection.getEndPoint();
|
||||
while (true)
|
||||
{
|
||||
// Always parse even empty buffers to advance the parser.
|
||||
|
@ -192,7 +192,7 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(x);
|
||||
LOG.debug("Unable to fill from endpoint {}", endPoint, x);
|
||||
networkBuffer.clear();
|
||||
releaseNetworkBuffer();
|
||||
failAndClose(x);
|
||||
|
|
|
@ -66,7 +66,7 @@ public class HttpSenderOverHTTP extends HttpSender
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(x);
|
||||
LOG.debug("Unable to send headers on exchange {}", exchange, x);
|
||||
callback.failed(x);
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ public class HttpSenderOverHTTP extends HttpSender
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(x);
|
||||
LOG.debug("Unable to send content on {}", exchange, x);
|
||||
callback.failed(x);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,8 +36,8 @@ import org.eclipse.jetty.io.ClientConnectionFactory;
|
|||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.Promise;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ProxyProtocolClientConnectionFactory implements ClientConnectionFactory
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ public class ProxyProtocolClientConnectionFactory implements ClientConnectionFac
|
|||
|
||||
private class ProxyProtocolConnection extends AbstractConnection implements Callback
|
||||
{
|
||||
private final Logger log = Log.getLogger(ProxyProtocolConnection.class);
|
||||
private final Logger log = LoggerFactory.getLogger(ProxyProtocolConnection.class);
|
||||
private final Map<String, Object> context;
|
||||
|
||||
public ProxyProtocolConnection(EndPoint endPoint, Executor executor, Map<String, Object> context)
|
||||
|
|
|
@ -28,8 +28,8 @@ import java.util.NoSuchElementException;
|
|||
import org.eclipse.jetty.client.api.ContentProvider;
|
||||
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;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* A {@link ContentProvider} for an {@link InputStream}.
|
||||
|
@ -53,7 +53,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
*/
|
||||
public class InputStreamContentProvider implements ContentProvider, Callback, Closeable
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(InputStreamContentProvider.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(InputStreamContentProvider.class);
|
||||
|
||||
private final InputStreamContentProviderIterator iterator = new InputStreamContentProviderIterator();
|
||||
private final InputStream stream;
|
||||
|
@ -131,7 +131,7 @@ public class InputStreamContentProvider implements ContentProvider, Callback, Cl
|
|||
}
|
||||
catch (IOException x)
|
||||
{
|
||||
LOG.ignore(x);
|
||||
LOG.trace("IGNORED", x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ public class InputStreamContentProvider implements ContentProvider, Callback, Cl
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(x);
|
||||
LOG.debug("Failed to read", x);
|
||||
if (failure == null)
|
||||
{
|
||||
failure = x;
|
||||
|
|
|
@ -41,8 +41,8 @@ import org.eclipse.jetty.client.api.Result;
|
|||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.IO;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Implementation of {@link Listener} that produces an {@link InputStream}
|
||||
|
@ -75,7 +75,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
*/
|
||||
public class InputStreamResponseListener extends Listener.Adapter
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(InputStreamResponseListener.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(InputStreamResponseListener.class);
|
||||
private static final DeferredContentProvider.Chunk EOF = new DeferredContentProvider.Chunk(BufferUtil.EMPTY_BUFFER, Callback.NOOP);
|
||||
private final Object lock = this;
|
||||
private final CountDownLatch responseLatch = new CountDownLatch(1);
|
||||
|
|
|
@ -39,8 +39,8 @@ import org.eclipse.jetty.http.HttpHeader;
|
|||
import org.eclipse.jetty.io.RuntimeIOException;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.IO;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* <p>A {@link ContentProvider} for form uploads with the {@code "multipart/form-data"}
|
||||
|
@ -66,7 +66,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
*/
|
||||
public class MultiPartContentProvider extends AbstractTypedContentProvider implements AsyncContentProvider, Closeable
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(MultiPartContentProvider.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MultiPartContentProvider.class);
|
||||
private static final byte[] COLON_SPACE_BYTES = new byte[]{':', ' '};
|
||||
private static final byte[] CR_LF_BYTES = new byte[]{'\r', '\n'};
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ import java.util.NoSuchElementException;
|
|||
import org.eclipse.jetty.client.api.ContentProvider;
|
||||
import org.eclipse.jetty.io.ByteBufferPool;
|
||||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* <p>A {@link ContentProvider} for files using JDK 7's {@code java.nio.file} APIs.</p>
|
||||
|
@ -46,7 +46,7 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
*/
|
||||
public class PathContentProvider extends AbstractTypedContentProvider
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(PathContentProvider.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(PathContentProvider.class);
|
||||
|
||||
private final Path filePath;
|
||||
private final long fileSize;
|
||||
|
@ -183,7 +183,7 @@ public class PathContentProvider extends AbstractTypedContentProvider
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.ignore(x);
|
||||
LOG.trace("IGNORED", x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,13 +41,13 @@ import org.eclipse.jetty.client.api.ContentResponse;
|
|||
import org.eclipse.jetty.client.api.Request;
|
||||
import org.eclipse.jetty.http.HttpHeader;
|
||||
import org.eclipse.jetty.util.Attributes;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.ietf.jgss.GSSContext;
|
||||
import org.ietf.jgss.GSSException;
|
||||
import org.ietf.jgss.GSSManager;
|
||||
import org.ietf.jgss.GSSName;
|
||||
import org.ietf.jgss.Oid;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* <p>Implementation of the SPNEGO (or "Negotiate") authentication defined in RFC 4559.</p>
|
||||
|
@ -61,7 +61,7 @@ import org.ietf.jgss.Oid;
|
|||
*/
|
||||
public class SPNEGOAuthentication extends AbstractAuthentication
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(SPNEGOAuthentication.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SPNEGOAuthentication.class);
|
||||
private static final String NEGOTIATE = HttpHeader.NEGOTIATE.asString();
|
||||
|
||||
private final GSSManager gssManager = GSSManager.getInstance();
|
||||
|
|
|
@ -82,6 +82,7 @@ import org.eclipse.jetty.http.HttpVersion;
|
|||
import org.eclipse.jetty.io.AbstractConnection;
|
||||
import org.eclipse.jetty.io.ClientConnector;
|
||||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.logging.StacklessLogging;
|
||||
import org.eclipse.jetty.server.handler.AbstractHandler;
|
||||
import org.eclipse.jetty.toolchain.test.Net;
|
||||
import org.eclipse.jetty.toolchain.test.jupiter.WorkDir;
|
||||
|
@ -92,7 +93,6 @@ import org.eclipse.jetty.util.FuturePromise;
|
|||
import org.eclipse.jetty.util.IO;
|
||||
import org.eclipse.jetty.util.Promise;
|
||||
import org.eclipse.jetty.util.SocketAddressResolver;
|
||||
import org.eclipse.jetty.util.log.StacklessLogging;
|
||||
import org.hamcrest.Matchers;
|
||||
import org.junit.jupiter.api.Assumptions;
|
||||
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
|
||||
|
|
|
@ -35,13 +35,14 @@ import org.eclipse.jetty.client.api.Result;
|
|||
import org.eclipse.jetty.client.util.ByteBufferContentProvider;
|
||||
import org.eclipse.jetty.http.HttpHeader;
|
||||
import org.eclipse.jetty.http.HttpVersion;
|
||||
import org.eclipse.jetty.logging.StacklessLogging;
|
||||
import org.eclipse.jetty.server.handler.AbstractHandler;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.StacklessLogging;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ArgumentsSource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
|
@ -49,6 +50,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
|
||||
public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
|
||||
{
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HttpConnectionLifecycleTest.class);
|
||||
|
||||
@Override
|
||||
public HttpClient newHttpClient(HttpClientTransport transport)
|
||||
{
|
||||
|
@ -403,7 +406,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
|
|||
Collection<Connection> activeConnections = connectionPool.getActiveConnections();
|
||||
assertEquals(0, activeConnections.size());
|
||||
|
||||
Log.getLogger(HttpConnection.class).info("Expecting java.lang.IllegalStateException: HttpParser{s=CLOSED,...");
|
||||
LOG.info("Expecting java.lang.IllegalStateException: HttpParser{s=CLOSED,...");
|
||||
|
||||
CountDownLatch latch = new CountDownLatch(1);
|
||||
ByteBuffer buffer = ByteBuffer.allocate(16 * 1024 * 1024);
|
||||
|
|
|
@ -33,9 +33,9 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import org.eclipse.jetty.client.api.Request;
|
||||
import org.eclipse.jetty.client.api.Result;
|
||||
import org.eclipse.jetty.client.util.ByteBufferContentProvider;
|
||||
import org.eclipse.jetty.logging.StacklessLogging;
|
||||
import org.eclipse.jetty.server.handler.AbstractHandler;
|
||||
import org.eclipse.jetty.util.IO;
|
||||
import org.eclipse.jetty.util.log.StacklessLogging;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ArgumentsSource;
|
||||
|
||||
|
|
|
@ -31,14 +31,14 @@ import org.eclipse.jetty.server.Handler;
|
|||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.server.ServerConnector;
|
||||
import org.eclipse.jetty.util.SocketAddressResolver;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.thread.QueuedThreadPool;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
|
@ -120,7 +120,7 @@ public class LivelockTest
|
|||
|
||||
int requestRate = 5;
|
||||
long pause = 1000 / requestRate;
|
||||
Logger clientLog = Log.getLogger("TESTClient");
|
||||
Logger clientLog = LoggerFactory.getLogger("TESTClient");
|
||||
CountDownLatch latch = new CountDownLatch(count);
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
|
@ -133,9 +133,9 @@ public class LivelockTest
|
|||
else
|
||||
{
|
||||
if (result.getRequestFailure() != null)
|
||||
clientLog.warn(result.getRequestFailure());
|
||||
clientLog.warn("Request Failure on {}", result, result.getRequestFailure());
|
||||
if (result.getResponseFailure() != null)
|
||||
clientLog.warn(result.getResponseFailure());
|
||||
clientLog.warn("Response Failure on {}", result, result.getResponseFailure());
|
||||
}
|
||||
});
|
||||
sleep(pause);
|
||||
|
|
|
@ -33,14 +33,14 @@ import java.util.concurrent.ExecutorService;
|
|||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public abstract class SslBytesTest
|
||||
{
|
||||
protected final Logger logger = Log.getLogger(getClass());
|
||||
protected final Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
public static class TLSRecord
|
||||
{
|
||||
|
@ -146,10 +146,7 @@ public abstract class SslBytesTest
|
|||
}
|
||||
catch (IOException x)
|
||||
{
|
||||
logger.info(x.getClass() + ": " + x.getMessage());
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug(x);
|
||||
logger.warn("Unable to accept from {}", serverSocket, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,8 +51,6 @@ import org.eclipse.jetty.server.session.DefaultSessionIdManager;
|
|||
import org.eclipse.jetty.server.session.SessionHandler;
|
||||
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
||||
import org.eclipse.jetty.util.IO;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.security.Constraint;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
|
@ -60,6 +58,8 @@ import org.junit.jupiter.api.condition.DisabledOnJre;
|
|||
import org.junit.jupiter.api.condition.JRE;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ArgumentsSource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
@ -71,7 +71,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
|
|||
@DisabledOnJre({JRE.JAVA_8, JRE.JAVA_9, JRE.JAVA_10})
|
||||
public class SPNEGOAuthenticationTest extends AbstractHttpClientServerTest
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(SPNEGOAuthenticationTest.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SPNEGOAuthenticationTest.class);
|
||||
|
||||
static
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
|
||||
# Jetty Logging using jetty-slf4j-impl
|
||||
#org.eclipse.jetty.LEVEL=DEBUG
|
||||
#org.eclipse.jetty.client.LEVEL=DEBUG
|
||||
#org.eclipse.jetty.io.ChannelEndPoint.LEVEL=DEBUG
|
||||
|
|
|
@ -45,13 +45,27 @@
|
|||
<artifactId>jetty-xml</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-jmx</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-slf4j-impl</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-test-helper</artifactId>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue