Merged branch 'origin/master' into 'jetty-http2'.
This commit is contained in:
commit
66f3913527
|
@ -62,7 +62,8 @@ public class ALPNServerConnection extends NegotiatingServerConnection implements
|
|||
{
|
||||
negotiated = getDefaultProtocol();
|
||||
}
|
||||
LOG.debug("{} protocol selected {}", this, negotiated);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} protocol selected {}", this, negotiated);
|
||||
setProtocol(negotiated);
|
||||
ALPN.remove(getSSLEngine());
|
||||
return negotiated;
|
||||
|
|
|
@ -86,7 +86,8 @@ public abstract class AuthenticationProtocolHandler implements ProtocolHandler
|
|||
if (result.isFailed())
|
||||
{
|
||||
Throwable failure = result.getFailure();
|
||||
LOG.debug("Authentication challenge failed {}", failure);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Authentication challenge failed {}", failure);
|
||||
forwardFailureComplete(request, result.getRequestFailure(), response, result.getResponseFailure());
|
||||
return;
|
||||
}
|
||||
|
@ -95,7 +96,8 @@ public abstract class AuthenticationProtocolHandler implements ProtocolHandler
|
|||
if (conversation.getAttribute(AUTHENTICATION_ATTRIBUTE) != null)
|
||||
{
|
||||
// We have already tried to authenticate, but we failed again
|
||||
LOG.debug("Bad credentials for {}", request);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Bad credentials for {}", request);
|
||||
forwardSuccessComplete(request, response);
|
||||
return;
|
||||
}
|
||||
|
@ -104,7 +106,8 @@ public abstract class AuthenticationProtocolHandler implements ProtocolHandler
|
|||
List<Authentication.HeaderInfo> headerInfos = parseAuthenticateHeader(response, header);
|
||||
if (headerInfos.isEmpty())
|
||||
{
|
||||
LOG.debug("Authentication challenge without {} header", header);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Authentication challenge without {} header", header);
|
||||
forwardFailureComplete(request, null, response, new HttpResponseException("HTTP protocol violation: Authentication challenge without " + header + " header", response));
|
||||
return;
|
||||
}
|
||||
|
@ -126,13 +129,15 @@ public abstract class AuthenticationProtocolHandler implements ProtocolHandler
|
|||
}
|
||||
if (authentication == null)
|
||||
{
|
||||
LOG.debug("No authentication available for {}", request);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("No authentication available for {}", request);
|
||||
forwardSuccessComplete(request, response);
|
||||
return;
|
||||
}
|
||||
|
||||
final Authentication.Result authnResult = authentication.authenticate(request, response, headerInfo, conversation);
|
||||
LOG.debug("Authentication result {}", authnResult);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Authentication result {}", authnResult);
|
||||
if (authnResult == null)
|
||||
{
|
||||
forwardSuccessComplete(request, response);
|
||||
|
|
|
@ -81,21 +81,24 @@ public class ConnectionPool implements Closeable, Dumpable
|
|||
|
||||
if (next > maxConnections)
|
||||
{
|
||||
LOG.debug("Max connections {}/{} reached", current, maxConnections);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Max connections {}/{} reached", current, maxConnections);
|
||||
// Try again the idle connections
|
||||
return acquireIdleConnection();
|
||||
}
|
||||
|
||||
if (connectionCount.compareAndSet(current, next))
|
||||
{
|
||||
LOG.debug("Connection {}/{} creation", next, maxConnections);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Connection {}/{} creation", next, maxConnections);
|
||||
|
||||
destination.newConnection(new Promise<Connection>()
|
||||
{
|
||||
@Override
|
||||
public void succeeded(Connection connection)
|
||||
{
|
||||
LOG.debug("Connection {}/{} creation succeeded {}", next, maxConnections, connection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Connection {}/{} creation succeeded {}", next, maxConnections, connection);
|
||||
if (activate(connection))
|
||||
connectionPromise.succeeded(connection);
|
||||
}
|
||||
|
@ -103,7 +106,8 @@ public class ConnectionPool implements Closeable, Dumpable
|
|||
@Override
|
||||
public void failed(Throwable x)
|
||||
{
|
||||
LOG.debug("Connection " + next + "/" + maxConnections + " creation failed", x);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Connection " + next + "/" + maxConnections + " creation failed", x);
|
||||
connectionCount.decrementAndGet();
|
||||
connectionPromise.failed(x);
|
||||
}
|
||||
|
@ -127,13 +131,15 @@ public class ConnectionPool implements Closeable, Dumpable
|
|||
{
|
||||
if (activeConnections.offer(connection))
|
||||
{
|
||||
LOG.debug("Connection active {}", connection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Connection active {}", connection);
|
||||
acquired(connection);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("Connection active overflow {}", connection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Connection active overflow {}", connection);
|
||||
connection.close();
|
||||
return false;
|
||||
}
|
||||
|
@ -151,12 +157,14 @@ public class ConnectionPool implements Closeable, Dumpable
|
|||
// Make sure we use "hot" connections first
|
||||
if (idleConnections.offerFirst(connection))
|
||||
{
|
||||
LOG.debug("Connection idle {}", connection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Connection idle {}", connection);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("Connection idle overflow {}", connection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Connection idle overflow {}", connection);
|
||||
connection.close();
|
||||
}
|
||||
}
|
||||
|
@ -177,7 +185,8 @@ public class ConnectionPool implements Closeable, Dumpable
|
|||
if (removed)
|
||||
{
|
||||
int pooled = connectionCount.decrementAndGet();
|
||||
LOG.debug("Connection removed {} - pooled: {}", connection, pooled);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Connection removed {} - pooled: {}", connection, pooled);
|
||||
}
|
||||
return removed;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,8 @@ public abstract class HttpChannel
|
|||
if (this.exchange.compareAndSet(null, exchange))
|
||||
{
|
||||
exchange.associate(this);
|
||||
LOG.debug("{} associated to {}", exchange, this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} associated to {}", exchange, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -59,7 +60,8 @@ public abstract class HttpChannel
|
|||
HttpExchange exchange = this.exchange.getAndSet(null);
|
||||
if (exchange != null)
|
||||
exchange.disassociate(this);
|
||||
LOG.debug("{} disassociated from {}", exchange, this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} disassociated from {}", exchange, this);
|
||||
return exchange;
|
||||
}
|
||||
|
||||
|
|
|
@ -480,9 +480,14 @@ public class HttpClient extends ContainerLifeCycle
|
|||
{
|
||||
HttpDestination existing = destinations.putIfAbsent(origin, destination);
|
||||
if (existing != null)
|
||||
{
|
||||
destination = existing;
|
||||
}
|
||||
else
|
||||
LOG.debug("Created {}", destination);
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Created {}", destination);
|
||||
}
|
||||
if (!isRunning())
|
||||
destinations.remove(origin);
|
||||
}
|
||||
|
|
|
@ -130,7 +130,8 @@ public class HttpContent implements Callback, Closeable
|
|||
if (content != AFTER)
|
||||
{
|
||||
content = buffer = AFTER;
|
||||
LOG.debug("Advanced content past last chunk");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Advanced content past last chunk");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -175,14 +175,16 @@ public abstract class HttpDestination implements Destination, Closeable, Dumpabl
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("Queued {}", request);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Queued {}", request);
|
||||
requestNotifier.notifyQueued(request);
|
||||
send();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("Max queue size {} exceeded by {}", client.getMaxRequestsQueuedPerDestination(), request);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Max queue size {} exceeded by {}", client.getMaxRequestsQueuedPerDestination(), request);
|
||||
request.abort(new RejectedExecutionException("Max requests per destination " + client.getMaxRequestsQueuedPerDestination() + " exceeded for " + this));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,7 +151,8 @@ public class HttpExchange
|
|||
if ((current & terminated) == terminated)
|
||||
{
|
||||
// Request and response terminated
|
||||
LOG.debug("{} terminated", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} terminated", this);
|
||||
return new Result(getRequest(), getRequestFailure(), getResponse(), getResponseFailure());
|
||||
}
|
||||
return null;
|
||||
|
@ -174,7 +175,8 @@ public class HttpExchange
|
|||
requestFailure = failure;
|
||||
if ((code & 0b0100) == 0b0100)
|
||||
responseFailure = failure;
|
||||
LOG.debug("{} updated", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} updated", this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -185,7 +187,8 @@ public class HttpExchange
|
|||
{
|
||||
if (destination.remove(this))
|
||||
{
|
||||
LOG.debug("Aborting while queued {}: {}", this, cause);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Aborting while queued {}: {}", this, cause);
|
||||
return fail(cause);
|
||||
}
|
||||
else
|
||||
|
@ -195,7 +198,8 @@ public class HttpExchange
|
|||
return fail(cause);
|
||||
|
||||
boolean aborted = channel.abort(cause);
|
||||
LOG.debug("Aborted while active ({}) {}: {}", aborted, this, cause);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Aborted while active ({}) {}: {}", aborted, this, cause);
|
||||
return aborted;
|
||||
}
|
||||
}
|
||||
|
@ -204,7 +208,8 @@ public class HttpExchange
|
|||
{
|
||||
if (update(0b0101, cause) == 0b0101)
|
||||
{
|
||||
LOG.debug("Failing {}: {}", this, cause);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Failing {}: {}", this, cause);
|
||||
destination.getRequestNotifier().notifyFailure(request, cause);
|
||||
List<Response.ResponseListener> listeners = getConversation().getResponseListeners();
|
||||
ResponseNotifier responseNotifier = destination.getResponseNotifier();
|
||||
|
|
|
@ -186,7 +186,8 @@ public class HttpProxy extends ProxyConfiguration.Proxy
|
|||
// Avoid setting fill interest in the old Connection,
|
||||
// without closing the underlying EndPoint.
|
||||
oldConnection.softClose();
|
||||
LOG.debug("HTTP tunnel established: {} over {}", oldConnection, newConnection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("HTTP tunnel established: {} over {}", oldConnection, newConnection);
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
|
|
|
@ -117,11 +117,13 @@ public abstract class HttpReceiver
|
|||
if (protocolHandler != null)
|
||||
{
|
||||
handlerListener = protocolHandler.getResponseListener();
|
||||
LOG.debug("Found protocol handler {}", protocolHandler);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Found protocol handler {}", protocolHandler);
|
||||
}
|
||||
exchange.getConversation().updateResponseListeners(handlerListener);
|
||||
|
||||
LOG.debug("Response begin {}", response);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Response begin {}", response);
|
||||
ResponseNotifier notifier = destination.getResponseNotifier();
|
||||
notifier.notifyBegin(conversation.getResponseListeners(), response);
|
||||
|
||||
|
@ -337,7 +339,8 @@ public abstract class HttpReceiver
|
|||
Result result = exchange.terminateResponse(null);
|
||||
|
||||
HttpResponse response = exchange.getResponse();
|
||||
LOG.debug("Response success {}", response);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Response success {}", response);
|
||||
List<Response.ResponseListener> listeners = exchange.getConversation().getResponseListeners();
|
||||
ResponseNotifier notifier = getHttpDestination().getResponseNotifier();
|
||||
notifier.notifySuccess(listeners, response);
|
||||
|
@ -347,7 +350,8 @@ public abstract class HttpReceiver
|
|||
boolean ordered = getHttpDestination().getHttpClient().isStrictEventOrdering();
|
||||
if (!ordered)
|
||||
channel.exchangeTerminated(result);
|
||||
LOG.debug("Request/Response succeeded {}", response);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Request/Response succeeded {}", response);
|
||||
notifier.notifyComplete(listeners, result);
|
||||
if (ordered)
|
||||
channel.exchangeTerminated(result);
|
||||
|
@ -388,7 +392,8 @@ public abstract class HttpReceiver
|
|||
Result result = exchange.terminateResponse(failure);
|
||||
|
||||
HttpResponse response = exchange.getResponse();
|
||||
LOG.debug("Response failure {} {}", response, failure);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Response failure {} {}", response, failure);
|
||||
List<Response.ResponseListener> listeners = exchange.getConversation().getResponseListeners();
|
||||
ResponseNotifier notifier = getHttpDestination().getResponseNotifier();
|
||||
notifier.notifyFailure(listeners, response, failure);
|
||||
|
@ -398,7 +403,8 @@ public abstract class HttpReceiver
|
|||
boolean ordered = getHttpDestination().getHttpClient().isStrictEventOrdering();
|
||||
if (!ordered)
|
||||
channel.exchangeTerminated(result);
|
||||
LOG.debug("Request/Response failed {}", response);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Request/Response failed {}", response);
|
||||
notifier.notifyComplete(listeners, result);
|
||||
if (ordered)
|
||||
channel.exchangeTerminated(result);
|
||||
|
|
|
@ -156,7 +156,8 @@ public class HttpRedirector
|
|||
URI newURI = extractRedirectURI(response);
|
||||
if (newURI != null)
|
||||
{
|
||||
LOG.debug("Redirecting to {} (Location: {})", newURI, location);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Redirecting to {} (Location: {})", newURI, location);
|
||||
return redirect(request, response, listener, newURI);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -99,7 +99,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
SenderState newSenderState = SenderState.SENDING;
|
||||
if (updateSenderState(current, newSenderState))
|
||||
{
|
||||
LOG.debug("Deferred content available, {} -> {}", current, newSenderState);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Deferred content available, {} -> {}", current, newSenderState);
|
||||
contentCallback.iterate();
|
||||
return;
|
||||
}
|
||||
|
@ -110,7 +111,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
SenderState newSenderState = SenderState.SENDING_WITH_CONTENT;
|
||||
if (updateSenderState(current, newSenderState))
|
||||
{
|
||||
LOG.debug("Deferred content available, {} -> {}", current, newSenderState);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Deferred content available, {} -> {}", current, newSenderState);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -120,7 +122,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
SenderState newSenderState = SenderState.EXPECTING_WITH_CONTENT;
|
||||
if (updateSenderState(current, newSenderState))
|
||||
{
|
||||
LOG.debug("Deferred content available, {} -> {}", current, newSenderState);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Deferred content available, {} -> {}", current, newSenderState);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -130,7 +133,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
SenderState newSenderState = SenderState.PROCEEDING_WITH_CONTENT;
|
||||
if (updateSenderState(current, newSenderState))
|
||||
{
|
||||
LOG.debug("Deferred content available, {} -> {}", current, newSenderState);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Deferred content available, {} -> {}", current, newSenderState);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -140,7 +144,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
case PROCEEDING_WITH_CONTENT:
|
||||
case WAITING:
|
||||
{
|
||||
LOG.debug("Deferred content available, {}", current);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Deferred content available, {}", current);
|
||||
return;
|
||||
}
|
||||
default:
|
||||
|
@ -194,7 +199,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
{
|
||||
if (!updateRequestState(RequestState.QUEUED, RequestState.BEGIN))
|
||||
return false;
|
||||
LOG.debug("Request begin {}", request);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Request begin {}", request);
|
||||
RequestNotifier notifier = getHttpChannel().getHttpDestination().getRequestNotifier();
|
||||
notifier.notifyBegin(request);
|
||||
return true;
|
||||
|
@ -215,7 +221,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
{
|
||||
if (!updateRequestState(RequestState.HEADERS, RequestState.COMMIT))
|
||||
return false;
|
||||
LOG.debug("Request committed {}", request);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Request committed {}", request);
|
||||
RequestNotifier notifier = getHttpChannel().getHttpDestination().getRequestNotifier();
|
||||
notifier.notifyCommit(request);
|
||||
return true;
|
||||
|
@ -272,7 +279,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
// It is important to notify completion *after* we reset because
|
||||
// the notification may trigger another request/response
|
||||
Request request = exchange.getRequest();
|
||||
LOG.debug("Request success {}", request);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Request success {}", request);
|
||||
HttpDestination destination = getHttpChannel().getHttpDestination();
|
||||
destination.getRequestNotifier().notifySuccess(exchange.getRequest());
|
||||
|
||||
|
@ -281,7 +289,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
boolean ordered = destination.getHttpClient().isStrictEventOrdering();
|
||||
if (!ordered)
|
||||
channel.exchangeTerminated(result);
|
||||
LOG.debug("Request/Response succeded {}", request);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Request/Response succeded {}", request);
|
||||
HttpConversation conversation = exchange.getConversation();
|
||||
destination.getResponseNotifier().notifyComplete(conversation.getResponseListeners(), result);
|
||||
if (ordered)
|
||||
|
@ -321,7 +330,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
Result result = exchange.terminateRequest(failure);
|
||||
|
||||
Request request = exchange.getRequest();
|
||||
LOG.debug("Request failure {} {}", exchange, failure);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Request failure {} {}", exchange, failure);
|
||||
HttpDestination destination = getHttpChannel().getHttpDestination();
|
||||
destination.getRequestNotifier().notifyFailure(request, failure);
|
||||
|
||||
|
@ -332,7 +342,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
if (exchange.responseComplete())
|
||||
{
|
||||
result = exchange.terminateResponse(failure);
|
||||
LOG.debug("Failed response from request {}", exchange);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Failed response from request {}", exchange);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -341,7 +352,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
boolean ordered = destination.getHttpClient().isStrictEventOrdering();
|
||||
if (!ordered)
|
||||
channel.exchangeTerminated(result);
|
||||
LOG.debug("Request/Response failed {}", request);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Request/Response failed {}", request);
|
||||
HttpConversation conversation = exchange.getConversation();
|
||||
destination.getResponseNotifier().notifyComplete(conversation.getResponseListeners(), result);
|
||||
if (ordered)
|
||||
|
@ -426,7 +438,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
// We are still sending the headers, but we already got the 100 Continue.
|
||||
if (updateSenderState(current, SenderState.PROCEEDING))
|
||||
{
|
||||
LOG.debug("Proceeding while expecting");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Proceeding while expecting");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -441,7 +454,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
// WritePendingException).
|
||||
if (updateSenderState(current, SenderState.PROCEEDING_WITH_CONTENT))
|
||||
{
|
||||
LOG.debug("Proceeding while scheduled");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Proceeding while scheduled");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -451,7 +465,8 @@ public abstract class HttpSender implements AsyncContentProvider.Listener
|
|||
// We received the 100 Continue, now send the content if any.
|
||||
if (!updateSenderState(current, SenderState.SENDING))
|
||||
throw illegalSenderState(current);
|
||||
LOG.debug("Proceeding while waiting");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Proceeding while waiting");
|
||||
contentCallback.iterate();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -94,7 +94,8 @@ public abstract class MultiplexHttpDestination<C extends Connection> extends Htt
|
|||
{
|
||||
HttpClient client = getHttpClient();
|
||||
final HttpExchange exchange = getHttpExchanges().poll();
|
||||
LOG.debug("Processing {} on {}", exchange, connection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Processing {} on {}", exchange, connection);
|
||||
if (exchange == null)
|
||||
return false;
|
||||
|
||||
|
@ -102,7 +103,8 @@ public abstract class MultiplexHttpDestination<C extends Connection> extends Htt
|
|||
Throwable cause = request.getAbortCause();
|
||||
if (cause != null)
|
||||
{
|
||||
LOG.debug("Aborted before processing {}: {}", exchange, cause);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Aborted before processing {}: {}", exchange, cause);
|
||||
// It may happen that the request is aborted before the exchange
|
||||
// is created. Aborting the exchange a second time will result in
|
||||
// a no-operation, so we just abort here to cover that edge case.
|
||||
|
|
|
@ -93,7 +93,8 @@ public abstract class PoolingHttpDestination<C extends Connection> extends HttpD
|
|||
{
|
||||
HttpClient client = getHttpClient();
|
||||
final HttpExchange exchange = getHttpExchanges().poll();
|
||||
LOG.debug("Processing exchange {} on connection {}", exchange, connection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Processing exchange {} on connection {}", exchange, connection);
|
||||
if (exchange == null)
|
||||
{
|
||||
if (!connectionPool.release(connection))
|
||||
|
@ -101,7 +102,8 @@ public abstract class PoolingHttpDestination<C extends Connection> extends HttpD
|
|||
|
||||
if (!client.isRunning())
|
||||
{
|
||||
LOG.debug("{} is stopping", client);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} is stopping", client);
|
||||
connection.close();
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +113,8 @@ public abstract class PoolingHttpDestination<C extends Connection> extends HttpD
|
|||
Throwable cause = request.getAbortCause();
|
||||
if (cause != null)
|
||||
{
|
||||
LOG.debug("Aborted before processing {}: {}", exchange, cause);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Aborted before processing {}: {}", exchange, cause);
|
||||
// It may happen that the request is aborted before the exchange
|
||||
// is created. Aborting the exchange a second time will result in
|
||||
// a no-operation, so we just abort here to cover that edge case.
|
||||
|
@ -145,18 +148,25 @@ public abstract class PoolingHttpDestination<C extends Connection> extends HttpD
|
|||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
C connection = (C)c;
|
||||
LOG.debug("{} released", connection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} released", connection);
|
||||
HttpClient client = getHttpClient();
|
||||
if (client.isRunning())
|
||||
{
|
||||
if (connectionPool.isActive(connection))
|
||||
{
|
||||
process(connection, false);
|
||||
}
|
||||
else
|
||||
LOG.debug("{} explicit", connection);
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} explicit", connection);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("{} is stopped", client);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} is stopped", client);
|
||||
close(connection);
|
||||
connection.close();
|
||||
}
|
||||
|
|
|
@ -133,7 +133,8 @@ public class Socks4Proxy extends ProxyConfiguration.Proxy
|
|||
@Override
|
||||
public void succeeded()
|
||||
{
|
||||
LOG.debug("Written SOCKS4 connect request");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Written SOCKS4 connect request");
|
||||
fillInterested();
|
||||
}
|
||||
|
||||
|
@ -153,7 +154,8 @@ public class Socks4Proxy extends ProxyConfiguration.Proxy
|
|||
{
|
||||
ByteBuffer buffer = BufferUtil.allocate(8);
|
||||
int filled = getEndPoint().fill(buffer);
|
||||
LOG.debug("Read SOCKS4 connect response, {} bytes", filled);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Read SOCKS4 connect response, {} bytes", filled);
|
||||
if (filled != 8)
|
||||
throw new IOException("Invalid response from SOCKS4 proxy");
|
||||
int result = buffer.get(1);
|
||||
|
@ -179,7 +181,8 @@ public class Socks4Proxy extends ProxyConfiguration.Proxy
|
|||
connectionFactory = new SslClientConnectionFactory(client.getSslContextFactory(), client.getByteBufferPool(), client.getExecutor(), connectionFactory);
|
||||
org.eclipse.jetty.io.Connection connection = connectionFactory.newConnection(getEndPoint(), context);
|
||||
ClientConnectionFactory.Helper.replaceConnection(this, connection);
|
||||
LOG.debug("SOCKS4 tunnel established: {} over {}", this, connection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("SOCKS4 tunnel established: {} over {}", this, connection);
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
|
|
|
@ -48,7 +48,8 @@ public class TimeoutCompleteListener implements Response.CompleteListener, Runna
|
|||
if (task != null)
|
||||
{
|
||||
boolean cancelled = task.cancel();
|
||||
LOG.debug("Cancelled (successfully: {}) timeout task {}", cancelled, task);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Cancelled (successfully: {}) timeout task {}", cancelled, task);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,14 +59,16 @@ public class TimeoutCompleteListener implements Response.CompleteListener, Runna
|
|||
Scheduler.Task task = scheduler.schedule(this, timeout, TimeUnit.MILLISECONDS);
|
||||
if (this.task.getAndSet(task) != null)
|
||||
throw new IllegalStateException();
|
||||
LOG.debug("Scheduled timeout task {} in {} ms for {}", task, timeout, request);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Scheduled timeout task {} in {} ms for {}", task, timeout, request);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
LOG.debug("Executing timeout task {} for {}", task, request);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Executing timeout task {} for {}", task, request);
|
||||
request.abort(new TimeoutException("Total timeout elapsed"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,8 @@ public class HttpConnectionOverHTTP extends AbstractConnection implements Connec
|
|||
@Override
|
||||
protected boolean onReadTimeout()
|
||||
{
|
||||
LOG.debug("{} idle timeout", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} idle timeout", this);
|
||||
close(new TimeoutException());
|
||||
return false;
|
||||
}
|
||||
|
@ -127,9 +128,11 @@ public class HttpConnectionOverHTTP extends AbstractConnection implements Connec
|
|||
// from an onFailure() handler or by blocking code waiting for completion.
|
||||
getHttpDestination().close(this);
|
||||
getEndPoint().shutdownOutput();
|
||||
LOG.debug("{} oshut", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} oshut", this);
|
||||
getEndPoint().close();
|
||||
LOG.debug("{} closed", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} closed", this);
|
||||
|
||||
abort(failure);
|
||||
}
|
||||
|
|
|
@ -227,7 +227,8 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
|
|||
@Override
|
||||
public void resume()
|
||||
{
|
||||
LOG.debug("Content consumed asynchronously, resuming processing");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Content consumed asynchronously, resuming processing");
|
||||
process();
|
||||
}
|
||||
|
||||
|
|
|
@ -149,7 +149,8 @@ public class InputStreamContentProvider implements ContentProvider
|
|||
|
||||
byte[] bytes = new byte[bufferSize];
|
||||
int read = stream.read(bytes);
|
||||
LOG.debug("Read {} bytes from {}", read, stream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Read {} bytes from {}", read, stream);
|
||||
if (read > 0)
|
||||
{
|
||||
hasNext = Boolean.TRUE;
|
||||
|
|
|
@ -116,23 +116,27 @@ public class InputStreamResponseListener extends Listener.Adapter
|
|||
|
||||
byte[] bytes = new byte[remaining];
|
||||
content.get(bytes);
|
||||
LOG.debug("Queuing {}/{} bytes", bytes, remaining);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Queuing {}/{} bytes", bytes, remaining);
|
||||
queue.offer(bytes);
|
||||
|
||||
long newLength = length.addAndGet(remaining);
|
||||
while (newLength >= maxBufferSize)
|
||||
{
|
||||
LOG.debug("Queued bytes limit {}/{} exceeded, waiting", newLength, maxBufferSize);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Queued bytes limit {}/{} exceeded, waiting", newLength, maxBufferSize);
|
||||
// Block to avoid infinite buffering
|
||||
if (!await())
|
||||
break;
|
||||
newLength = length.get();
|
||||
LOG.debug("Queued bytes limit {}/{} exceeded, woken up", newLength, maxBufferSize);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Queued bytes limit {}/{} exceeded, woken up", newLength, maxBufferSize);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("Queuing skipped, empty content {}", content);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Queuing skipped, empty content {}", content);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -147,12 +151,14 @@ public class InputStreamResponseListener extends Listener.Adapter
|
|||
this.result = result;
|
||||
if (result.isSucceeded())
|
||||
{
|
||||
LOG.debug("Queuing end of content {}{}", EOF, "");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Queuing end of content {}{}", EOF, "");
|
||||
queue.offer(EOF);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("Queuing failure {} {}", FAILURE, failure);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Queuing failure {} {}", FAILURE, failure);
|
||||
queue.offer(FAILURE);
|
||||
this.failure = result.getFailure();
|
||||
responseLatch.countDown();
|
||||
|
@ -288,7 +294,8 @@ public class InputStreamResponseListener extends Listener.Adapter
|
|||
else
|
||||
{
|
||||
bytes = take();
|
||||
LOG.debug("Dequeued {}/{} bytes", bytes, bytes.length);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Dequeued {}/{} bytes", bytes, bytes.length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -319,7 +326,8 @@ public class InputStreamResponseListener extends Listener.Adapter
|
|||
if (!closed)
|
||||
{
|
||||
super.close();
|
||||
LOG.debug("Queuing close {}{}", CLOSED, "");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Queuing close {}{}", CLOSED, "");
|
||||
queue.offer(CLOSED);
|
||||
closed = true;
|
||||
signal();
|
||||
|
|
|
@ -107,7 +107,8 @@ public class PathContentProvider extends AbstractTypedContentProvider
|
|||
if (channel == null)
|
||||
{
|
||||
channel = Files.newByteChannel(filePath, StandardOpenOption.READ);
|
||||
LOG.debug("Opened file {}", filePath);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Opened file {}", filePath);
|
||||
}
|
||||
|
||||
buffer.clear();
|
||||
|
|
|
@ -70,7 +70,8 @@ public class HttpClientTransportOverFCGI extends AbstractHttpClientTransport
|
|||
{
|
||||
HttpDestination destination = (HttpDestination)context.get(HTTP_DESTINATION_CONTEXT_KEY);
|
||||
HttpConnectionOverFCGI connection = new HttpConnectionOverFCGI(endPoint, destination, isMultiplexed());
|
||||
LOG.debug("Created {}", connection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Created {}", connection);
|
||||
@SuppressWarnings("unchecked")
|
||||
Promise<Connection> promise = (Promise<Connection>)context.get(HTTP_CONNECTION_PROMISE_CONTEXT_KEY);
|
||||
promise.succeeded(connection);
|
||||
|
|
|
@ -415,7 +415,8 @@ public class HttpConnectionOverFCGI extends AbstractConnection implements Connec
|
|||
|
||||
private void noChannel(int request)
|
||||
{
|
||||
LOG.debug("Channel not found for request {}", request);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Channel not found for request {}", request);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -137,7 +137,8 @@ public class Flusher
|
|||
|
||||
private void shutdown()
|
||||
{
|
||||
LOG.debug("Shutting down {}", endPoint);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Shutting down {}", endPoint);
|
||||
endPoint.shutdownOutput();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,7 +89,8 @@ public class ResponseContentParser extends StreamContentParser
|
|||
|
||||
public boolean parse(ByteBuffer buffer)
|
||||
{
|
||||
LOG.debug("Response {} {} content {} {}", request, FCGI.StreamType.STD_OUT, state, buffer);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Response {} {} content {} {}", request, FCGI.StreamType.STD_OUT, state, buffer);
|
||||
|
||||
int remaining = buffer.remaining();
|
||||
while (remaining > 0)
|
||||
|
|
|
@ -137,7 +137,8 @@ public class HttpChannelOverFCGI extends HttpChannel
|
|||
while (true)
|
||||
{
|
||||
State current = state.get();
|
||||
LOG.debug("Dispatching, state={}", current);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Dispatching, state={}", current);
|
||||
switch (current)
|
||||
{
|
||||
case IDLE:
|
||||
|
@ -172,7 +173,8 @@ public class HttpChannelOverFCGI extends HttpChannel
|
|||
while (true)
|
||||
{
|
||||
State current = state.get();
|
||||
LOG.debug("Running, state={}", current);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Running, state={}", current);
|
||||
switch (current)
|
||||
{
|
||||
case DISPATCH:
|
||||
|
|
|
@ -287,7 +287,8 @@ public class HttpGenerator
|
|||
{
|
||||
if (BufferUtil.hasContent(content))
|
||||
{
|
||||
LOG.debug("discarding content in COMPLETING");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("discarding content in COMPLETING");
|
||||
BufferUtil.clear(content);
|
||||
}
|
||||
|
||||
|
@ -310,7 +311,8 @@ public class HttpGenerator
|
|||
case END:
|
||||
if (BufferUtil.hasContent(content))
|
||||
{
|
||||
LOG.debug("discarding content in COMPLETING");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("discarding content in COMPLETING");
|
||||
BufferUtil.clear(content);
|
||||
}
|
||||
return Result.DONE;
|
||||
|
@ -436,7 +438,8 @@ public class HttpGenerator
|
|||
{
|
||||
if (BufferUtil.hasContent(content))
|
||||
{
|
||||
LOG.debug("discarding content in COMPLETING");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("discarding content in COMPLETING");
|
||||
BufferUtil.clear(content);
|
||||
}
|
||||
|
||||
|
@ -462,7 +465,8 @@ public class HttpGenerator
|
|||
case END:
|
||||
if (BufferUtil.hasContent(content))
|
||||
{
|
||||
LOG.debug("discarding content in COMPLETING");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("discarding content in COMPLETING");
|
||||
BufferUtil.clear(content);
|
||||
}
|
||||
return Result.DONE;
|
||||
|
|
|
@ -124,7 +124,8 @@ public abstract class AbstractConnection implements Connection
|
|||
*/
|
||||
public void fillInterested()
|
||||
{
|
||||
LOG.debug("fillInterested {}",this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("fillInterested {}",this);
|
||||
|
||||
while(true)
|
||||
{
|
||||
|
@ -136,7 +137,8 @@ public abstract class AbstractConnection implements Connection
|
|||
|
||||
public void fillInterested(Callback callback)
|
||||
{
|
||||
LOG.debug("fillInterested {}",this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("fillInterested {}",this);
|
||||
|
||||
while(true)
|
||||
{
|
||||
|
@ -162,7 +164,8 @@ public abstract class AbstractConnection implements Connection
|
|||
*/
|
||||
protected void onFillInterestedFailed(Throwable cause)
|
||||
{
|
||||
LOG.debug("{} onFillInterestedFailed {}", this, cause);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} onFillInterestedFailed {}", this, cause);
|
||||
if (_endPoint.isOpen())
|
||||
{
|
||||
boolean close = true;
|
||||
|
@ -193,7 +196,8 @@ public abstract class AbstractConnection implements Connection
|
|||
@Override
|
||||
public void onOpen()
|
||||
{
|
||||
LOG.debug("onOpen {}", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("onOpen {}", this);
|
||||
|
||||
for (Listener listener : listeners)
|
||||
listener.onOpened(this);
|
||||
|
@ -202,7 +206,8 @@ public abstract class AbstractConnection implements Connection
|
|||
@Override
|
||||
public void onClose()
|
||||
{
|
||||
LOG.debug("onClose {}",this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("onClose {}",this);
|
||||
|
||||
for (Listener listener : listeners)
|
||||
listener.onClosed(this);
|
||||
|
@ -262,7 +267,8 @@ public abstract class AbstractConnection implements Connection
|
|||
return true;
|
||||
if(_state.compareAndSet(state,next))
|
||||
{
|
||||
LOG.debug("{}-->{} {}",state,next,this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{}-->{} {}",state,next,this);
|
||||
if (next!=state)
|
||||
next.onEnter(AbstractConnection.this);
|
||||
return true;
|
||||
|
|
|
@ -94,7 +94,8 @@ public abstract class AbstractEndPoint extends IdleTimeout implements EndPoint
|
|||
@Override
|
||||
public void onOpen()
|
||||
{
|
||||
LOG.debug("onOpen {}",this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("onOpen {}",this);
|
||||
super.onOpen();
|
||||
}
|
||||
|
||||
|
@ -102,7 +103,8 @@ public abstract class AbstractEndPoint extends IdleTimeout implements EndPoint
|
|||
public void onClose()
|
||||
{
|
||||
super.onClose();
|
||||
LOG.debug("onClose {}",this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("onClose {}",this);
|
||||
_writeFlusher.onClose();
|
||||
_fillInterest.onClose();
|
||||
}
|
||||
|
|
|
@ -61,7 +61,8 @@ public class ChannelEndPoint extends AbstractEndPoint
|
|||
|
||||
protected void shutdownInput()
|
||||
{
|
||||
LOG.debug("ishut {}", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("ishut {}", this);
|
||||
_ishut=true;
|
||||
if (_oshut)
|
||||
close();
|
||||
|
@ -70,7 +71,8 @@ public class ChannelEndPoint extends AbstractEndPoint
|
|||
@Override
|
||||
public void shutdownOutput()
|
||||
{
|
||||
LOG.debug("oshut {}", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("oshut {}", this);
|
||||
_oshut = true;
|
||||
if (_channel.isOpen())
|
||||
{
|
||||
|
@ -109,7 +111,8 @@ public class ChannelEndPoint extends AbstractEndPoint
|
|||
public void close()
|
||||
{
|
||||
super.close();
|
||||
LOG.debug("close {}", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("close {}", this);
|
||||
try
|
||||
{
|
||||
_channel.close();
|
||||
|
|
|
@ -142,13 +142,15 @@ public abstract class IdleTimeout
|
|||
long idleElapsed = System.currentTimeMillis() - idleTimestamp;
|
||||
long idleLeft = idleTimeout - idleElapsed;
|
||||
|
||||
LOG.debug("{} idle timeout check, elapsed: {} ms, remaining: {} ms", this, idleElapsed, idleLeft);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} idle timeout check, elapsed: {} ms, remaining: {} ms", this, idleElapsed, idleLeft);
|
||||
|
||||
if (idleTimestamp != 0 && idleTimeout > 0)
|
||||
{
|
||||
if (idleLeft <= 0)
|
||||
{
|
||||
LOG.debug("{} idle timeout expired", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} idle timeout expired", this);
|
||||
try
|
||||
{
|
||||
onIdleExpired(new TimeoutException("Idle timeout expired: " + idleElapsed + "/" + idleTimeout + " ms"));
|
||||
|
|
|
@ -132,18 +132,21 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements SelectorMa
|
|||
{
|
||||
if (_interestOps.compareAndSet(oldInterestOps, newInterestOps))
|
||||
{
|
||||
LOG.debug("Local interests updated {} -> {} for {}", oldInterestOps, newInterestOps, this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Local interests updated {} -> {} for {}", oldInterestOps, newInterestOps, this);
|
||||
_selector.updateKey(_updateTask);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("Local interests update conflict: now {}, was {}, attempted {} for {}", _interestOps.get(), oldInterestOps, newInterestOps, this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Local interests update conflict: now {}, was {}, attempted {} for {}", _interestOps.get(), oldInterestOps, newInterestOps, this);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("Ignoring local interests update {} -> {} for {}", oldInterestOps, newInterestOps, this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Ignoring local interests update {} -> {} for {}", oldInterestOps, newInterestOps, this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -152,7 +155,8 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements SelectorMa
|
|||
|
||||
private void setKeyInterests(int oldInterestOps, int newInterestOps)
|
||||
{
|
||||
LOG.debug("Key interests updated {} -> {}", oldInterestOps, newInterestOps);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Key interests updated {} -> {}", oldInterestOps, newInterestOps);
|
||||
_key.interestOps(newInterestOps);
|
||||
}
|
||||
|
||||
|
|
|
@ -377,11 +377,13 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
|
|||
@Override
|
||||
protected void doStop() throws Exception
|
||||
{
|
||||
LOG.debug("Stopping {}", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Stopping {}", this);
|
||||
Stop stop = new Stop();
|
||||
submit(stop);
|
||||
stop.await(getStopTimeout());
|
||||
LOG.debug("Stopped {}", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Stopped {}", this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -419,7 +421,8 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
|
|||
// change to the queue and process the state.
|
||||
|
||||
_changes.offer(change);
|
||||
LOG.debug("Queued change {}", change);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Queued change {}", change);
|
||||
|
||||
out: while (true)
|
||||
{
|
||||
|
@ -463,7 +466,8 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
|
|||
{
|
||||
try
|
||||
{
|
||||
LOG.debug("Running change {}", change);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Running change {}", change);
|
||||
change.run();
|
||||
}
|
||||
catch (Throwable x)
|
||||
|
@ -480,14 +484,16 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
|
|||
try
|
||||
{
|
||||
_thread.setName(name + "-selector-" + SelectorManager.this.getClass().getSimpleName()+"@"+Integer.toHexString(SelectorManager.this.hashCode())+"/"+_id);
|
||||
LOG.debug("Starting {} on {}", _thread, this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Starting {} on {}", _thread, this);
|
||||
while (isRunning())
|
||||
select();
|
||||
runChanges();
|
||||
}
|
||||
finally
|
||||
{
|
||||
LOG.debug("Stopped {} on {}", _thread, this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Stopped {} on {}", _thread, this);
|
||||
_thread.setName(name);
|
||||
}
|
||||
}
|
||||
|
@ -671,13 +677,15 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
|
|||
Connection connection = newConnection(channel, endPoint, selectionKey.attachment());
|
||||
endPoint.setConnection(connection);
|
||||
connectionOpened(connection);
|
||||
LOG.debug("Created {}", endPoint);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Created {}", endPoint);
|
||||
return endPoint;
|
||||
}
|
||||
|
||||
public void destroyEndPoint(EndPoint endPoint)
|
||||
{
|
||||
LOG.debug("Destroyed {}", endPoint);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Destroyed {}", endPoint);
|
||||
Connection connection = endPoint.getConnection();
|
||||
if (connection != null)
|
||||
connectionClosed(connection);
|
||||
|
@ -792,7 +800,8 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
|
|||
try
|
||||
{
|
||||
SelectionKey key = _channel.register(_selector, SelectionKey.OP_ACCEPT, null);
|
||||
LOG.debug("{} acceptor={}", this, key);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} acceptor={}", this, key);
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
|
@ -881,7 +890,8 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
|
|||
SocketChannel channel = connect.channel;
|
||||
if (channel.isConnectionPending())
|
||||
{
|
||||
LOG.debug("Channel {} timed out while connecting, closing it", channel);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Channel {} timed out while connecting, closing it", channel);
|
||||
connect.failed(new SocketTimeoutException());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,7 +129,8 @@ public class UncheckedPrintWriter extends PrintWriter
|
|||
_ioException.initCause(th);
|
||||
}
|
||||
|
||||
LOG.debug(th);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(th);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -128,7 +128,8 @@ public class MBeanContainer implements Container.InheritedListener, Dumpable
|
|||
@Override
|
||||
public void beanAdded(Container parent, Object obj)
|
||||
{
|
||||
LOG.debug("beanAdded {}->{}",parent,obj);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("beanAdded {}->{}",parent,obj);
|
||||
|
||||
// Is their an object name for the parent
|
||||
ObjectName pname=null;
|
||||
|
@ -206,7 +207,8 @@ public class MBeanContainer implements Container.InheritedListener, Dumpable
|
|||
}
|
||||
|
||||
ObjectInstance oinstance = _mbeanServer.registerMBean(mbean, oname);
|
||||
LOG.debug("Registered {}", oinstance.getObjectName());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Registered {}", oinstance.getObjectName());
|
||||
_beans.put(obj, oinstance.getObjectName());
|
||||
|
||||
}
|
||||
|
@ -219,7 +221,8 @@ public class MBeanContainer implements Container.InheritedListener, Dumpable
|
|||
@Override
|
||||
public void beanRemoved(Container parent, Object obj)
|
||||
{
|
||||
LOG.debug("beanRemoved {}",obj);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("beanRemoved {}",obj);
|
||||
ObjectName bean = _beans.remove(obj);
|
||||
|
||||
if (bean != null)
|
||||
|
@ -227,7 +230,8 @@ public class MBeanContainer implements Container.InheritedListener, Dumpable
|
|||
try
|
||||
{
|
||||
_mbeanServer.unregisterMBean(bean);
|
||||
LOG.debug("Unregistered {}", bean);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Unregistered {}", bean);
|
||||
}
|
||||
catch (javax.management.InstanceNotFoundException e)
|
||||
{
|
||||
|
|
|
@ -132,7 +132,8 @@ public class ObjectMBean implements DynamicMBean
|
|||
{
|
||||
Class<?> mClass = (Object.class.equals(oClass))?oClass=ObjectMBean.class:Loader.loadClass(oClass,mName);
|
||||
|
||||
LOG.debug("ObjectMbean: mbeanFor {} mClass={}", o, mClass);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("ObjectMbean: mbeanFor {} mClass={}", o, mClass);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -149,7 +150,8 @@ public class ObjectMBean implements DynamicMBean
|
|||
}
|
||||
}
|
||||
|
||||
LOG.debug("mbeanFor {} is {}", o, mbean);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("mbeanFor {} is {}", o, mbean);
|
||||
|
||||
return mbean;
|
||||
}
|
||||
|
@ -241,7 +243,8 @@ public class ObjectMBean implements DynamicMBean
|
|||
Class<?> o_class=_managed.getClass();
|
||||
List<Class<?>> influences = findInfluences(new ArrayList<Class<?>>(), _managed.getClass());
|
||||
|
||||
LOG.debug("Influence Count: {}", influences.size() );
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Influence Count: {}", influences.size() );
|
||||
|
||||
// Process Type Annotations
|
||||
ManagedObject primary = o_class.getAnnotation( ManagedObject.class);
|
||||
|
@ -252,7 +255,8 @@ public class ObjectMBean implements DynamicMBean
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("No @ManagedObject declared on {}", _managed.getClass());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("No @ManagedObject declared on {}", _managed.getClass());
|
||||
}
|
||||
|
||||
|
||||
|
@ -263,10 +267,13 @@ public class ObjectMBean implements DynamicMBean
|
|||
|
||||
ManagedObject typeAnnotation = oClass.getAnnotation( ManagedObject.class );
|
||||
|
||||
LOG.debug("Influenced by: " + oClass.getCanonicalName() );
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Influenced by: " + oClass.getCanonicalName() );
|
||||
|
||||
if ( typeAnnotation == null )
|
||||
{
|
||||
LOG.debug("Annotations not found for: {}", oClass.getCanonicalName() );
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Annotations not found for: {}", oClass.getCanonicalName() );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -279,7 +286,8 @@ public class ObjectMBean implements DynamicMBean
|
|||
if (methodAttributeAnnotation != null)
|
||||
{
|
||||
// TODO sort out how a proper name could get here, its a method name as an attribute at this point.
|
||||
LOG.debug("Attribute Annotation found for: {}", method.getName());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Attribute Annotation found for: {}", method.getName());
|
||||
MBeanAttributeInfo mai = defineAttribute(method,methodAttributeAnnotation);
|
||||
if ( mai != null )
|
||||
{
|
||||
|
@ -291,9 +299,9 @@ public class ObjectMBean implements DynamicMBean
|
|||
|
||||
if (methodOperationAnnotation != null)
|
||||
{
|
||||
LOG.debug("Method Annotation found for: {}", method.getName());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Method Annotation found for: {}", method.getName());
|
||||
MBeanOperationInfo oi = defineOperation(method,methodOperationAnnotation);
|
||||
|
||||
if (oi != null)
|
||||
{
|
||||
operations.add(oi);
|
||||
|
@ -480,7 +488,8 @@ public class ObjectMBean implements DynamicMBean
|
|||
/* ------------------------------------------------------------ */
|
||||
public AttributeList setAttributes(AttributeList attrs)
|
||||
{
|
||||
LOG.debug("setAttributes");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("setAttributes");
|
||||
|
||||
AttributeList results = new AttributeList(attrs.size());
|
||||
Iterator<Object> iter = attrs.iterator();
|
||||
|
@ -503,7 +512,8 @@ public class ObjectMBean implements DynamicMBean
|
|||
/* ------------------------------------------------------------ */
|
||||
public Object invoke(String name, Object[] params, String[] signature) throws MBeanException, ReflectionException
|
||||
{
|
||||
LOG.debug("ObjectMBean:invoke " + name);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("ObjectMBean:invoke " + name);
|
||||
|
||||
String methodKey = name + "(";
|
||||
if (signature != null)
|
||||
|
@ -562,12 +572,14 @@ public class ObjectMBean implements DynamicMBean
|
|||
try
|
||||
{
|
||||
Class<?> mbeanClazz = Class.forName(mName);
|
||||
LOG.debug("MBean Influence found for " + aClass.getSimpleName());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("MBean Influence found for " + aClass.getSimpleName());
|
||||
influences.add(mbeanClazz);
|
||||
}
|
||||
catch (ClassNotFoundException cnfe)
|
||||
{
|
||||
LOG.debug("No MBean Influence for " + aClass.getSimpleName());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("No MBean Influence for " + aClass.getSimpleName());
|
||||
}
|
||||
|
||||
// So are the super classes
|
||||
|
@ -637,7 +649,8 @@ public class ObjectMBean implements DynamicMBean
|
|||
String uName = name.substring(0, 1).toUpperCase(Locale.ENGLISH) + name.substring(1);
|
||||
Class<?> oClass = onMBean ? this.getClass() : _managed.getClass();
|
||||
|
||||
LOG.debug("defineAttribute {} {}:{}:{}:{}",name,onMBean,readonly,oClass,description);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("defineAttribute {} {}:{}:{}:{}",name,onMBean,readonly,oClass,description);
|
||||
|
||||
Method setter = null;
|
||||
|
||||
|
@ -646,7 +659,9 @@ public class ObjectMBean implements DynamicMBean
|
|||
{
|
||||
String declaredSetter = attributeAnnotation.setter();
|
||||
|
||||
LOG.debug("DeclaredSetter: {}", declaredSetter);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("DeclaredSetter: {}", declaredSetter);
|
||||
|
||||
Method[] methods = oClass.getMethods();
|
||||
for (int m = 0; m < methods.length; m++)
|
||||
{
|
||||
|
@ -670,7 +685,8 @@ public class ObjectMBean implements DynamicMBean
|
|||
LOG.warn("Type conflict for mbean attr {} in {}", name, oClass);
|
||||
continue;
|
||||
}
|
||||
LOG.debug("Declared Setter: " + declaredSetter);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Declared Setter: " + declaredSetter);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -696,16 +712,17 @@ public class ObjectMBean implements DynamicMBean
|
|||
{
|
||||
if (component_type==null)
|
||||
{
|
||||
LOG.warn("No mbean type for {} on {}", name, _managed.getClass());
|
||||
return null;
|
||||
}
|
||||
LOG.warn("No mbean type for {} on {}", name, _managed.getClass());
|
||||
return null;
|
||||
}
|
||||
|
||||
if (component_type.isPrimitive() && !component_type.isArray())
|
||||
{
|
||||
LOG.warn("Cannot convert mbean primative {}", name);
|
||||
return null;
|
||||
}
|
||||
LOG.debug("passed convert checks {} for type {}", name, component_type);
|
||||
LOG.warn("Cannot convert mbean primative {}", name);
|
||||
return null;
|
||||
}
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("passed convert checks {} for type {}", name, component_type);
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -772,7 +789,8 @@ public class ObjectMBean implements DynamicMBean
|
|||
|
||||
if ( returnType.isArray() )
|
||||
{
|
||||
LOG.debug("returnType is array, get component type");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("returnType is array, get component type");
|
||||
returnType = returnType.getComponentType();
|
||||
}
|
||||
|
||||
|
@ -783,8 +801,8 @@ public class ObjectMBean implements DynamicMBean
|
|||
|
||||
String impactName = methodAnnotation.impact();
|
||||
|
||||
|
||||
LOG.debug("defineOperation {} {}:{}:{}", method.getName(), onMBean, impactName, description);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("defineOperation {} {}:{}:{}", method.getName(), onMBean, impactName, description);
|
||||
|
||||
String signature = method.getName();
|
||||
|
||||
|
@ -836,7 +854,9 @@ public class ObjectMBean implements DynamicMBean
|
|||
signature += ")";
|
||||
|
||||
Class<?> returnClass = method.getReturnType();
|
||||
LOG.debug("Method Cache: " + signature );
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Method Cache: " + signature );
|
||||
|
||||
if ( _methods.containsKey(signature) )
|
||||
{
|
||||
|
|
|
@ -53,7 +53,8 @@ public class NPNServerConnection extends NegotiatingServerConnection implements
|
|||
@Override
|
||||
public void protocolSelected(String protocol)
|
||||
{
|
||||
LOG.debug("{} protocol selected {}", this, protocol);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} protocol selected {}", this, protocol);
|
||||
setProtocol(protocol != null ? protocol : getDefaultProtocol());
|
||||
NextProtoNego.remove(getSSLEngine());
|
||||
}
|
||||
|
|
|
@ -186,7 +186,8 @@ public class ConnectHandler extends HandlerWrapper
|
|||
if (HttpMethod.CONNECT.is(request.getMethod()))
|
||||
{
|
||||
String serverAddress = request.getRequestURI();
|
||||
LOG.debug("CONNECT request for {}", serverAddress);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("CONNECT request for {}", serverAddress);
|
||||
try
|
||||
{
|
||||
handleConnect(baseRequest, request, response, serverAddress);
|
||||
|
@ -222,7 +223,8 @@ public class ConnectHandler extends HandlerWrapper
|
|||
boolean proceed = handleAuthentication(request, response, serverAddress);
|
||||
if (!proceed)
|
||||
{
|
||||
LOG.debug("Missing proxy authentication");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Missing proxy authentication");
|
||||
sendConnectResponse(request, response, HttpServletResponse.SC_PROXY_AUTHENTICATION_REQUIRED);
|
||||
return;
|
||||
}
|
||||
|
@ -238,7 +240,8 @@ public class ConnectHandler extends HandlerWrapper
|
|||
|
||||
if (!validateDestination(host, port))
|
||||
{
|
||||
LOG.debug("Destination {}:{} forbidden", host, port);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Destination {}:{} forbidden", host, port);
|
||||
sendConnectResponse(request, response, HttpServletResponse.SC_FORBIDDEN);
|
||||
return;
|
||||
}
|
||||
|
@ -252,7 +255,8 @@ public class ConnectHandler extends HandlerWrapper
|
|||
AsyncContext asyncContext = request.startAsync();
|
||||
asyncContext.setTimeout(0);
|
||||
|
||||
LOG.debug("Connecting to {}", address);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Connecting to {}", address);
|
||||
ConnectContext connectContext = new ConnectContext(request, response, asyncContext, HttpConnection.getCurrentConnection());
|
||||
selector.connect(channel, connectContext);
|
||||
}
|
||||
|
@ -286,7 +290,8 @@ public class ConnectHandler extends HandlerWrapper
|
|||
|
||||
upstreamConnection.setConnection(downstreamConnection);
|
||||
downstreamConnection.setConnection(upstreamConnection);
|
||||
LOG.debug("Connection setup completed: {}<->{}", downstreamConnection, upstreamConnection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Connection setup completed: {}<->{}", downstreamConnection, upstreamConnection);
|
||||
|
||||
HttpServletResponse response = connectContext.getResponse();
|
||||
sendConnectResponse(request, response, HttpServletResponse.SC_OK);
|
||||
|
@ -297,7 +302,8 @@ public class ConnectHandler extends HandlerWrapper
|
|||
|
||||
protected void onConnectFailure(HttpServletRequest request, HttpServletResponse response, AsyncContext asyncContext, Throwable failure)
|
||||
{
|
||||
LOG.debug("CONNECT failed", failure);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("CONNECT failed", failure);
|
||||
sendConnectResponse(request, response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
|
||||
if (asyncContext != null)
|
||||
asyncContext.complete();
|
||||
|
@ -311,7 +317,8 @@ public class ConnectHandler extends HandlerWrapper
|
|||
if (statusCode != HttpServletResponse.SC_OK)
|
||||
response.setHeader(HttpHeader.CONNECTION.asString(), HttpHeaderValue.CLOSE.asString());
|
||||
response.getOutputStream().close();
|
||||
LOG.debug("CONNECT response sent {} {}", request.getProtocol(), response.getStatus());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("CONNECT response sent {} {}", request.getProtocol(), response.getStatus());
|
||||
}
|
||||
catch (IOException x)
|
||||
{
|
||||
|
@ -353,7 +360,8 @@ public class ConnectHandler extends HandlerWrapper
|
|||
// so that Jetty understands that it has to upgrade the connection
|
||||
request.setAttribute(HttpConnection.UPGRADE_CONNECTION_ATTRIBUTE, connection);
|
||||
response.setStatus(HttpServletResponse.SC_SWITCHING_PROTOCOLS);
|
||||
LOG.debug("Upgraded connection to {}", connection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Upgraded connection to {}", connection);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -379,7 +387,8 @@ public class ConnectHandler extends HandlerWrapper
|
|||
*/
|
||||
protected void write(EndPoint endPoint, ByteBuffer buffer, Callback callback)
|
||||
{
|
||||
LOG.debug("{} writing {} bytes", this, buffer.remaining());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} writing {} bytes", this, buffer.remaining());
|
||||
endPoint.write(callback, buffer);
|
||||
}
|
||||
|
||||
|
@ -407,7 +416,8 @@ public class ConnectHandler extends HandlerWrapper
|
|||
{
|
||||
if (!whiteList.contains(hostPort))
|
||||
{
|
||||
LOG.debug("Host {}:{} not whitelisted", host, port);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Host {}:{} not whitelisted", host, port);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -415,7 +425,8 @@ public class ConnectHandler extends HandlerWrapper
|
|||
{
|
||||
if (blackList.contains(hostPort))
|
||||
{
|
||||
LOG.debug("Host {}:{} blacklisted", host, port);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Host {}:{} blacklisted", host, port);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -565,14 +576,16 @@ public class ConnectHandler extends HandlerWrapper
|
|||
@Override
|
||||
public void succeeded()
|
||||
{
|
||||
LOG.debug("{} wrote initial {} bytes to server", DownstreamConnection.this, remaining);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} wrote initial {} bytes to server", DownstreamConnection.this, remaining);
|
||||
fillInterested();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void failed(Throwable x)
|
||||
{
|
||||
LOG.debug(this + " failed to write initial " + remaining + " bytes to server", x);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(this + " failed to write initial " + remaining + " bytes to server", x);
|
||||
close();
|
||||
getConnection().close();
|
||||
}
|
||||
|
|
|
@ -73,7 +73,8 @@ public abstract class ProxyConnection extends AbstractConnection
|
|||
try
|
||||
{
|
||||
final int filled = read(getEndPoint(), buffer);
|
||||
LOG.debug("{} filled {} bytes", this, filled);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} filled {} bytes", this, filled);
|
||||
if (filled > 0)
|
||||
{
|
||||
write(getConnection().getEndPoint(), buffer, new Callback()
|
||||
|
@ -81,7 +82,8 @@ public abstract class ProxyConnection extends AbstractConnection
|
|||
@Override
|
||||
public void succeeded()
|
||||
{
|
||||
LOG.debug("{} wrote {} bytes", this, filled);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} wrote {} bytes", this, filled);
|
||||
bufferPool.release(buffer);
|
||||
invoker.invoke(null);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ import javax.servlet.RequestDispatcher;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.eclipse.jetty.http.BadMessageException;
|
||||
import org.eclipse.jetty.http.HttpField;
|
||||
import org.eclipse.jetty.http.HttpFields;
|
||||
import org.eclipse.jetty.http.HttpGenerator;
|
||||
import org.eclipse.jetty.http.HttpGenerator.ResponseInfo;
|
||||
|
@ -40,7 +39,6 @@ import org.eclipse.jetty.http.HttpStatus;
|
|||
import org.eclipse.jetty.http.HttpURI;
|
||||
import org.eclipse.jetty.http.HttpVersion;
|
||||
import org.eclipse.jetty.http.MetaData;
|
||||
import org.eclipse.jetty.http.MimeTypes;
|
||||
import org.eclipse.jetty.io.ByteBufferPool;
|
||||
import org.eclipse.jetty.io.ChannelEndPoint;
|
||||
import org.eclipse.jetty.io.EndPoint;
|
||||
|
@ -214,7 +212,8 @@ public class HttpChannel implements Runnable
|
|||
*/
|
||||
public boolean handle()
|
||||
{
|
||||
LOG.debug("{} handle enter", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} handle enter", this);
|
||||
|
||||
final HttpChannel last = setCurrentHttpChannel(this);
|
||||
|
||||
|
@ -237,7 +236,8 @@ public class HttpChannel implements Runnable
|
|||
boolean error=false;
|
||||
try
|
||||
{
|
||||
LOG.debug("{} action {}",this,action);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} action {}",this,action);
|
||||
|
||||
switch(action)
|
||||
{
|
||||
|
@ -378,7 +378,8 @@ public class HttpChannel implements Runnable
|
|||
}
|
||||
}
|
||||
|
||||
LOG.debug("{} handle exit, result {}", this, action);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} handle exit, result {}", this, action);
|
||||
|
||||
return action!=Action.WAIT;
|
||||
}
|
||||
|
@ -523,7 +524,8 @@ public class HttpChannel implements Runnable
|
|||
|
||||
public void onRequestComplete()
|
||||
{
|
||||
LOG.debug("{} onRequestComplete", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} onRequestComplete", this);
|
||||
_request.getHttpInput().messageComplete();
|
||||
}
|
||||
|
||||
|
|
|
@ -100,7 +100,8 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
|
|||
HttpInput input = newHttpInput();
|
||||
_channel = newHttpChannel(input);
|
||||
_parser = newHttpParser();
|
||||
LOG.debug("New HTTP Connection {}", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("New HTTP Connection {}", this);
|
||||
}
|
||||
|
||||
protected HttpGenerator newHttpGenerator()
|
||||
|
@ -188,7 +189,8 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
|
|||
@Override
|
||||
public void onFillable()
|
||||
{
|
||||
LOG.debug("{} onFillable {}", this, _channel.getState());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} onFillable {}", this, _channel.getState());
|
||||
|
||||
final HttpConnection last=setCurrentConnection(this);
|
||||
int filled=Integer.MAX_VALUE;
|
||||
|
@ -325,7 +327,8 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
|
|||
Connection connection = (Connection)_channel.getRequest().getAttribute(UPGRADE_CONNECTION_ATTRIBUTE);
|
||||
if (connection != null)
|
||||
{
|
||||
LOG.debug("Upgrade from {} to {}", this, connection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Upgrade from {} to {}", this, connection);
|
||||
onClose();
|
||||
getEndPoint().setConnection(connection);
|
||||
connection.onOpen();
|
||||
|
|
|
@ -174,7 +174,8 @@ public abstract class HttpInput extends ServletInputStream implements Runnable
|
|||
{
|
||||
if (_eofState != null)
|
||||
{
|
||||
LOG.debug("{} eof {}", this, _eofState);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} eof {}", this, _eofState);
|
||||
_contentState = _eofState;
|
||||
}
|
||||
}
|
||||
|
@ -281,7 +282,8 @@ public abstract class HttpInput extends ServletInputStream implements Runnable
|
|||
{
|
||||
if (!isEOF())
|
||||
{
|
||||
LOG.debug("{} early EOF", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} early EOF", this);
|
||||
_eofState = EARLY_EOF;
|
||||
if (_listener == null)
|
||||
return;
|
||||
|
@ -300,7 +302,8 @@ public abstract class HttpInput extends ServletInputStream implements Runnable
|
|||
{
|
||||
if (!isEOF())
|
||||
{
|
||||
LOG.debug("{} EOF", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} EOF", this);
|
||||
_eofState = EOF;
|
||||
if (_listener == null)
|
||||
return;
|
||||
|
|
|
@ -62,7 +62,8 @@ public class HttpInputOverHTTP extends HttpInput implements Callback
|
|||
try (Blocker blocker=_readBlocker.acquire())
|
||||
{
|
||||
_httpConnection.fillInterested(blocker);
|
||||
LOG.debug("{} block readable on {}",this,blocker);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} block readable on {}",this,blocker);
|
||||
blocker.block();
|
||||
}
|
||||
|
||||
|
|
|
@ -755,7 +755,8 @@ public class HttpOutput extends ServletOutputStream implements Runnable
|
|||
{
|
||||
Throwable th=_onError;
|
||||
_onError=null;
|
||||
LOG.debug("onError",th);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("onError",th);
|
||||
_writeListener.onError(th);
|
||||
close();
|
||||
|
||||
|
@ -763,7 +764,7 @@ public class HttpOutput extends ServletOutputStream implements Runnable
|
|||
}
|
||||
|
||||
}
|
||||
continue loop;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch(_state.get())
|
||||
|
|
|
@ -133,12 +133,14 @@ public class LocalConnector extends AbstractConnector
|
|||
*/
|
||||
public ByteBuffer getResponses(ByteBuffer requestsBuffer,long idleFor,TimeUnit units) throws Exception
|
||||
{
|
||||
LOG.debug("requests {}", BufferUtil.toUTF8String(requestsBuffer));
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("requests {}", BufferUtil.toUTF8String(requestsBuffer));
|
||||
LocalEndPoint endp = executeRequest(requestsBuffer);
|
||||
endp.waitUntilClosedOrIdleFor(idleFor,units);
|
||||
ByteBuffer responses = endp.takeOutput();
|
||||
endp.getConnection().close();
|
||||
LOG.debug("responses {}", BufferUtil.toUTF8String(responses));
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("responses {}", BufferUtil.toUTF8String(responses));
|
||||
return responses;
|
||||
}
|
||||
|
||||
|
@ -164,7 +166,8 @@ public class LocalConnector extends AbstractConnector
|
|||
@Override
|
||||
protected void accept(int acceptorID) throws IOException, InterruptedException
|
||||
{
|
||||
LOG.debug("accepting {}", acceptorID);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("accepting {}", acceptorID);
|
||||
LocalEndPoint endPoint = _connects.take();
|
||||
endPoint.onOpen();
|
||||
onEndPointOpened(endPoint);
|
||||
|
@ -249,7 +252,8 @@ public class LocalConnector extends AbstractConnector
|
|||
{
|
||||
if (size==getOutput().remaining())
|
||||
{
|
||||
LOG.debug("idle for {} {}",idleFor,units);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("idle for {} {}",idleFor,units);
|
||||
return;
|
||||
}
|
||||
size=getOutput().remaining();
|
||||
|
|
|
@ -26,8 +26,6 @@ import javax.net.ssl.SSLEngineResult;
|
|||
import org.eclipse.jetty.io.AbstractConnection;
|
||||
import org.eclipse.jetty.io.Connection;
|
||||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.server.ConnectionFactory;
|
||||
import org.eclipse.jetty.server.Connector;
|
||||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
@ -95,7 +93,8 @@ public abstract class NegotiatingServerConnection extends AbstractConnection
|
|||
if (engine.getHandshakeStatus() == SSLEngineResult.HandshakeStatus.NOT_HANDSHAKING)
|
||||
{
|
||||
// Here the SSL handshake is finished, but the protocol has not been negotiated.
|
||||
LOG.debug("{} could not negotiate protocol, SSLEngine: {}", this, engine);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} could not negotiate protocol, SSLEngine: {}", this, engine);
|
||||
close();
|
||||
}
|
||||
else
|
||||
|
@ -110,7 +109,8 @@ public abstract class NegotiatingServerConnection extends AbstractConnection
|
|||
ConnectionFactory connectionFactory = connector.getConnectionFactory(protocol);
|
||||
if (connectionFactory == null)
|
||||
{
|
||||
LOG.debug("{} application selected protocol '{}', but no correspondent {} has been configured",
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} application selected protocol '{}', but no correspondent {} has been configured",
|
||||
this, protocol, ConnectionFactory.class.getName());
|
||||
close();
|
||||
}
|
||||
|
@ -119,7 +119,8 @@ public abstract class NegotiatingServerConnection extends AbstractConnection
|
|||
EndPoint endPoint = getEndPoint();
|
||||
Connection oldConnection = endPoint.getConnection();
|
||||
Connection newConnection = connectionFactory.newConnection(connector, endPoint);
|
||||
LOG.debug("{} switching from {} to {}", this, oldConnection, newConnection);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} switching from {} to {}", this, oldConnection, newConnection);
|
||||
oldConnection.onClose();
|
||||
endPoint.setConnection(newConnection);
|
||||
getEndPoint().getConnection().onOpen();
|
||||
|
@ -129,7 +130,8 @@ public abstract class NegotiatingServerConnection extends AbstractConnection
|
|||
else if (filled < 0)
|
||||
{
|
||||
// Something went bad, we need to close.
|
||||
LOG.debug("{} closing on client close", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} closing on client close", this);
|
||||
close();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -56,7 +56,8 @@ public class QueuedHttpInput extends HttpInput
|
|||
{
|
||||
boolean wasEmpty = _inputQ.isEmpty();
|
||||
_inputQ.add(item);
|
||||
LOG.debug("{} queued {}", this, item);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} queued {}", this, item);
|
||||
if (wasEmpty)
|
||||
{
|
||||
if (!onAsyncRead())
|
||||
|
@ -90,7 +91,8 @@ public class QueuedHttpInput extends HttpInput
|
|||
while (item != null && remaining(item) == 0)
|
||||
{
|
||||
_inputQ.pollUnsafe();
|
||||
LOG.debug("{} consumed {}", this, item);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} consumed {}", this, item);
|
||||
item = _inputQ.peekUnsafe();
|
||||
}
|
||||
return item;
|
||||
|
@ -105,7 +107,8 @@ public class QueuedHttpInput extends HttpInput
|
|||
{
|
||||
try
|
||||
{
|
||||
LOG.debug("{} waiting for content", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} waiting for content", this);
|
||||
lock().wait();
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
|
|
|
@ -384,7 +384,8 @@ public class Server extends HandlerWrapper implements Attributes
|
|||
if (stopTimeout>0)
|
||||
{
|
||||
long stop_by=System.currentTimeMillis()+stopTimeout;
|
||||
LOG.debug("Graceful shutdown {} by ",this,new Date(stop_by));
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Graceful shutdown {} by ",this,new Date(stop_by));
|
||||
|
||||
// Wait for shutdowns
|
||||
for (Future<Void> future: futures)
|
||||
|
|
|
@ -54,7 +54,8 @@ public abstract class AbstractHandler extends ContainerLifeCycle implements Hand
|
|||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
LOG.debug("starting {}",this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("starting {}",this);
|
||||
if (_server==null)
|
||||
LOG.warn("No Server set for {}",this);
|
||||
super.doStart();
|
||||
|
@ -67,7 +68,8 @@ public abstract class AbstractHandler extends ContainerLifeCycle implements Hand
|
|||
@Override
|
||||
protected void doStop() throws Exception
|
||||
{
|
||||
LOG.debug("stopping {}",this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("stopping {}",this);
|
||||
super.doStop();
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,8 @@ public class AllowSymLinkAliasChecker implements AliasCheck
|
|||
URI real = file.toPath().toRealPath().toUri();
|
||||
if (real.equals(resource.getAlias()))
|
||||
{
|
||||
LOG.debug("Allow symlink {} --> {}",resource,real);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Allow symlink {} --> {}",resource,real);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +80,8 @@ public class AllowSymLinkAliasChecker implements AliasCheck
|
|||
}
|
||||
if (resource.getAlias().equals(d.toURI()))
|
||||
{
|
||||
LOG.debug("Allow symlink {} --> {}",resource,d);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Allow symlink {} --> {}",resource,d);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -796,14 +796,16 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
|||
/* ------------------------------------------------------------ */
|
||||
protected void callContextInitialized (ServletContextListener l, ServletContextEvent e)
|
||||
{
|
||||
LOG.debug("contextInitialized: {}->{}",e,l);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("contextInitialized: {}->{}",e,l);
|
||||
l.contextInitialized(e);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
protected void callContextDestroyed (ServletContextListener l, ServletContextEvent e)
|
||||
{
|
||||
LOG.debug("contextDestroyed: {}->{}",e,l);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("contextDestroyed: {}->{}",e,l);
|
||||
l.contextDestroyed(e);
|
||||
}
|
||||
|
||||
|
|
|
@ -240,18 +240,18 @@ public class ResourceHandler extends HandlerWrapper
|
|||
*/
|
||||
public Resource getStylesheet()
|
||||
{
|
||||
if(_stylesheet != null)
|
||||
{
|
||||
return _stylesheet;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_defaultStylesheet == null)
|
||||
{
|
||||
_defaultStylesheet = Resource.newResource(this.getClass().getResource("/jetty-dir.css"));
|
||||
}
|
||||
return _defaultStylesheet;
|
||||
}
|
||||
if(_stylesheet != null)
|
||||
{
|
||||
return _stylesheet;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_defaultStylesheet == null)
|
||||
{
|
||||
_defaultStylesheet = Resource.newResource(this.getClass().getResource("/jetty-dir.css"));
|
||||
}
|
||||
return _defaultStylesheet;
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
@ -269,12 +269,12 @@ public class ResourceHandler extends HandlerWrapper
|
|||
_stylesheet = null;
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LOG.warn(e.toString());
|
||||
LOG.debug(e);
|
||||
throw new IllegalArgumentException(stylesheet);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LOG.warn(e.toString());
|
||||
LOG.debug(e);
|
||||
throw new IllegalArgumentException(stylesheet);
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
|
|
@ -224,7 +224,8 @@ public class ShutdownHandler extends HandlerWrapper
|
|||
private boolean hasCorrectSecurityToken(HttpServletRequest request)
|
||||
{
|
||||
String tok = request.getParameter("token");
|
||||
LOG.debug("Token: {}", tok);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Token: {}", tok);
|
||||
return _shutdownToken.equals(tok);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,13 +19,10 @@
|
|||
package org.eclipse.jetty.server.session;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSessionActivationListener;
|
||||
|
@ -335,7 +332,8 @@ public abstract class AbstractSession implements AbstractSessionManager.SessionI
|
|||
{
|
||||
try
|
||||
{
|
||||
LOG.debug("invalidate {}",_clusterId);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("invalidate {}",_clusterId);
|
||||
if (isValid())
|
||||
clearAttributes();
|
||||
}
|
||||
|
|
|
@ -167,7 +167,8 @@ public abstract class AbstractSessionIdManager extends AbstractLifeCycle impleme
|
|||
// random chance to reseed
|
||||
if (_reseed>0 && (r0%_reseed)== 1L)
|
||||
{
|
||||
LOG.debug("Reseeding {}",this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Reseeding {}",this);
|
||||
if (_random instanceof SecureRandom)
|
||||
{
|
||||
SecureRandom secure = (SecureRandom)_random;
|
||||
|
|
|
@ -477,7 +477,8 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
|
|||
throws SQLException
|
||||
{
|
||||
_dbName = dbMeta.getDatabaseProductName().toLowerCase(Locale.ENGLISH);
|
||||
LOG.debug ("Using database {}",_dbName);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug ("Using database {}",_dbName);
|
||||
_isLower = dbMeta.storesLowerCaseIdentifiers();
|
||||
_isUpper = dbMeta.storesUpperCaseIdentifiers();
|
||||
}
|
||||
|
|
|
@ -512,17 +512,20 @@ public class JDBCSessionManager extends AbstractSessionManager
|
|||
{
|
||||
if (memSession==null)
|
||||
{
|
||||
LOG.debug("getSession("+idInCluster+"): no session in session map. Reloading session data from db.");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("getSession("+idInCluster+"): no session in session map. Reloading session data from db.");
|
||||
session = loadSession(idInCluster, canonicalize(_context.getContextPath()), getVirtualHost(_context));
|
||||
}
|
||||
else if ((now - memSession._lastSaved) >= (_saveIntervalSec * 1000L))
|
||||
{
|
||||
LOG.debug("getSession("+idInCluster+"): stale session. Reloading session data from db.");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("getSession("+idInCluster+"): stale session. Reloading session data from db.");
|
||||
session = loadSession(idInCluster, canonicalize(_context.getContextPath()), getVirtualHost(_context));
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("getSession("+idInCluster+"): session in session map");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("getSession("+idInCluster+"): session in session map");
|
||||
session = memSession;
|
||||
}
|
||||
}
|
||||
|
@ -562,7 +565,8 @@ public class JDBCSessionManager extends AbstractSessionManager
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("getSession ({}): Session has expired", idInCluster);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("getSession ({}): Session has expired", idInCluster);
|
||||
//ensure that the session id for the expired session is deleted so that a new session with the
|
||||
//same id cannot be created (because the idInUse() test would succeed)
|
||||
_jdbcSessionIdMgr.removeSession(idInCluster);
|
||||
|
@ -574,7 +578,8 @@ public class JDBCSessionManager extends AbstractSessionManager
|
|||
{
|
||||
//the session loaded from the db and the one in memory are the same, so keep using the one in memory
|
||||
session = memSession;
|
||||
LOG.debug("getSession({}): Session not stale {}", idInCluster,session);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("getSession({}): Session not stale {}", idInCluster,session);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -262,7 +262,8 @@ public class SessionHandler extends ScopedHandler
|
|||
requested_session_id = cookies[i].getValue();
|
||||
requested_session_id_from_cookie = true;
|
||||
|
||||
LOG.debug("Got Session ID {} from cookie",requested_session_id);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Got Session ID {} from cookie",requested_session_id);
|
||||
|
||||
if (requested_session_id != null)
|
||||
{
|
||||
|
|
|
@ -257,7 +257,8 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory
|
|||
throw new UnavailableException("resourceCache specified with resource bases");
|
||||
_cache=(ResourceCache)_servletContext.getAttribute(resourceCache);
|
||||
|
||||
LOG.debug("Cache {}={}",resourceCache,_cache);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Cache {}={}",resourceCache,_cache);
|
||||
}
|
||||
|
||||
_etags = getInitBoolean("etags",_etags);
|
||||
|
@ -560,7 +561,8 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory
|
|||
// else look for a welcome file
|
||||
else if (null!=(welcome=getWelcomeFile(pathInContext)))
|
||||
{
|
||||
LOG.debug("welcome={}",welcome);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("welcome={}",welcome);
|
||||
if (_redirectWelcome)
|
||||
{
|
||||
// Redirect to the index
|
||||
|
|
|
@ -133,7 +133,8 @@ public class FilterHolder extends Holder<Filter>
|
|||
}
|
||||
|
||||
_config=new Config();
|
||||
LOG.debug("Filter.init {}",_filter);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Filter.init {}",_filter);
|
||||
_filter.init(_config);
|
||||
}
|
||||
|
||||
|
|
|
@ -160,7 +160,8 @@ public class ServletHandler extends ScopedHandler
|
|||
|
||||
if (getServletMapping("/")==null && _ensureDefaultServlet)
|
||||
{
|
||||
LOG.debug("Adding Default404Servlet to {}",this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Adding Default404Servlet to {}",this);
|
||||
addServletWithMapping(Default404Servlet.class,"/");
|
||||
updateMappings();
|
||||
getServletMapping("/").setDefault(true);
|
||||
|
@ -543,7 +544,9 @@ public class ServletHandler extends ScopedHandler
|
|||
}
|
||||
}
|
||||
|
||||
LOG.debug("chain={}",chain);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("chain={}",chain);
|
||||
|
||||
Throwable th=null;
|
||||
try
|
||||
{
|
||||
|
@ -1528,7 +1531,8 @@ public class ServletHandler extends ScopedHandler
|
|||
/* ------------------------------------------------------------ */
|
||||
protected void notFound(Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
|
||||
{
|
||||
LOG.debug("Not Found {}",request.getRequestURI());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Not Found {}",request.getRequestURI());
|
||||
if (getHandler()!=null)
|
||||
nextHandle(URIUtil.addPaths(request.getServletPath(),request.getPathInfo()),baseRequest,request,response);
|
||||
}
|
||||
|
@ -1630,7 +1634,8 @@ public class ServletHandler extends ScopedHandler
|
|||
// pass to next filter
|
||||
if (_filterHolder!=null)
|
||||
{
|
||||
LOG.debug("call filter {}", _filterHolder);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("call filter {}", _filterHolder);
|
||||
Filter filter= _filterHolder.getFilter();
|
||||
|
||||
//if the request already does not support async, then the setting for the filter
|
||||
|
@ -1729,7 +1734,8 @@ public class ServletHandler extends ScopedHandler
|
|||
notFound((request instanceof Request)?((Request)request):HttpChannel.getCurrentHttpChannel().getRequest(), srequest, (HttpServletResponse)response);
|
||||
else
|
||||
{
|
||||
LOG.debug("call servlet {}", _servletHolder);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("call servlet {}", _servletHolder);
|
||||
_servletHolder.handle(_baseRequest,request, response);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -290,11 +290,13 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
|
|||
{
|
||||
// Look for a precompiled JSP Servlet
|
||||
String precompiled=getClassNameForJsp(_forcedPath);
|
||||
LOG.debug("Checking for precompiled servlet {} for jsp {}", precompiled, _forcedPath);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Checking for precompiled servlet {} for jsp {}", precompiled, _forcedPath);
|
||||
ServletHolder jsp=getServletHandler().getServlet(precompiled);
|
||||
if (jsp!=null)
|
||||
{
|
||||
LOG.debug("JSP file {} for {} mapped to Servlet {}",_forcedPath, getName(),jsp.getClassName());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("JSP file {} for {} mapped to Servlet {}",_forcedPath, getName(),jsp.getClassName());
|
||||
// set the className for this servlet to the precompiled one
|
||||
setClassName(jsp.getClassName());
|
||||
}
|
||||
|
@ -306,7 +308,8 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
|
|||
jsp=getServletHandler().getServlet("jsp");
|
||||
if (jsp!=null)
|
||||
{
|
||||
LOG.debug("JSP file {} for {} mapped to Servlet {}",_forcedPath, getName(),jsp.getClassName());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("JSP file {} for {} mapped to Servlet {}",_forcedPath, getName(),jsp.getClassName());
|
||||
setClassName(jsp.getClassName());
|
||||
//copy jsp init params that don't exist for this servlet
|
||||
for (Map.Entry<String, String> entry:jsp.getInitParameters().entrySet())
|
||||
|
@ -592,7 +595,8 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
|
|||
|
||||
initMultiPart();
|
||||
|
||||
LOG.debug("Filter.init {}",_servlet);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Filter.init {}",_servlet);
|
||||
_servlet.init(_config);
|
||||
}
|
||||
catch (UnavailableException e)
|
||||
|
@ -643,7 +647,8 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
|
|||
if ("?".equals(getInitParameter("classpath")))
|
||||
{
|
||||
String classpath = ch.getClassPath();
|
||||
LOG.debug("classpath=" + classpath);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("classpath=" + classpath);
|
||||
if (classpath != null)
|
||||
setInitParameter("classpath", classpath);
|
||||
}
|
||||
|
|
|
@ -60,22 +60,15 @@ public class ELContextCleaner implements ServletContextListener
|
|||
//Get rid of references
|
||||
purgeEntries(field);
|
||||
|
||||
LOG.debug("javax.el.BeanELResolver purged");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("javax.el.BeanELResolver purged");
|
||||
}
|
||||
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
//BeanELResolver not on classpath, ignore
|
||||
}
|
||||
catch (SecurityException e)
|
||||
{
|
||||
LOG.warn("Cannot purge classes from javax.el.BeanELResolver", e);
|
||||
}
|
||||
catch (IllegalArgumentException e)
|
||||
{
|
||||
LOG.warn("Cannot purge classes from javax.el.BeanELResolver", e);
|
||||
}
|
||||
catch (IllegalAccessException e)
|
||||
catch (SecurityException | IllegalArgumentException | IllegalAccessException e)
|
||||
{
|
||||
LOG.warn("Cannot purge classes from javax.el.BeanELResolver", e);
|
||||
}
|
||||
|
@ -113,14 +106,19 @@ public class ELContextCleaner implements ServletContextListener
|
|||
while (itor.hasNext())
|
||||
{
|
||||
Class clazz = itor.next();
|
||||
LOG.debug("Clazz: "+clazz+" loaded by "+clazz.getClassLoader());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Clazz: "+clazz+" loaded by "+clazz.getClassLoader());
|
||||
if (Thread.currentThread().getContextClassLoader().equals(clazz.getClassLoader()))
|
||||
{
|
||||
itor.remove();
|
||||
LOG.debug("removed");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("removed");
|
||||
}
|
||||
else
|
||||
LOG.debug("not removed: "+"contextclassloader="+Thread.currentThread().getContextClassLoader()+"clazz's classloader="+clazz.getClassLoader());
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("not removed: "+"contextclassloader="+Thread.currentThread().getContextClassLoader()+"clazz's classloader="+clazz.getClassLoader());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,11 +139,13 @@ public class SPDYConnection extends AbstractConnection implements Controller, Id
|
|||
EndPoint endPoint = getEndPoint();
|
||||
// We need to gently close first, to allow
|
||||
// SSL close alerts to be sent by Jetty
|
||||
LOG.debug("Shutting down output {}", endPoint);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Shutting down output {}", endPoint);
|
||||
endPoint.shutdownOutput();
|
||||
if (!onlyOutput)
|
||||
{
|
||||
LOG.debug("Closing {}", endPoint);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Closing {}", endPoint);
|
||||
endPoint.close();
|
||||
}
|
||||
}
|
||||
|
@ -158,7 +160,8 @@ public class SPDYConnection extends AbstractConnection implements Controller, Id
|
|||
protected boolean onReadTimeout()
|
||||
{
|
||||
boolean idle = this.idle;
|
||||
LOG.debug("Idle timeout on {}, idle={}", this, idle);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Idle timeout on {}, idle={}", this, idle);
|
||||
if (idle)
|
||||
goAway(session);
|
||||
return false;
|
||||
|
|
|
@ -339,11 +339,13 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
notifyIdle(idleListener, false);
|
||||
try
|
||||
{
|
||||
LOG.debug("Processing {}", frame);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Processing {}", frame);
|
||||
|
||||
if (goAwaySent.get())
|
||||
{
|
||||
LOG.debug("Skipped processing of {}", frame);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Skipped processing of {}", frame);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -417,11 +419,13 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
notifyIdle(idleListener, false);
|
||||
try
|
||||
{
|
||||
LOG.debug("Processing {}, {} data bytes", frame, data.remaining());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Processing {}, {} data bytes", frame, data.remaining());
|
||||
|
||||
if (goAwaySent.get())
|
||||
{
|
||||
LOG.debug("Skipped processing of {}", frame);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Skipped processing of {}", frame);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -430,7 +434,8 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
if (stream == null)
|
||||
{
|
||||
RstInfo rstInfo = new RstInfo(streamId, StreamStatus.INVALID_STREAM);
|
||||
LOG.debug("Unknown stream {}", rstInfo);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Unknown stream {}", rstInfo);
|
||||
rst(rstInfo, Callback.Adapter.INSTANCE);
|
||||
}
|
||||
else
|
||||
|
@ -569,13 +574,15 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
throw duplicateIdException;
|
||||
}
|
||||
RstInfo rstInfo = new RstInfo(streamId, StreamStatus.PROTOCOL_ERROR);
|
||||
LOG.debug("Duplicate stream, {}", rstInfo);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Duplicate stream, {}", rstInfo);
|
||||
rst(rstInfo, Callback.Adapter.INSTANCE); // We don't care (too much) if the reset fails.
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("Created {}", stream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Created {}", stream);
|
||||
notifyStreamCreated(stream);
|
||||
return stream;
|
||||
}
|
||||
|
@ -617,7 +624,8 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
if (streamIds.get() % 2 == stream.getId() % 2)
|
||||
localStreamCount.decrementAndGet();
|
||||
|
||||
LOG.debug("Removed {}", stream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Removed {}", stream);
|
||||
notifyStreamClosed(stream);
|
||||
}
|
||||
}
|
||||
|
@ -652,7 +660,8 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
if (stream == null)
|
||||
{
|
||||
RstInfo rstInfo = new RstInfo(streamId, StreamStatus.INVALID_STREAM);
|
||||
LOG.debug("Unknown stream {}", rstInfo);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Unknown stream {}", rstInfo);
|
||||
rst(rstInfo, Callback.Adapter.INSTANCE);
|
||||
}
|
||||
else
|
||||
|
@ -689,14 +698,16 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
{
|
||||
int windowSize = windowSizeSetting.value();
|
||||
setWindowSize(windowSize);
|
||||
LOG.debug("Updated session window size to {}", windowSize);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Updated session window size to {}", windowSize);
|
||||
}
|
||||
Settings.Setting maxConcurrentStreamsSetting = frame.getSettings().get(Settings.ID.MAX_CONCURRENT_STREAMS);
|
||||
if (maxConcurrentStreamsSetting != null)
|
||||
{
|
||||
int maxConcurrentStreamsValue = maxConcurrentStreamsSetting.value();
|
||||
maxConcurrentLocalStreams = maxConcurrentStreamsValue;
|
||||
LOG.debug("Updated session maxConcurrentLocalStreams to {}", maxConcurrentStreamsValue);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Updated session maxConcurrentLocalStreams to {}", maxConcurrentStreamsValue);
|
||||
}
|
||||
SettingsInfo settingsInfo = new SettingsInfo(frame.getSettings(), frame.isClearPersisted());
|
||||
notifyOnSettings(listener, settingsInfo);
|
||||
|
@ -735,7 +746,8 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
if (stream == null)
|
||||
{
|
||||
RstInfo rstInfo = new RstInfo(streamId, StreamStatus.INVALID_STREAM);
|
||||
LOG.debug("Unknown stream, {}", rstInfo);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Unknown stream, {}", rstInfo);
|
||||
rst(rstInfo, Callback.Adapter.INSTANCE);
|
||||
}
|
||||
else
|
||||
|
@ -777,7 +789,8 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
{
|
||||
if (listener != null)
|
||||
{
|
||||
LOG.debug("Invoking callback with {} on listener {}", x, listener);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Invoking callback with {} on listener {}", x, listener);
|
||||
listener.onFailure(this, x);
|
||||
}
|
||||
}
|
||||
|
@ -798,7 +811,8 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
{
|
||||
if (listener == null)
|
||||
return null;
|
||||
LOG.debug("Invoking callback with {} on listener {}", pushInfo, listener);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Invoking callback with {} on listener {}", pushInfo, listener);
|
||||
return listener.onPush(stream, pushInfo);
|
||||
}
|
||||
catch (Exception x)
|
||||
|
@ -819,7 +833,8 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
{
|
||||
if (listener == null)
|
||||
return null;
|
||||
LOG.debug("Invoking callback with {} on listener {}", synInfo, listener);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Invoking callback with {} on listener {}", synInfo, listener);
|
||||
return listener.onSyn(stream, synInfo);
|
||||
}
|
||||
catch (Exception x)
|
||||
|
@ -840,7 +855,8 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
{
|
||||
if (listener != null)
|
||||
{
|
||||
LOG.debug("Invoking callback with {} on listener {}", rstInfo, listener);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Invoking callback with {} on listener {}", rstInfo, listener);
|
||||
listener.onRst(this, rstInfo);
|
||||
}
|
||||
}
|
||||
|
@ -861,7 +877,8 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
{
|
||||
if (listener != null)
|
||||
{
|
||||
LOG.debug("Invoking callback with {} on listener {}", settingsInfo, listener);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Invoking callback with {} on listener {}", settingsInfo, listener);
|
||||
listener.onSettings(this, settingsInfo);
|
||||
}
|
||||
}
|
||||
|
@ -882,7 +899,8 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
{
|
||||
if (listener != null)
|
||||
{
|
||||
LOG.debug("Invoking callback with {} on listener {}", pingResultInfo, listener);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Invoking callback with {} on listener {}", pingResultInfo, listener);
|
||||
listener.onPing(this, pingResultInfo);
|
||||
}
|
||||
}
|
||||
|
@ -903,7 +921,8 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
{
|
||||
if (listener != null)
|
||||
{
|
||||
LOG.debug("Invoking callback with {} on listener {}", goAwayResultInfo, listener);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Invoking callback with {} on listener {}", goAwayResultInfo, listener);
|
||||
listener.onGoAway(this, goAwayResultInfo);
|
||||
}
|
||||
}
|
||||
|
@ -936,7 +955,8 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
synchronized (this)
|
||||
{
|
||||
ByteBuffer buffer = generator.control(frame);
|
||||
LOG.debug("Queuing {} on {}", frame, stream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Queuing {} on {}", frame, stream);
|
||||
frameBytes = new ControlFrameBytes(stream, callback, frame, buffer);
|
||||
if (timeout > 0)
|
||||
frameBytes.task = scheduler.schedule(frameBytes, timeout, unit);
|
||||
|
@ -966,7 +986,8 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
|
|||
@Override
|
||||
public void data(IStream stream, DataInfo dataInfo, long timeout, TimeUnit unit, Callback callback)
|
||||
{
|
||||
LOG.debug("Queuing {} on {}", dataInfo, stream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Queuing {} on {}", dataInfo, stream);
|
||||
DataFrameBytes frameBytes = new DataFrameBytes(stream, callback, dataInfo);
|
||||
if (timeout > 0)
|
||||
frameBytes.task = scheduler.schedule(frameBytes, timeout, unit);
|
||||
|
|
|
@ -141,7 +141,8 @@ public class StandardStream extends IdleTimeout implements IStream
|
|||
public void updateWindowSize(int delta)
|
||||
{
|
||||
int size = windowSize.addAndGet(delta);
|
||||
LOG.debug("Updated window size {} -> {} for {}", size - delta, size, this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Updated window size {} -> {} for {}", size - delta, size, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -183,7 +184,8 @@ public class StandardStream extends IdleTimeout implements IStream
|
|||
@Override
|
||||
public void updateCloseState(boolean close, boolean local)
|
||||
{
|
||||
LOG.debug("{} close={} local={}", this, close, local);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} close={} local={}", this, close, local);
|
||||
if (close)
|
||||
{
|
||||
switch (closeState)
|
||||
|
@ -265,13 +267,15 @@ public class StandardStream extends IdleTimeout implements IStream
|
|||
// ignore data frame if this stream is remotelyClosed already
|
||||
if (isRemotelyClosed())
|
||||
{
|
||||
LOG.debug("Stream is remotely closed, ignoring {}", dataInfo);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Stream is remotely closed, ignoring {}", dataInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!canReceive())
|
||||
{
|
||||
LOG.debug("Protocol error receiving {}, resetting", dataInfo);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Protocol error receiving {}, resetting", dataInfo);
|
||||
session.rst(new RstInfo(getId(), StreamStatus.PROTOCOL_ERROR), Callback.Adapter.INSTANCE);
|
||||
return;
|
||||
}
|
||||
|
@ -301,7 +305,8 @@ public class StandardStream extends IdleTimeout implements IStream
|
|||
{
|
||||
if (listener != null)
|
||||
{
|
||||
LOG.debug("Invoking reply callback with {} on listener {}", replyInfo, listener);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Invoking reply callback with {} on listener {}", replyInfo, listener);
|
||||
listener.onReply(this, replyInfo);
|
||||
}
|
||||
}
|
||||
|
@ -323,7 +328,8 @@ public class StandardStream extends IdleTimeout implements IStream
|
|||
{
|
||||
if (listener != null)
|
||||
{
|
||||
LOG.debug("Invoking headers callback with {} on listener {}", headersInfo, listener);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Invoking headers callback with {} on listener {}", headersInfo, listener);
|
||||
listener.onHeaders(this, headersInfo);
|
||||
}
|
||||
}
|
||||
|
@ -345,9 +351,11 @@ public class StandardStream extends IdleTimeout implements IStream
|
|||
{
|
||||
if (listener != null)
|
||||
{
|
||||
LOG.debug("Invoking data callback with {} on listener {}", dataInfo, listener);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Invoking data callback with {} on listener {}", dataInfo, listener);
|
||||
listener.onData(this, dataInfo);
|
||||
LOG.debug("Invoked data callback with {} on listener {}", dataInfo, listener);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Invoked data callback with {} on listener {}", dataInfo, listener);
|
||||
}
|
||||
}
|
||||
catch (Exception x)
|
||||
|
|
|
@ -576,7 +576,8 @@ public class StandardSessionTest
|
|||
StandardSession.FrameBytes frameBytes = (StandardSession.FrameBytes)callback;
|
||||
|
||||
int streamId = frameBytes.getStream().getId();
|
||||
LOG.debug("last: {}, current: {}", lastStreamId, streamId);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("last: {}, current: {}", lastStreamId, streamId);
|
||||
if (lastStreamId < streamId)
|
||||
lastStreamId = streamId;
|
||||
else
|
||||
|
|
|
@ -94,7 +94,8 @@ public class HTTPSPDYServerConnectionFactory extends SPDYServerConnectionFactory
|
|||
// can arrive on the same connection, so we need to create an
|
||||
// HttpChannel for each SYN in order to run concurrently.
|
||||
|
||||
LOG.debug("Received {} on {}", synInfo, stream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Received {} on {}", synInfo, stream);
|
||||
|
||||
Fields headers = synInfo.getHeaders();
|
||||
// According to SPDY/3 spec section 3.2.1 user-agents MUST support gzip compression. Firefox omits the
|
||||
|
@ -136,7 +137,8 @@ public class HTTPSPDYServerConnectionFactory extends SPDYServerConnectionFactory
|
|||
@Override
|
||||
public void onHeaders(Stream stream, HeadersInfo headersInfo)
|
||||
{
|
||||
LOG.debug("Received {} on {}", headersInfo, stream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Received {} on {}", headersInfo, stream);
|
||||
HttpChannelOverSPDY channel = (HttpChannelOverSPDY)stream.getAttribute(CHANNEL_ATTRIBUTE);
|
||||
channel.requestHeaders(headersInfo.getHeaders(), headersInfo.isClose());
|
||||
}
|
||||
|
@ -150,7 +152,8 @@ public class HTTPSPDYServerConnectionFactory extends SPDYServerConnectionFactory
|
|||
@Override
|
||||
public void onData(Stream stream, final DataInfo dataInfo)
|
||||
{
|
||||
LOG.debug("Received {} on {}", dataInfo, stream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Received {} on {}", dataInfo, stream);
|
||||
HttpChannelOverSPDY channel = (HttpChannelOverSPDY)stream.getAttribute(CHANNEL_ATTRIBUTE);
|
||||
channel.requestContent(dataInfo, dataInfo.isClose());
|
||||
}
|
||||
|
|
|
@ -71,7 +71,8 @@ public class HttpChannelOverSPDY extends HttpChannel
|
|||
|
||||
public void requestContent(final DataInfo dataInfo, boolean endRequest)
|
||||
{
|
||||
LOG.debug("HTTP > {} bytes of content", dataInfo.length());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("HTTP > {} bytes of content", dataInfo.length());
|
||||
|
||||
// We need to copy the dataInfo since we do not know when its bytes
|
||||
// will be consumed. When the copy is consumed, we consume also the
|
||||
|
@ -104,7 +105,8 @@ public class HttpChannelOverSPDY extends HttpChannel
|
|||
|
||||
HttpURI uri = new HttpURI(uriHeader.getValue());
|
||||
|
||||
LOG.debug("HTTP > {} {} {}", httpMethod, uriHeader.getValue(), httpVersion);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("HTTP > {} {} {}", httpMethod, uriHeader.getValue(), httpVersion);
|
||||
|
||||
Fields.Field schemeHeader = headers.get(HTTPSPDYHeader.SCHEME.name(version));
|
||||
if (schemeHeader != null)
|
||||
|
@ -146,7 +148,8 @@ public class HttpChannelOverSPDY extends HttpChannel
|
|||
{
|
||||
// Spec says headers must be single valued
|
||||
String value = header.getValue();
|
||||
LOG.debug("HTTP > {}: {}", name, value);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("HTTP > {}: {}", name, value);
|
||||
fields.add(new HttpField(name, value));
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -130,7 +130,8 @@ public class HttpTransportOverSPDY implements HttpTransport
|
|||
StreamException exception = new StreamException(stream.getId(), StreamStatus.PROTOCOL_ERROR,
|
||||
"Stream already committed!");
|
||||
callback.failed(exception);
|
||||
LOG.debug("Committed response twice.", exception);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Committed response twice.", exception);
|
||||
return;
|
||||
}
|
||||
sendReply(info, !hasContent ? callback : new Callback.Adapter()
|
||||
|
@ -147,7 +148,8 @@ public class HttpTransportOverSPDY implements HttpTransport
|
|||
if (hasContent)
|
||||
{
|
||||
// send the data and let it call the callback
|
||||
LOG.debug("Send content: {} on stream: {} lastContent={}", BufferUtil.toDetailString(content), stream,
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Send content: {} on stream: {} lastContent={}", BufferUtil.toDetailString(content), stream,
|
||||
lastContent);
|
||||
stream.data(new ByteBufferDataInfo(endPoint.getIdleTimeout(), TimeUnit.MILLISECONDS, content, lastContent
|
||||
), callback);
|
||||
|
@ -156,7 +158,8 @@ public class HttpTransportOverSPDY implements HttpTransport
|
|||
else if (lastContent && info == null)
|
||||
{
|
||||
// send empty data to close and let the send call the callback
|
||||
LOG.debug("No content and lastContent=true. Sending empty ByteBuffer to close stream: {}", stream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("No content and lastContent=true. Sending empty ByteBuffer to close stream: {}", stream);
|
||||
stream.data(new ByteBufferDataInfo(endPoint.getIdleTimeout(), TimeUnit.MILLISECONDS,
|
||||
BufferUtil.EMPTY_BUFFER, lastContent), callback);
|
||||
}
|
||||
|
@ -180,7 +183,8 @@ public class HttpTransportOverSPDY implements HttpTransport
|
|||
if (reason != null)
|
||||
httpStatus.append(" ").append(reason);
|
||||
headers.put(HTTPSPDYHeader.STATUS.name(version), httpStatus.toString());
|
||||
LOG.debug("HTTP < {} {}", httpVersion, httpStatus);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("HTTP < {} {}", httpVersion, httpStatus);
|
||||
|
||||
// TODO merge the two Field classes into one
|
||||
HttpFields fields = info.getHttpFields();
|
||||
|
@ -192,7 +196,8 @@ public class HttpTransportOverSPDY implements HttpTransport
|
|||
String name = field.getName();
|
||||
String value = field.getValue();
|
||||
headers.add(name, value);
|
||||
LOG.debug("HTTP < {}: {}", name, value);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("HTTP < {}: {}", name, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -202,14 +207,16 @@ public class HttpTransportOverSPDY implements HttpTransport
|
|||
headers.add(HttpHeader.X_POWERED_BY.asString(), HttpConfiguration.SERVER_VERSION);
|
||||
|
||||
ReplyInfo reply = new ReplyInfo(headers, close);
|
||||
LOG.debug("Sending reply: {} on stream: {}", reply, stream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Sending reply: {} on stream: {}", reply, stream);
|
||||
reply(stream, reply, callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void completed()
|
||||
{
|
||||
LOG.debug("Completed {}", this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Completed {}", this);
|
||||
}
|
||||
|
||||
private void reply(Stream stream, ReplyInfo replyInfo, Callback callback)
|
||||
|
@ -249,7 +256,8 @@ public class HttpTransportOverSPDY implements HttpTransport
|
|||
public void completed()
|
||||
{
|
||||
Stream stream = getStream();
|
||||
LOG.debug("Resource pushed for {} on {}",
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Resource pushed for {} on {}",
|
||||
getRequestHeaders().get(HTTPSPDYHeader.URI.name(version)), stream);
|
||||
coordinator.complete();
|
||||
}
|
||||
|
@ -268,7 +276,8 @@ public class HttpTransportOverSPDY implements HttpTransport
|
|||
|
||||
private void coordinate()
|
||||
{
|
||||
LOG.debug("Pushing resources: {}", resources);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Pushing resources: {}", resources);
|
||||
// Must send all push frames to the client at once before we
|
||||
// return from this method and send the main resource data
|
||||
for (String pushResource : resources)
|
||||
|
@ -277,13 +286,15 @@ public class HttpTransportOverSPDY implements HttpTransport
|
|||
|
||||
private void sendNextResourceData()
|
||||
{
|
||||
LOG.debug("{} sendNextResourceData active: {}", hashCode(), active.get());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} sendNextResourceData active: {}", hashCode(), active.get());
|
||||
if (active.compareAndSet(false, true))
|
||||
{
|
||||
PushResource resource = queue.poll();
|
||||
if (resource != null)
|
||||
{
|
||||
LOG.debug("Opening new push channel for: {}", resource);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Opening new push channel for: {}", resource);
|
||||
HttpChannelOverSPDY pushChannel = newHttpChannelOverSPDY(resource.getPushStream(), resource.getPushRequestHeaders());
|
||||
pushChannel.requestStart(resource.getPushRequestHeaders(), true);
|
||||
return;
|
||||
|
@ -322,7 +333,8 @@ public class HttpTransportOverSPDY implements HttpTransport
|
|||
@Override
|
||||
public void succeeded(Stream pushStream)
|
||||
{
|
||||
LOG.debug("Headers pushed for {} on {}", pushHeaders.get(HTTPSPDYHeader.URI.name(version)), pushStream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Headers pushed for {} on {}", pushHeaders.get(HTTPSPDYHeader.URI.name(version)), pushStream);
|
||||
queue.offer(new PushResource(pushStream, pushRequestHeaders));
|
||||
sendNextResourceData();
|
||||
}
|
||||
|
|
|
@ -167,7 +167,8 @@ public class ReferrerPushStrategy implements PushStrategy
|
|||
String origin = scheme + "://" + host;
|
||||
String url = requestHeaders.get(HTTPSPDYHeader.URI.name(version)).getValue();
|
||||
String absoluteURL = origin + url;
|
||||
LOG.debug("Applying push strategy for {}", absoluteURL);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Applying push strategy for {}", absoluteURL);
|
||||
if (isMainResource(url, responseHeaders))
|
||||
{
|
||||
MainResource mainResource = getOrCreateMainResource(absoluteURL);
|
||||
|
@ -190,7 +191,8 @@ public class ReferrerPushStrategy implements PushStrategy
|
|||
result = getPushResources(absoluteURL);
|
||||
}
|
||||
}
|
||||
LOG.debug("Pushing {} resources for {}: {}", result.size(), absoluteURL, result);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Pushing {} resources for {}: {}", result.size(), absoluteURL, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -208,7 +210,8 @@ public class ReferrerPushStrategy implements PushStrategy
|
|||
MainResource mainResource = mainResources.get(absoluteURL);
|
||||
if (mainResource == null)
|
||||
{
|
||||
LOG.debug("Creating new main resource for {}", absoluteURL);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Creating new main resource for {}", absoluteURL);
|
||||
MainResource value = new MainResource(absoluteURL);
|
||||
mainResource = mainResources.putIfAbsent(absoluteURL, value);
|
||||
if (mainResource == null)
|
||||
|
@ -283,7 +286,8 @@ public class ReferrerPushStrategy implements PushStrategy
|
|||
long delay = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - firstResourceAdded.get());
|
||||
if (!referrer.startsWith(origin) && !isPushOriginAllowed(origin))
|
||||
{
|
||||
LOG.debug("Skipped store of push metadata {} for {}: Origin: {} doesn't match or origin not allowed",
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Skipped store of push metadata {} for {}: Origin: {} doesn't match or origin not allowed",
|
||||
url, name, origin);
|
||||
return false;
|
||||
}
|
||||
|
@ -293,18 +297,21 @@ public class ReferrerPushStrategy implements PushStrategy
|
|||
// although in rare cases few more resources will be stored
|
||||
if (resources.size() >= maxAssociatedResources)
|
||||
{
|
||||
LOG.debug("Skipped store of push metadata {} for {}: max associated resources ({}) reached",
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Skipped store of push metadata {} for {}: max associated resources ({}) reached",
|
||||
url, name, maxAssociatedResources);
|
||||
return false;
|
||||
}
|
||||
if (delay > referrerPushPeriod)
|
||||
{
|
||||
LOG.debug("Delay: {}ms longer than referrerPushPeriod ({}ms). Not adding resource: {} for: {}", delay,
|
||||
referrerPushPeriod, url, name);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Delay: {}ms longer than referrerPushPeriod ({}ms). Not adding resource: {} for: {}",
|
||||
delay, referrerPushPeriod, url, name);
|
||||
return false;
|
||||
}
|
||||
|
||||
LOG.debug("Adding: {} to: {} with delay: {}ms.", url, this, delay);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Adding: {} to: {} with delay: {}ms.", url, this, delay);
|
||||
resources.add(url);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -88,7 +88,8 @@ public class HTTPProxyEngine extends ProxyEngine
|
|||
String host = proxyServerInfo.getHost();
|
||||
int port = proxyServerInfo.getAddress().getPort();
|
||||
|
||||
LOG.debug("Sending HTTP request to: {}", host + ":" + port);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Sending HTTP request to: {}", host + ":" + port);
|
||||
final Request request = httpClient.newRequest(host, port)
|
||||
.path(path)
|
||||
.method(HttpMethod.fromString(method));
|
||||
|
@ -119,7 +120,8 @@ public class HTTPProxyEngine extends ProxyEngine
|
|||
@Override
|
||||
public void onData(Stream clientStream, final DataInfo clientDataInfo)
|
||||
{
|
||||
LOG.debug("received clientDataInfo: {} for stream: {}", clientDataInfo, clientStream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("received clientDataInfo: {} for stream: {}", clientDataInfo, clientStream);
|
||||
|
||||
DeferredContentProvider contentProvider = (DeferredContentProvider)request.getContent();
|
||||
contentProvider.offer(clientDataInfo.asByteBuffer(true));
|
||||
|
@ -139,7 +141,8 @@ public class HTTPProxyEngine extends ProxyEngine
|
|||
@Override
|
||||
public void onHeaders(final Response response)
|
||||
{
|
||||
LOG.debug("onHeaders called with response: {}. Sending replyInfo to client.", response);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("onHeaders called with response: {}. Sending replyInfo to client.", response);
|
||||
Fields responseHeaders = createResponseHeaders(clientStream, response);
|
||||
removeHopHeaders(responseHeaders);
|
||||
ReplyInfo replyInfo = new ReplyInfo(responseHeaders, false);
|
||||
|
@ -163,7 +166,8 @@ public class HTTPProxyEngine extends ProxyEngine
|
|||
@Override
|
||||
public void onContent(final Response response, ByteBuffer content)
|
||||
{
|
||||
LOG.debug("onContent called with response: {} and content: {}. Sending response content to client.",
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("onContent called with response: {} and content: {}. Sending response content to client.",
|
||||
response, content);
|
||||
final ByteBuffer contentCopy = httpClient.getByteBufferPool().acquire(content.remaining(), true);
|
||||
BufferUtil.flipPutFlip(content, contentCopy);
|
||||
|
@ -194,7 +198,8 @@ public class HTTPProxyEngine extends ProxyEngine
|
|||
@Override
|
||||
public void onSuccess(Response response)
|
||||
{
|
||||
LOG.debug("onSuccess called. Closing client stream.");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("onSuccess called. Closing client stream.");
|
||||
clientStream.data(new ByteBufferDataInfo(BufferUtil.EMPTY_BUFFER, true), LOGGING_CALLBACK);
|
||||
}
|
||||
|
||||
|
@ -264,7 +269,8 @@ public class HTTPProxyEngine extends ProxyEngine
|
|||
@Override
|
||||
public void succeeded()
|
||||
{
|
||||
LOG.debug("succeeded");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("succeeded");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,8 @@ public class ProxyEngineSelector extends ServerSessionFrameListener.Adapter
|
|||
@Override
|
||||
public final StreamFrameListener onSyn(final Stream clientStream, SynInfo clientSynInfo)
|
||||
{
|
||||
LOG.debug("C -> P {} on {}", clientSynInfo, clientStream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("C -> P {} on {}", clientSynInfo, clientStream);
|
||||
|
||||
final Session clientSession = clientStream.getSession();
|
||||
short clientVersion = clientSession.getVersion();
|
||||
|
@ -66,7 +67,8 @@ public class ProxyEngineSelector extends ServerSessionFrameListener.Adapter
|
|||
Fields.Field hostHeader = headers.get(HTTPSPDYHeader.HOST.name(clientVersion));
|
||||
if (hostHeader == null)
|
||||
{
|
||||
LOG.debug("No host header found: " + headers);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("No host header found: " + headers);
|
||||
rst(clientStream);
|
||||
return null;
|
||||
}
|
||||
|
@ -79,7 +81,8 @@ public class ProxyEngineSelector extends ServerSessionFrameListener.Adapter
|
|||
ProxyServerInfo proxyServerInfo = getProxyServerInfo(host);
|
||||
if (proxyServerInfo == null)
|
||||
{
|
||||
LOG.debug("No matching ProxyServerInfo found for: " + host);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("No matching ProxyServerInfo found for: " + host);
|
||||
rst(clientStream);
|
||||
return null;
|
||||
}
|
||||
|
@ -88,11 +91,13 @@ public class ProxyEngineSelector extends ServerSessionFrameListener.Adapter
|
|||
ProxyEngine proxyEngine = proxyEngines.get(protocol);
|
||||
if (proxyEngine == null)
|
||||
{
|
||||
LOG.debug("No matching ProxyEngine found for: " + protocol);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("No matching ProxyEngine found for: " + protocol);
|
||||
rst(clientStream);
|
||||
return null;
|
||||
}
|
||||
LOG.debug("Forwarding request: {} -> {}", clientSynInfo, proxyServerInfo);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Forwarding request: {} -> {}", clientSynInfo, proxyServerInfo);
|
||||
return proxyEngine.proxy(clientStream, clientSynInfo, proxyServerInfo);
|
||||
}
|
||||
|
||||
|
|
|
@ -154,7 +154,8 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
@Override
|
||||
public void onData(Stream clientStream, final DataInfo clientDataInfo)
|
||||
{
|
||||
LOG.debug("C -> P {} on {}", clientDataInfo, clientStream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("C -> P {} on {}", clientDataInfo, clientStream);
|
||||
|
||||
ByteBufferDataInfo serverDataInfo = new ByteBufferDataInfo(clientDataInfo.asByteBuffer(false), clientDataInfo.isClose())
|
||||
{
|
||||
|
@ -185,7 +186,8 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
{
|
||||
SPDYClient client = factory.newSPDYClient(version);
|
||||
session = client.connect(address, sessionListener);
|
||||
LOG.debug("Proxy session connected to {}", address);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Proxy session connected to {}", address);
|
||||
Session existing = serverSessions.putIfAbsent(host, session);
|
||||
if (existing != null)
|
||||
{
|
||||
|
@ -237,7 +239,8 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
@Override
|
||||
public StreamFrameListener onPush(Stream stream, PushInfo pushInfo)
|
||||
{
|
||||
LOG.debug("S -> P pushed {} on {}. Opening new PushStream P -> C now.", pushInfo, stream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("S -> P pushed {} on {}. Opening new PushStream P -> C now.", pushInfo, stream);
|
||||
PushStreamPromise newPushStreamPromise = new PushStreamPromise(stream, pushInfo);
|
||||
this.pushStreamPromise.push(newPushStreamPromise);
|
||||
return new ProxyPushStreamFrameListener(newPushStreamPromise);
|
||||
|
@ -259,7 +262,8 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
@Override
|
||||
public void onData(Stream serverStream, final DataInfo serverDataInfo)
|
||||
{
|
||||
LOG.debug("S -> P pushed {} on {}", serverDataInfo, serverStream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("S -> P pushed {} on {}", serverDataInfo, serverStream);
|
||||
|
||||
ByteBufferDataInfo clientDataInfo = new ByteBufferDataInfo(serverDataInfo.asByteBuffer(false), serverDataInfo.isClose())
|
||||
{
|
||||
|
@ -293,7 +297,8 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
@Override
|
||||
public StreamFrameListener onPush(Stream senderStream, PushInfo pushInfo)
|
||||
{
|
||||
LOG.debug("S -> P {} on {}");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("S -> P {} on {}");
|
||||
PushInfo newPushInfo = convertPushInfo(pushInfo, senderStream, receiverStream);
|
||||
PushStreamPromise pushStreamPromise = new PushStreamPromise(senderStream, newPushInfo);
|
||||
receiverStream.push(newPushInfo, pushStreamPromise);
|
||||
|
@ -303,7 +308,8 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
@Override
|
||||
public void onReply(final Stream stream, ReplyInfo replyInfo)
|
||||
{
|
||||
LOG.debug("S -> P {} on {}", replyInfo, stream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("S -> P {} on {}", replyInfo, stream);
|
||||
final ReplyInfo clientReplyInfo = new ReplyInfo(convertHeaders(stream, receiverStream, replyInfo.getHeaders()),
|
||||
replyInfo.isClose());
|
||||
reply(stream, clientReplyInfo);
|
||||
|
@ -316,7 +322,8 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
@Override
|
||||
public void succeeded()
|
||||
{
|
||||
LOG.debug("P -> C {} from {} to {}", clientReplyInfo, stream, receiverStream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("P -> C {} from {} to {}", clientReplyInfo, stream, receiverStream);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -338,7 +345,8 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
@Override
|
||||
public void onData(final Stream stream, final DataInfo dataInfo)
|
||||
{
|
||||
LOG.debug("S -> P {} on {}", dataInfo, stream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("S -> P {} on {}", dataInfo, stream);
|
||||
data(stream, dataInfo);
|
||||
}
|
||||
|
||||
|
@ -359,7 +367,8 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
@Override
|
||||
public void succeeded()
|
||||
{
|
||||
LOG.debug("P -> C {} from {} to {}", clientDataInfo, stream, receiverStream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("P -> C {} from {} to {}", clientDataInfo, stream, receiverStream);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -396,7 +405,8 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
@Override
|
||||
public void succeeded(Stream stream)
|
||||
{
|
||||
LOG.debug("P -> S {} from {} to {}", info, senderStream, stream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("P -> S {} from {} to {}", info, senderStream, stream);
|
||||
|
||||
stream.setAttribute(CLIENT_STREAM_ATTRIBUTE, senderStream);
|
||||
|
||||
|
@ -409,18 +419,21 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
{
|
||||
if (dataInfoCallback.flushing)
|
||||
{
|
||||
LOG.debug("SYN completed, flushing {}, queue size {}", dataInfoCallback.dataInfo, queue.size());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("SYN completed, flushing {}, queue size {}", dataInfoCallback.dataInfo, queue.size());
|
||||
dataInfoCallback = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
dataInfoCallback.flushing = true;
|
||||
LOG.debug("SYN completed, queue size {}", queue.size());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("SYN completed, queue size {}", queue.size());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("SYN completed, queue empty");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("SYN completed, queue empty");
|
||||
}
|
||||
}
|
||||
if (dataInfoCallback != null)
|
||||
|
@ -448,18 +461,21 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
dataInfoCallbackToFlush = queue.peek();
|
||||
if (dataInfoCallbackToFlush.flushing)
|
||||
{
|
||||
LOG.debug("Queued {}, flushing {}, queue size {}", dataInfo, dataInfoCallbackToFlush.dataInfo, queue.size());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Queued {}, flushing {}, queue size {}", dataInfo, dataInfoCallbackToFlush.dataInfo, queue.size());
|
||||
receiverStream = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
dataInfoCallbackToFlush.flushing = true;
|
||||
LOG.debug("Queued {}, queue size {}", dataInfo, queue.size());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Queued {}, queue size {}", dataInfo, queue.size());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("Queued {}, SYN incomplete, queue size {}", dataInfo, queue.size());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Queued {}, SYN incomplete, queue size {}", dataInfo, queue.size());
|
||||
}
|
||||
}
|
||||
if (receiverStream != null)
|
||||
|
@ -468,7 +484,8 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
|
||||
private void flush(Stream receiverStream, DataInfoCallback dataInfoCallback)
|
||||
{
|
||||
LOG.debug("P -> S {} on {}", dataInfoCallback.dataInfo, receiverStream);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("P -> S {} on {}", dataInfoCallback.dataInfo, receiverStream);
|
||||
receiverStream.data(dataInfoCallback.dataInfo, dataInfoCallback); //TODO: timeout???
|
||||
}
|
||||
|
||||
|
@ -498,11 +515,13 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
{
|
||||
assert !dataInfoCallback.flushing;
|
||||
dataInfoCallback.flushing = true;
|
||||
LOG.debug("Completed {}, queue size {}", dataInfo, queue.size());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Completed {}, queue size {}", dataInfo, queue.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("Completed {}, queue empty", dataInfo);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Completed {}, queue empty", dataInfo);
|
||||
}
|
||||
}
|
||||
if (dataInfoCallback != null)
|
||||
|
@ -550,7 +569,8 @@ public class SPDYProxyEngine extends ProxyEngine implements StreamFrameListener
|
|||
{
|
||||
super.succeeded(receiverStream);
|
||||
|
||||
LOG.debug("P -> C PushStreamPromise.succeeded() called with pushStreamPromise: {}", pushStreamPromise);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("P -> C PushStreamPromise.succeeded() called with pushStreamPromise: {}", pushStreamPromise);
|
||||
|
||||
PushStreamPromise promise = pushStreamPromise;
|
||||
if (promise != null)
|
||||
|
|
|
@ -138,7 +138,8 @@ public class LeakDetector<T> extends AbstractLifeCycle implements Runnable
|
|||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
LeakInfo leakInfo = (LeakInfo)queue.remove();
|
||||
LOG.debug("Resource GC'ed: {}", leakInfo);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Resource GC'ed: {}", leakInfo);
|
||||
if (resources.remove(leakInfo.id) != null)
|
||||
leaked(leakInfo);
|
||||
}
|
||||
|
|
|
@ -557,12 +557,16 @@ public class Scanner extends AbstractLifeCycle
|
|||
{
|
||||
if ((_filter == null) || ((_filter != null) && _filter.accept(f.getParentFile(), f.getName())))
|
||||
{
|
||||
LOG.debug("scan accepted {}",f);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("scan accepted {}",f);
|
||||
String name = f.getCanonicalPath();
|
||||
scanInfoMap.put(name, new TimeNSize(f.lastModified(),f.length()));
|
||||
}
|
||||
else
|
||||
LOG.debug("scan rejected {}",f);
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("scan rejected {}",f);
|
||||
}
|
||||
}
|
||||
|
||||
// If it is a directory, scan if it is a known directory or the depth is OK.
|
||||
|
|
|
@ -148,7 +148,8 @@ public class SocketAddressResolver
|
|||
long start = System.nanoTime();
|
||||
InetSocketAddress result = new InetSocketAddress(host, port);
|
||||
long elapsed = System.nanoTime() - start;
|
||||
LOG.debug("Resolved {} in {} ms", host, TimeUnit.NANOSECONDS.toMillis(elapsed));
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Resolved {} in {} ms", host, TimeUnit.NANOSECONDS.toMillis(elapsed));
|
||||
if (complete.compareAndSet(false, true))
|
||||
{
|
||||
if (result.isUnresolved())
|
||||
|
|
|
@ -569,8 +569,9 @@ public class TypeUtil
|
|||
|
||||
// target has no annotations
|
||||
if ( parameterAnnotations == null || parameterAnnotations.length == 0 )
|
||||
{
|
||||
LOG.debug("Target has no parameter annotations");
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Target has no parameter annotations");
|
||||
return constructor.newInstance(arguments);
|
||||
}
|
||||
else
|
||||
|
@ -588,19 +589,22 @@ public class TypeUtil
|
|||
|
||||
if (namedArgMap.containsKey(param.value()))
|
||||
{
|
||||
LOG.debug("placing named {} in position {}", param.value(), count);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("placing named {} in position {}", param.value(), count);
|
||||
swizzled[count] = namedArgMap.get(param.value());
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("placing {} in position {}", arguments[count], count);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("placing {} in position {}", arguments[count], count);
|
||||
swizzled[count] = arguments[count];
|
||||
}
|
||||
++count;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("passing on annotation {}", annotation);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("passing on annotation {}", annotation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,15 +174,15 @@ public abstract class AbstractLifeCycle implements LifeCycle
|
|||
{
|
||||
_state = __STARTED;
|
||||
if (LOG.isDebugEnabled())
|
||||
|
||||
LOG.debug(STARTED+" @{}ms {}",ManagementFactory.getRuntimeMXBean().getUptime(),this);
|
||||
LOG.debug(STARTED+" @{}ms {}",ManagementFactory.getRuntimeMXBean().getUptime(),this);
|
||||
for (Listener listener : _listeners)
|
||||
listener.lifeCycleStarted(this);
|
||||
}
|
||||
|
||||
private void setStarting()
|
||||
{
|
||||
LOG.debug("starting {}",this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("starting {}",this);
|
||||
_state = __STARTING;
|
||||
for (Listener listener : _listeners)
|
||||
listener.lifeCycleStarting(this);
|
||||
|
@ -190,7 +190,8 @@ public abstract class AbstractLifeCycle implements LifeCycle
|
|||
|
||||
private void setStopping()
|
||||
{
|
||||
LOG.debug("stopping {}",this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("stopping {}",this);
|
||||
_state = __STOPPING;
|
||||
for (Listener listener : _listeners)
|
||||
listener.lifeCycleStopping(this);
|
||||
|
@ -199,7 +200,8 @@ public abstract class AbstractLifeCycle implements LifeCycle
|
|||
private void setStopped()
|
||||
{
|
||||
_state = __STOPPED;
|
||||
LOG.debug("{} {}",STOPPED,this);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} {}",STOPPED,this);
|
||||
for (Listener listener : _listeners)
|
||||
listener.lifeCycleStopped(this);
|
||||
}
|
||||
|
|
|
@ -320,7 +320,8 @@ public class ContainerLifeCycle extends AbstractLifeCycle implements Container,
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
LOG.debug("{} added {}",this,new_bean);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} added {}",this,new_bean);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -86,7 +86,8 @@ public class FileDestroyable implements Destroyable
|
|||
{
|
||||
if (file.exists())
|
||||
{
|
||||
LOG.debug("Destroy {}",file);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Destroy {}",file);
|
||||
IO.delete(file);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,8 @@ public class AWTLeakPreventer extends AbstractLeakPreventer
|
|||
@Override
|
||||
public void prevent(ClassLoader loader)
|
||||
{
|
||||
LOG.debug("Pinning classloader for java.awt.EventQueue using "+loader);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Pinning classloader for java.awt.EventQueue using "+loader);
|
||||
Toolkit.getDefaultToolkit();
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,8 @@ public class AppContextLeakPreventer extends AbstractLeakPreventer
|
|||
@Override
|
||||
public void prevent(ClassLoader loader)
|
||||
{
|
||||
LOG.debug("Pinning classloader for AppContext.getContext() with "+loader);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Pinning classloader for AppContext.getContext() with "+loader);
|
||||
ImageIO.getUseCache();
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,8 @@ public class DriverManagerLeakPreventer extends AbstractLeakPreventer
|
|||
@Override
|
||||
public void prevent(ClassLoader loader)
|
||||
{
|
||||
LOG.debug("Pinning DriverManager classloader with "+loader);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Pinning DriverManager classloader with "+loader);
|
||||
DriverManager.getDrivers();
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,8 @@ public class FileResource extends Resource
|
|||
|
||||
if (!abs.equals(can))
|
||||
{
|
||||
LOG.debug("ALIAS abs={} can={}",abs,can);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("ALIAS abs={} can={}",abs,can);
|
||||
|
||||
URI alias=new File(can).toURI();
|
||||
// Have to encode the path as File.toURI does not!
|
||||
|
|
|
@ -73,7 +73,8 @@ class JarFileResource extends JarResource
|
|||
{
|
||||
try
|
||||
{
|
||||
LOG.debug("Closing JarFile "+_jarFile.getName());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Closing JarFile "+_jarFile.getName());
|
||||
_jarFile.close();
|
||||
}
|
||||
catch ( IOException ioe )
|
||||
|
|
|
@ -251,7 +251,8 @@ public class SslContextFactory extends AbstractLifeCycle
|
|||
|
||||
if (_trustAll)
|
||||
{
|
||||
LOG.debug("No keystore or trust store configured. ACCEPTING UNTRUSTED CERTIFICATES!!!!!");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("No keystore or trust store configured. ACCEPTING UNTRUSTED CERTIFICATES!!!!!");
|
||||
// Create a trust manager that does not validate certificate chains
|
||||
trust_managers = TRUST_ALL_CERTS;
|
||||
}
|
||||
|
@ -304,9 +305,11 @@ public class SslContextFactory extends AbstractLifeCycle
|
|||
}
|
||||
|
||||
SSLEngine engine = newSSLEngine();
|
||||
LOG.debug("Enabled Protocols {} of {}",Arrays.asList(engine.getEnabledProtocols()),Arrays.asList(engine.getSupportedProtocols()));
|
||||
if (LOG.isDebugEnabled())
|
||||
{
|
||||
LOG.debug("Enabled Protocols {} of {}",Arrays.asList(engine.getEnabledProtocols()),Arrays.asList(engine.getSupportedProtocols()));
|
||||
LOG.debug("Enabled Ciphers {} of {}",Arrays.asList(engine.getEnabledCipherSuites()),Arrays.asList(engine.getSupportedCipherSuites()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue