You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wink.apache.org by ro...@apache.org on 2010/07/08 18:12:54 UTC
svn commit: r961830 [3/4] - in /incubator/wink/trunk:
wink-client/src/main/java/org/apache/wink/client/
wink-client/src/main/java/org/apache/wink/client/handlers/
wink-client/src/main/java/org/apache/wink/client/internal/
wink-client/src/main/java/org/...
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/contexts/RequestImpl.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/contexts/RequestImpl.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/contexts/RequestImpl.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/contexts/RequestImpl.java Thu Jul 8 16:12:52 2010
@@ -79,7 +79,7 @@ public class RequestImpl implements Requ
// see C007
// http://jcp.org/aboutJava/communityprocess/maintenance/jsr311/311ChangeLog.html
public ResponseBuilder evaluatePreconditions() {
- logger.debug("evaluatePreconditions() called"); //$NON-NLS-1$
+ logger.trace("evaluatePreconditions() called"); //$NON-NLS-1$
// the resource does not exist yet so any If-Match header would result
// in a precondition failed
@@ -88,7 +88,7 @@ public class RequestImpl implements Requ
try {
EntityTagMatchHeader ifMatchHeader = null;
ifMatchHeader = ifMatchHeaderDelegate.fromString(ifMatch);
- logger.debug("ifMatchHeaderDelegate returned {}", ifMatchHeader); //$NON-NLS-1$
+ logger.trace("ifMatchHeaderDelegate returned {}", ifMatchHeader); //$NON-NLS-1$
} catch (IllegalArgumentException e) {
throw new WebApplicationException(e, Response.Status.BAD_REQUEST);
}
@@ -97,7 +97,7 @@ public class RequestImpl implements Requ
ResponseBuilder responseBuilder = delegate.createResponseBuilder();
responseBuilder.status(HttpServletResponse.SC_PRECONDITION_FAILED);
logger
- .debug("evaluatePreconditions() returning built response because there was no match due to no entity tag"); //$NON-NLS-1$
+ .trace("evaluatePreconditions() returning built response because there was no match due to no entity tag"); //$NON-NLS-1$
return responseBuilder;
}
@@ -108,7 +108,7 @@ public class RequestImpl implements Requ
}
public ResponseBuilder evaluatePreconditions(EntityTag tag) {
- logger.debug("evaluatePreconditions({}) called", tag); //$NON-NLS-1$
+ logger.trace("evaluatePreconditions({}) called", tag); //$NON-NLS-1$
String ifMatch = getHeaderValue(HttpHeaders.IF_MATCH);
if (ifMatch != null) {
return evaluateIfMatch(tag, ifMatch);
@@ -124,11 +124,11 @@ public class RequestImpl implements Requ
* returns ResponseBuilder if none of the tags matched
*/
private ResponseBuilder evaluateIfMatch(EntityTag tag, String headerValue) {
- logger.debug("evaluateIfMatch({}, {}) called", tag, headerValue); //$NON-NLS-1$
+ logger.trace("evaluateIfMatch({}, {}) called", tag, headerValue); //$NON-NLS-1$
EntityTagMatchHeader ifMatchHeader = null;
try {
ifMatchHeader = ifMatchHeaderDelegate.fromString(headerValue);
- logger.debug("ifMatchHeaderDelegate returned {}", ifMatchHeader); //$NON-NLS-1$
+ logger.trace("ifMatchHeaderDelegate returned {}", ifMatchHeader); //$NON-NLS-1$
} catch (IllegalArgumentException e) {
throw new WebApplicationException(e, Response.Status.BAD_REQUEST);
}
@@ -137,10 +137,10 @@ public class RequestImpl implements Requ
// none of the tags matches the etag
ResponseBuilder responseBuilder = delegate.createResponseBuilder();
responseBuilder.status(HttpServletResponse.SC_PRECONDITION_FAILED).tag(tag);
- logger.debug("evaluateIfMatch returning built response because there was no match"); //$NON-NLS-1$
+ logger.trace("evaluateIfMatch returning built response because there was no match"); //$NON-NLS-1$
return responseBuilder;
}
- logger.debug("evaluateIfMatch returning null because there was a match"); //$NON-NLS-1$
+ logger.trace("evaluateIfMatch returning null because there was a match"); //$NON-NLS-1$
return null;
}
@@ -148,11 +148,11 @@ public class RequestImpl implements Requ
* returns ResponseBuilder if any of the tags matched
*/
private ResponseBuilder evaluateIfNoneMatch(EntityTag tag, String headerValue) {
- logger.debug("evaluateIfNoneMatch({}, {}) called", tag, headerValue); //$NON-NLS-1$
+ logger.trace("evaluateIfNoneMatch({}, {}) called", tag, headerValue); //$NON-NLS-1$
EntityTagMatchHeader ifNoneMatchHeader = null;
try {
ifNoneMatchHeader = ifMatchHeaderDelegate.fromString(headerValue);
- logger.debug("ifMatchHeaderDelegate returned {}", ifNoneMatchHeader); //$NON-NLS-1$
+ logger.trace("ifMatchHeaderDelegate returned {}", ifNoneMatchHeader); //$NON-NLS-1$
} catch (IllegalArgumentException e) {
throw new WebApplicationException(e, Response.Status.BAD_REQUEST);
}
@@ -163,24 +163,24 @@ public class RequestImpl implements Requ
String method = getMethod();
if (method.equalsIgnoreCase("GET") || method.equalsIgnoreCase("HEAD")) { //$NON-NLS-1$ //$NON-NLS-2$
logger
- .debug("evaluateIfNoneMatch returning 304 Not Modified because the {} method matched", //$NON-NLS-1$
+ .trace("evaluateIfNoneMatch returning 304 Not Modified because the {} method matched", //$NON-NLS-1$
method);
responseBuilder.status(HttpServletResponse.SC_NOT_MODIFIED).tag(tag);
} else {
logger
- .debug("evaluateIfNoneMatch returning 412 Precondition Failed because the {} method matched", //$NON-NLS-1$
+ .trace("evaluateIfNoneMatch returning 412 Precondition Failed because the {} method matched", //$NON-NLS-1$
method);
responseBuilder.status(HttpServletResponse.SC_PRECONDITION_FAILED).tag(tag);
}
return responseBuilder;
}
- logger.debug("evaluateIfNoneMatch returning null because there was no match"); //$NON-NLS-1$
+ logger.trace("evaluateIfNoneMatch returning null because there was no match"); //$NON-NLS-1$
return null;
}
public ResponseBuilder evaluatePreconditions(Date lastModified) {
- if (logger.isDebugEnabled()) {
- logger.debug("evaluatePreconditions({}) called with {} date", //$NON-NLS-1$
+ if (logger.isTraceEnabled()) {
+ logger.trace("evaluatePreconditions({}) called with {} date", //$NON-NLS-1$
lastModified,
lastModified.getTime());
}
@@ -197,43 +197,43 @@ public class RequestImpl implements Requ
private ResponseBuilder evalueateIfUnmodifiedSince(Date lastModified, String headerValue) {
Date date = dateHeaderDelegate.fromString(headerValue);
- if (logger.isDebugEnabled()) {
+ if (logger.isTraceEnabled()) {
logger
- .debug("evalueateIfUnmodifiedSince({}, {}) got Date {} from header so comparing {} is after {}", //$NON-NLS-1$
+ .trace("evalueateIfUnmodifiedSince({}, {}) got Date {} from header so comparing {} is after {}", //$NON-NLS-1$
new Object[] {lastModified, headerValue, date, lastModified.getTime(),
date.getTime()});
}
if (lastModified.after(date)) {
ResponseBuilder responseBuilder = delegate.createResponseBuilder();
responseBuilder.status(HttpServletResponse.SC_PRECONDITION_FAILED);
- logger.debug("evalueateIfUnmodifiedSince returning 412 Precondition Failed"); //$NON-NLS-1$
+ logger.trace("evalueateIfUnmodifiedSince returning 412 Precondition Failed"); //$NON-NLS-1$
return responseBuilder;
}
- logger.debug("evalueateIfUnmodifiedSince returning null"); //$NON-NLS-1$
+ logger.trace("evalueateIfUnmodifiedSince returning null"); //$NON-NLS-1$
return null;
}
private ResponseBuilder evaluateIfModifiedSince(Date lastModified, String headerValue) {
Date date = dateHeaderDelegate.fromString(headerValue);
- if (logger.isDebugEnabled()) {
+ if (logger.isTraceEnabled()) {
logger
- .debug("evaluateIfModifiedSince({}, {}) got Date {} from header so comparing {} is after {}", //$NON-NLS-1$
+ .trace("evaluateIfModifiedSince({}, {}) got Date {} from header so comparing {} is after {}", //$NON-NLS-1$
new Object[] {lastModified, headerValue, date, lastModified.getTime(),
date.getTime()});
}
if (lastModified.after(date)) {
- logger.debug("evaluateIfModifiedSince returning null"); //$NON-NLS-1$
+ logger.trace("evaluateIfModifiedSince returning null"); //$NON-NLS-1$
return null;
}
ResponseBuilder responseBuilder = delegate.createResponseBuilder();
responseBuilder.status(HttpServletResponse.SC_NOT_MODIFIED);
- logger.debug("evaluateIfModifiedSince returning 304 Not Modified"); //$NON-NLS-1$
+ logger.trace("evaluateIfModifiedSince returning 304 Not Modified"); //$NON-NLS-1$
return responseBuilder;
}
public ResponseBuilder evaluatePreconditions(Date lastModified, EntityTag tag) {
- if (logger.isDebugEnabled()) {
- logger.debug("evaluatePreconditions({}, {}) called with date {} as a long type", //$NON-NLS-1$
+ if (logger.isTraceEnabled()) {
+ logger.trace("evaluatePreconditions({}, {}) called with date {} as a long type", //$NON-NLS-1$
new Object[] {lastModified, tag, lastModified.getTime()});
}
String ifMatch = getHeaderValue(HttpHeaders.IF_MATCH);
@@ -270,13 +270,13 @@ public class RequestImpl implements Requ
}
public Variant selectVariant(List<Variant> variants) throws IllegalArgumentException {
- logger.debug("selectVariant({}) called", variants); //$NON-NLS-1$
+ logger.trace("selectVariant({}) called", variants); //$NON-NLS-1$
if (variants == null) {
throw new IllegalArgumentException();
}
if (variants.size() == 0) {
- logger.debug("No variants so returning null"); //$NON-NLS-1$
+ logger.trace("No variants so returning null"); //$NON-NLS-1$
return null;
}
@@ -336,13 +336,13 @@ public class RequestImpl implements Requ
for (Iterator<Variant> iter = variants.iterator(); iter.hasNext();) {
double acceptQFactor = -1.0d;
Variant v = iter.next();
- logger.debug("Variant being evaluated is: {}", v); //$NON-NLS-1$
+ logger.trace("Variant being evaluated is: {}", v); //$NON-NLS-1$
MediaType vMediaType = v.getMediaType();
if (vMediaType != null && acceptableMediaTypes != null) {
boolean isCompatible = false;
boolean isAcceptable = true; // explicitly denied by the client
for (MediaType mt : acceptableMediaTypes) {
- logger.debug("Checking variant media type {} against Accept media type {}", //$NON-NLS-1$
+ logger.trace("Checking variant media type {} against Accept media type {}", //$NON-NLS-1$
vMediaType,
mt);
if (mt.isCompatible(vMediaType)) {
@@ -354,7 +354,7 @@ public class RequestImpl implements Requ
if (qAsDouble.equals(0.0)) {
isAcceptable = false;
logger
- .debug("Accept Media Type: {} is NOT compatible with q-factor {}", //$NON-NLS-1$
+ .trace("Accept Media Type: {} is NOT compatible with q-factor {}", //$NON-NLS-1$
mt,
qAsDouble);
break;
@@ -362,7 +362,7 @@ public class RequestImpl implements Requ
acceptQFactor = qAsDouble;
} catch (NumberFormatException e) {
logger
- .debug("NumberFormatException during MediaType q-factor evaluation: {}", //$NON-NLS-1$
+ .trace("NumberFormatException during MediaType q-factor evaluation: {}", //$NON-NLS-1$
e);
}
} else {
@@ -370,13 +370,13 @@ public class RequestImpl implements Requ
}
isCompatible = true;
- logger.debug("Accept Media Type: {} is compatible with q-factor {}", //$NON-NLS-1$
+ logger.trace("Accept Media Type: {} is compatible with q-factor {}", //$NON-NLS-1$
mt,
acceptQFactor);
}
}
if (!isCompatible || !isAcceptable) {
- logger.debug("Variant {} is not compatible or not acceptable", vMediaType); //$NON-NLS-1$
+ logger.trace("Variant {} is not compatible or not acceptable", vMediaType); //$NON-NLS-1$
continue;
}
}
@@ -384,7 +384,7 @@ public class RequestImpl implements Requ
if (bestVariant != null) {
if (acceptQFactor < bestVariant.acceptMediaTypeQFactor) {
logger
- .debug("Best variant's media type {} q-factor {} is greater than current variant {} q-factor {}", //$NON-NLS-1$
+ .trace("Best variant's media type {} q-factor {} is greater than current variant {} q-factor {}", //$NON-NLS-1$
new Object[] {bestVariant.variant,
bestVariant.acceptMediaTypeQFactor, vMediaType, acceptQFactor});
continue;
@@ -395,25 +395,25 @@ public class RequestImpl implements Requ
Locale vLocale = v.getLanguage();
if (vLocale != null && languages != null) {
boolean isCompatible = false;
- logger.debug("Checking variant locale {}", vLocale); //$NON-NLS-1$
+ logger.trace("Checking variant locale {}", vLocale); //$NON-NLS-1$
if (languages.getBannedLanguages().contains(vLocale)) {
- logger.debug("Variant locale {} was in unacceptable languages", vLocale); //$NON-NLS-1$
+ logger.trace("Variant locale {} was in unacceptable languages", vLocale); //$NON-NLS-1$
continue;
}
for (AcceptLanguage.ValuedLocale locale : languages.getValuedLocales()) {
logger
- .debug("Checking against Accept-Language locale {} with quality factor {}", //$NON-NLS-1$
+ .trace("Checking against Accept-Language locale {} with quality factor {}", //$NON-NLS-1$
locale.locale,
locale.qValue);
if (locale.isWildcard() || vLocale.equals(locale.locale)) {
- logger.debug("Locale is compatible {}", locale.locale); //$NON-NLS-1$
+ logger.trace("Locale is compatible {}", locale.locale); //$NON-NLS-1$
isCompatible = true;
acceptLanguageQFactor = locale.qValue;
break;
}
}
if (!isCompatible) {
- logger.debug("Variant locale is not compatible {}", vLocale); //$NON-NLS-1$
+ logger.trace("Variant locale is not compatible {}", vLocale); //$NON-NLS-1$
continue;
}
}
@@ -421,7 +421,7 @@ public class RequestImpl implements Requ
if (bestVariant != null) {
if (acceptLanguageQFactor < bestVariant.acceptLanguageQFactor) {
logger
- .debug("Best variant's language {} q-factor {} is greater than current variant {} q-factor {}", //$NON-NLS-1$
+ .trace("Best variant's language {} q-factor {} is greater than current variant {} q-factor {}", //$NON-NLS-1$
new Object[] {bestVariant.variant,
bestVariant.acceptLanguageQFactor, v, acceptLanguageQFactor});
continue;
@@ -436,18 +436,18 @@ public class RequestImpl implements Requ
hasCharSet = false;
} else if (vCharset != null && charsets != null) {
boolean isCompatible = false;
- logger.debug("Checking variant charset: {}", vCharset); //$NON-NLS-1$
+ logger.trace("Checking variant charset: {}", vCharset); //$NON-NLS-1$
if (charsets.getBannedCharsets().contains(vCharset)) {
- logger.debug("Variant charset {} was in unacceptable charsets", vCharset); //$NON-NLS-1$
+ logger.trace("Variant charset {} was in unacceptable charsets", vCharset); //$NON-NLS-1$
continue;
}
for (AcceptCharset.ValuedCharset charset : charsets.getValuedCharsets()) {
logger
- .debug("Checking against Accept-Charset charset {} with quality factor {}", //$NON-NLS-1$
+ .trace("Checking against Accept-Charset charset {} with quality factor {}", //$NON-NLS-1$
charset.charset,
charset.qValue);
if (charset.isWildcard() || vCharset.equalsIgnoreCase(charset.charset)) {
- logger.debug("Charset is compatible with {}", charset.charset); //$NON-NLS-1$
+ logger.trace("Charset is compatible with {}", charset.charset); //$NON-NLS-1$
isCompatible = true;
acceptCharsetQFactor = charset.qValue;
break;
@@ -455,7 +455,7 @@ public class RequestImpl implements Requ
}
if (!isCompatible) {
- logger.debug("Variant charset is not compatible {}", vCharset); //$NON-NLS-1$
+ logger.trace("Variant charset is not compatible {}", vCharset); //$NON-NLS-1$
/*
* do not remove this from the acceptable list even if not
* compatible but set to -1.0d for now. according to HTTP
@@ -467,7 +467,7 @@ public class RequestImpl implements Requ
if (bestVariant != null) {
if (acceptCharsetQFactor < bestVariant.acceptCharsetQFactor && hasCharSet) {
logger
- .debug("Best variant's charset {} q-factor {} is greater than current variant {} q-factor {}", //$NON-NLS-1$
+ .trace("Best variant's charset {} q-factor {} is greater than current variant {} q-factor {}", //$NON-NLS-1$
new Object[] {bestVariant.variant, bestVariant.acceptCharsetQFactor,
v, acceptCharsetQFactor});
continue;
@@ -477,12 +477,12 @@ public class RequestImpl implements Requ
double acceptEncodingQFactor = -1.0d;
String vEncoding = v.getEncoding();
if (vEncoding != null) {
- logger.debug("Checking variant encoding {}", vEncoding); //$NON-NLS-1$
+ logger.trace("Checking variant encoding {}", vEncoding); //$NON-NLS-1$
if (encodings == null) {
- logger.debug("Accept-Encoding is null"); //$NON-NLS-1$
+ logger.trace("Accept-Encoding is null"); //$NON-NLS-1$
if (!v.getEncoding().equalsIgnoreCase("identity")) { //$NON-NLS-1$
logger
- .debug("Variant encoding {} does not equal identity so not acceptable", //$NON-NLS-1$
+ .trace("Variant encoding {} does not equal identity so not acceptable", //$NON-NLS-1$
vEncoding);
// if there is no Accept Encoding, only identity is
// acceptable
@@ -494,9 +494,9 @@ public class RequestImpl implements Requ
} else {
boolean isAcceptable = true;
for (String encoding : encodings.getBannedEncodings()) {
- logger.debug("Checking against not acceptable encoding: {}", encoding); //$NON-NLS-1$
+ logger.trace("Checking against not acceptable encoding: {}", encoding); //$NON-NLS-1$
if (encoding.equalsIgnoreCase(vEncoding)) {
- logger.debug("Encoding was not acceptable: {}", vEncoding); //$NON-NLS-1$
+ logger.trace("Encoding was not acceptable: {}", vEncoding); //$NON-NLS-1$
isAcceptable = false;
break;
}
@@ -507,18 +507,18 @@ public class RequestImpl implements Requ
boolean isCompatible = false;
for (AcceptEncoding.ValuedEncoding encoding : encodings.getValuedEncodings()) {
- logger.debug("Checking against acceptable encoding: {}", encoding.encoding); //$NON-NLS-1$
+ logger.trace("Checking against acceptable encoding: {}", encoding.encoding); //$NON-NLS-1$
if (encoding.isWildcard() || encoding.encoding.equalsIgnoreCase(vEncoding)) {
isCompatible = true;
acceptEncodingQFactor = encoding.qValue;
- logger.debug("Encoding {} was acceptable with q-factor {}", //$NON-NLS-1$
+ logger.trace("Encoding {} was acceptable with q-factor {}", //$NON-NLS-1$
encoding.encoding,
encoding.qValue);
break;
}
}
if (!isCompatible) {
- logger.debug("Variant encoding {} was not compatible", vEncoding); //$NON-NLS-1$
+ logger.trace("Variant encoding {} was not compatible", vEncoding); //$NON-NLS-1$
continue;
}
}
@@ -527,7 +527,7 @@ public class RequestImpl implements Requ
if (bestVariant != null) {
if (acceptEncodingQFactor < bestVariant.acceptEncodingQFactor) {
logger
- .debug("Best variant's encoding {} q-factor {} is greater than current variant {} q-factor {}", //$NON-NLS-1$
+ .trace("Best variant's encoding {} q-factor {} is greater than current variant {} q-factor {}", //$NON-NLS-1$
new Object[] {bestVariant.variant,
bestVariant.acceptEncodingQFactor, v, acceptEncodingQFactor});
continue;
@@ -575,7 +575,7 @@ public class RequestImpl implements Requ
isValueWritten = true;
}
String varyHeaderValueStr = varyHeaderValue.toString().trim();
- logger.debug("Vary Header value should be set to {}", varyHeaderValueStr); //$NON-NLS-1$
+ logger.trace("Vary Header value should be set to {}", varyHeaderValueStr); //$NON-NLS-1$
msgContext.setAttribute(RequestImpl.VaryHeader.class, new VaryHeader(varyHeaderValueStr));
return bestVariant.variant;
}
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/contexts/ServerMediaTypeCharsetAdjuster.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/contexts/ServerMediaTypeCharsetAdjuster.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/contexts/ServerMediaTypeCharsetAdjuster.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/contexts/ServerMediaTypeCharsetAdjuster.java Thu Jul 8 16:12:52 2010
@@ -50,7 +50,7 @@ public class ServerMediaTypeCharsetAdjus
public MediaType setDefaultCharsetOnMediaTypeHeader(MultivaluedMap<String, Object> httpHeaders,
MediaType mediaType) {
- logger.debug("setDefaultCharsetOnMediaTypeHeader({}, {}) entry", httpHeaders, mediaType); //$NON-NLS-1$
+ logger.trace("setDefaultCharsetOnMediaTypeHeader({}, {}) entry", httpHeaders, mediaType); //$NON-NLS-1$
RuntimeContext context = RuntimeContextTLS.getRuntimeContext();
// we're on the server, so this is a safe cast
@@ -60,7 +60,7 @@ public class ServerMediaTypeCharsetAdjus
.get(HttpHeaders.CONTENT_TYPE) == null)) {
// only correct the MediaType if the MediaType was not explicitly
// set
- logger.debug("Media Type not explicitly set on Response so going to correct charset parameter if necessary"); //$NON-NLS-1$
+ logger.trace("Media Type not explicitly set on Response so going to correct charset parameter if necessary"); //$NON-NLS-1$
if (ProviderUtils.getCharsetOrNull(mediaType) == null) { //$NON-NLS-1$
try {
String charsetValue = "UTF-8"; //$NON-NLS-1$
@@ -75,18 +75,18 @@ public class ServerMediaTypeCharsetAdjus
String newMediaTypeStr = mediaType.toString() + ";charset=" + charsetValue; //$NON-NLS-1$
mediaType = MediaType.valueOf(newMediaTypeStr);
httpHeaders.putSingle(HttpHeaders.CONTENT_TYPE, newMediaTypeStr);
- logger.debug("Changed media type to be {} in Content-Type HttpHeader", newMediaTypeStr); //$NON-NLS-1$
+ logger.trace("Changed media type to be {} in Content-Type HttpHeader", newMediaTypeStr); //$NON-NLS-1$
} catch (Exception e) {
- logger.debug("Caught exception while trying to set the charset", e); //$NON-NLS-1$
+ logger.trace("Caught exception while trying to set the charset", e); //$NON-NLS-1$
}
}
}
} else {
- logger.debug("No default charset was applied to the response Content-Type header due to deployment configuration directive."); // $NON-NLS-1$ //$NON-NLS-1$
+ logger.trace("No default charset was applied to the response Content-Type header due to deployment configuration directive."); // $NON-NLS-1$ //$NON-NLS-1$
}
- logger.debug("setDefaultCharsetOnMediaTypeHeader() exit returning {}", mediaType); //$NON-NLS-1$
+ logger.trace("setDefaultCharsetOnMediaTypeHeader() exit returning {}", mediaType); //$NON-NLS-1$
return mediaType;
}
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/contexts/UriInfoImpl.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/contexts/UriInfoImpl.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/contexts/UriInfoImpl.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/contexts/UriInfoImpl.java Thu Jul 8 16:12:52 2010
@@ -87,13 +87,13 @@ public class UriInfoImpl implements UriI
String requestPath = getPath(false);
absolutePath = getBaseUri().resolve(requestPath);
}
- logger.debug("getAbsolutePath() returning: {}", absolutePath); //$NON-NLS-1$
+ logger.trace("getAbsolutePath() returning: {}", absolutePath); //$NON-NLS-1$
return absolutePath;
}
public UriBuilder getAbsolutePathBuilder() {
UriBuilder builder = UriBuilder.fromUri(getAbsolutePath());
- logger.debug("getAbsolutePathBuilder() returning: {}", builder); //$NON-NLS-1$
+ logger.trace("getAbsolutePathBuilder() returning: {}", builder); //$NON-NLS-1$
return builder;
}
@@ -108,13 +108,13 @@ public class UriInfoImpl implements UriI
}
}
}
- logger.debug("getBaseUri() returning: {}", baseUri); //$NON-NLS-1$
+ logger.trace("getBaseUri() returning: {}", baseUri); //$NON-NLS-1$
return baseUri;
}
public UriBuilder getBaseUriBuilder() {
UriBuilder builder = UriBuilder.fromUri(getBaseUri());
- logger.debug("getBaseUriBuilder() returning: {}", builder); //$NON-NLS-1$
+ logger.trace("getBaseUriBuilder() returning: {}", builder); //$NON-NLS-1$
return builder;
}
@@ -122,7 +122,7 @@ public class UriInfoImpl implements UriI
List<ResourceInstance> resources =
Collections.unmodifiableList(messageContext.getAttribute(SearchResult.class).getData()
.getMatchedResources());
- logger.debug("getMatchedResourceInstances() returning: {}", resources); //$NON-NLS-1$
+ logger.trace("getMatchedResourceInstances() returning: {}", resources); //$NON-NLS-1$
return resources;
}
@@ -133,7 +133,7 @@ public class UriInfoImpl implements UriI
for (ResourceInstance resourceInstance : matchedResources) {
resourceList.add(resourceInstance.getInstance(messageContext));
}
- logger.debug("getMatchedResources() returning: {}", resourceList); //$NON-NLS-1$
+ logger.trace("getMatchedResources() returning: {}", resourceList); //$NON-NLS-1$
return Collections.unmodifiableList(resourceList);
}
@@ -142,7 +142,7 @@ public class UriInfoImpl implements UriI
}
public List<String> getMatchedURIs(boolean decode) {
- logger.debug("getMatchedURIs({}) called", decode); //$NON-NLS-1$
+ logger.trace("getMatchedURIs({}) called", decode); //$NON-NLS-1$
List<List<PathSegment>> matchedURIs =
messageContext.getAttribute(SearchResult.class).getData().getMatchedURIs();
if (matchedURIsStrings != null && matchedURIsStrings.size() != matchedURIs.size()) {
@@ -153,7 +153,7 @@ public class UriInfoImpl implements UriI
if (matchedURIsStrings == null) {
matchedURIsStrings = new ArrayList<String>(matchedURIs.size());
for (List<PathSegment> segments : matchedURIs) {
- logger.debug("Adding matched URI: {}", segments); //$NON-NLS-1$
+ logger.trace("Adding matched URI: {}", segments); //$NON-NLS-1$
matchedURIsStrings.add(PathSegmentImpl.toString(segments));
}
}
@@ -165,12 +165,12 @@ public class UriInfoImpl implements UriI
for (String uri : matchedURIsStrings) {
String decodedUri = UriEncoder.decodeString(uri);
decodedMatchedURIsStrings.add(decodedUri);
- logger.debug("Adding decoded URI: {} from URI: {}", decodedUri, uri); //$NON-NLS-1$
+ logger.trace("Adding decoded URI: {} from URI: {}", decodedUri, uri); //$NON-NLS-1$
}
}
list = decodedMatchedURIsStrings;
}
- logger.debug("getMatchedURIs({}) returning {}", decode, list); //$NON-NLS-1$
+ logger.trace("getMatchedURIs({}) returning {}", decode, list); //$NON-NLS-1$
return Collections.unmodifiableList(list);
}
@@ -179,17 +179,17 @@ public class UriInfoImpl implements UriI
}
public String getPath(boolean decode) {
- logger.debug("getPath({}) called", decode); //$NON-NLS-1$
+ logger.trace("getPath({}) called", decode); //$NON-NLS-1$
if (path == null) {
path = buildRequestPath(messageContext.getAttribute(HttpServletRequest.class));
}
if (decode) {
String decodedPath = UriEncoder.decodeString(path);
- logger.debug("getPath({}) returning {}", decode, decodedPath); //$NON-NLS-1$
+ logger.trace("getPath({}) returning {}", decode, decodedPath); //$NON-NLS-1$
return decodedPath;
}
- logger.debug("getPath({}) returning {}", decode, path); //$NON-NLS-1$
+ logger.trace("getPath({}) returning {}", decode, path); //$NON-NLS-1$
return path;
}
@@ -198,7 +198,7 @@ public class UriInfoImpl implements UriI
}
public MultivaluedMap<String, String> getPathParameters(boolean decode) {
- logger.debug("getPathParameters({}) called", decode); //$NON-NLS-1$
+ logger.trace("getPathParameters({}) called", decode); //$NON-NLS-1$
if (pathParameters == null) {
pathParameters = new MultivaluedMapImpl<String, String>();
SearchResult searchResult = messageContext.getAttribute(SearchResult.class);
@@ -207,7 +207,7 @@ public class UriInfoImpl implements UriI
.getMessage("methodCallOutsideScopeOfRequestContext")); //$NON-NLS-1$
}
MultivaluedMapImpl.copy(searchResult.getData().getMatchedVariables(), pathParameters);
- logger.debug("getPathParameters({}) encoded path parameters are: {}", //$NON-NLS-1$
+ logger.trace("getPathParameters({}) encoded path parameters are: {}", //$NON-NLS-1$
decode,
pathParameters);
}
@@ -220,7 +220,7 @@ public class UriInfoImpl implements UriI
map = decodedPathParameters;
}
- logger.debug("getPathParameters({}) returning {}", decode, map); //$NON-NLS-1$
+ logger.trace("getPathParameters({}) returning {}", decode, map); //$NON-NLS-1$
return map;
}
@@ -233,10 +233,10 @@ public class UriInfoImpl implements UriI
}
public List<PathSegment> getPathSegments(boolean decode) {
- logger.debug("getPathSegments({}) called", decode); //$NON-NLS-1$
+ logger.trace("getPathSegments({}) called", decode); //$NON-NLS-1$
if (pathSegments == null) {
pathSegments = UriHelper.parsePath(getPath(false));
- logger.debug("getPathSegments({}) encoded path parameters are: {}", //$NON-NLS-1$
+ logger.trace("getPathSegments({}) encoded path parameters are: {}", //$NON-NLS-1$
decode,
pathSegments);
}
@@ -248,7 +248,7 @@ public class UriInfoImpl implements UriI
}
list = decodedPathSegments;
}
- logger.debug("getPathSegments({}) returning {}", decode, list); //$NON-NLS-1$
+ logger.trace("getPathSegments({}) returning {}", decode, list); //$NON-NLS-1$
return list;
}
@@ -257,13 +257,13 @@ public class UriInfoImpl implements UriI
}
public MultivaluedMap<String, String> getQueryParameters(boolean decode) {
- logger.debug("getQueryParameters({}) called", decode); //$NON-NLS-1$
+ logger.trace("getQueryParameters({}) called", decode); //$NON-NLS-1$
if (queryParameters == null) {
queryParameters = new MultivaluedMapImpl<String, String>();
String query = messageContext.getAttribute(HttpServletRequest.class).getQueryString();
- logger.debug("getQueryParameters({}) query string is: {}", decode, query); //$NON-NLS-1$
+ logger.trace("getQueryParameters({}) query string is: {}", decode, query); //$NON-NLS-1$
queryParameters = UriHelper.parseQuery(query);
- logger.debug("getQueryParameters({}) encoded query parameters are: {}", //$NON-NLS-1$
+ logger.trace("getQueryParameters({}) encoded query parameters are: {}", //$NON-NLS-1$
decode,
queryParameters);
}
@@ -275,25 +275,25 @@ public class UriInfoImpl implements UriI
}
map = decodedQueryParameters;
}
- logger.debug("getQueryParameters({}) returning {}", decode, map); //$NON-NLS-1$
+ logger.trace("getQueryParameters({}) returning {}", decode, map); //$NON-NLS-1$
return map;
}
public URI getRequestUri() {
- logger.debug("getRequestUri() called"); //$NON-NLS-1$
+ logger.trace("getRequestUri() called"); //$NON-NLS-1$
UriBuilder builder = getAbsolutePathBuilder();
String query = messageContext.getAttribute(HttpServletRequest.class).getQueryString();
- logger.debug("getRequestUri() query string: {}", query); //$NON-NLS-1$
+ logger.trace("getRequestUri() query string: {}", query); //$NON-NLS-1$
builder.replaceQuery(query);
- logger.debug("getRequestUri() build after query replacement: {}", builder); //$NON-NLS-1$
+ logger.trace("getRequestUri() build after query replacement: {}", builder); //$NON-NLS-1$
URI uri = builder.build();
- logger.debug("getRequestUri() returning: {}", uri); //$NON-NLS-1$
+ logger.trace("getRequestUri() returning: {}", uri); //$NON-NLS-1$
return uri;
}
public UriBuilder getRequestUriBuilder() {
UriBuilder builder = UriBuilder.fromUri(getRequestUri());
- logger.debug("getRequestUriBuilder() returning: {}", builder); //$NON-NLS-1$
+ logger.trace("getRequestUriBuilder() returning: {}", builder); //$NON-NLS-1$
return builder;
}
@@ -303,7 +303,7 @@ public class UriInfoImpl implements UriI
buildBaseUriString(messageContext.getAttribute(HttpServletRequest.class),
messageContext.getProperties());
}
- logger.debug("getBaseUriString() returned {}", baseUriString); //$NON-NLS-1$
+ logger.trace("getBaseUriString() returned {}", baseUriString); //$NON-NLS-1$
return baseUriString;
}
@@ -320,36 +320,36 @@ public class UriInfoImpl implements UriI
.getMessage("parameterHttpIsEmptyOrNotInitialized")); //$NON-NLS-1$
}
} else {
- logger.debug("Endpoint is not set up in the configuration; using request detection"); //$NON-NLS-1$
+ logger.trace("Endpoint is not set up in the configuration; using request detection"); //$NON-NLS-1$
}
String baseURI = httpURI;
if (request.isSecure()) {
- logger.debug("buildBaseUriString request is secure"); //$NON-NLS-1$
+ logger.trace("buildBaseUriString request is secure"); //$NON-NLS-1$
baseURI = httpsURI;
}
- logger.debug("buildBaseUriString baseURI from properties is: {}", baseURI); //$NON-NLS-1$
+ logger.trace("buildBaseUriString baseURI from properties is: {}", baseURI); //$NON-NLS-1$
if (baseURI == null) {
baseURI = autodetectBaseUri(request);
- logger.debug("buildBaseUriString baseURI from autodetectBaseUri is: {}", baseURI); //$NON-NLS-1$
+ logger.trace("buildBaseUriString baseURI from autodetectBaseUri is: {}", baseURI); //$NON-NLS-1$
}
return appendContextAndServletPath(baseURI, request, properties);
}
private String getURI(Properties properties, String propertyName) {
String uri = properties.getProperty(propertyName);
- logger.debug("getURI({}, {}) called", properties, propertyName); //$NON-NLS-1$
+ logger.trace("getURI({}, {}) called", properties, propertyName); //$NON-NLS-1$
if (uri != null && uri.length() != 0) {
try {
URI uriParsed = new URI(uri);
- logger.debug("getURI({}, {}) returning {}", new Object[] {properties, propertyName, //$NON-NLS-1$
+ logger.trace("getURI({}, {}) returning {}", new Object[] {properties, propertyName, //$NON-NLS-1$
uriParsed});
return uriParsed.toString();
} catch (URISyntaxException e) {
throw new IllegalArgumentException(Messages.getMessage("uriInfoInvalidURI"), e); //$NON-NLS-1$
}
}
- logger.debug("getURI({}, {}) returning null", properties, propertyName); //$NON-NLS-1$
+ logger.trace("getURI({}, {}) returning null", properties, propertyName); //$NON-NLS-1$
return null;
}
@@ -365,7 +365,7 @@ public class UriInfoImpl implements UriI
private String appendContextAndServletPath(String basePath,
HttpServletRequest request,
Properties properties) {
- logger.debug("appendContextAndServletPath({}, {}, {}) called", new Object[] {basePath, //$NON-NLS-1$
+ logger.trace("appendContextAndServletPath({}, {}, {}) called", new Object[] {basePath, //$NON-NLS-1$
request, properties});
StringBuilder builder = new StringBuilder(basePath);
if (builder.charAt(builder.length() - 1) == '/') {
@@ -377,22 +377,22 @@ public class UriInfoImpl implements UriI
.getContextPath());
if (contextPath != null) {
builder.append(contextPath);
- logger.debug("appendContextAndServletPath after contextPath called is: {} ", builder); //$NON-NLS-1$
+ logger.trace("appendContextAndServletPath after contextPath called is: {} ", builder); //$NON-NLS-1$
}
boolean isServlet =
RuntimeContextTLS.getRuntimeContext().getAttribute(FilterConfig.class) == null;
- logger.debug("appendContextAndServletPath isServlet: {} ", isServlet); //$NON-NLS-1$
+ logger.trace("appendContextAndServletPath isServlet: {} ", isServlet); //$NON-NLS-1$
if (request.getServletPath() != null && isServlet) {
builder.append(request.getServletPath());
logger
- .debug("appendContextAndServletPath after getServletPath called is: {} ", builder); //$NON-NLS-1$
+ .trace("appendContextAndServletPath after getServletPath called is: {} ", builder); //$NON-NLS-1$
}
if (builder.charAt(builder.length() - 1) != '/') {
builder.append('/');
}
String builderStr = builder.toString();
- logger.debug("appendContextAndServletPath returning: {} ", builderStr); //$NON-NLS-1$
+ logger.trace("appendContextAndServletPath returning: {} ", builderStr); //$NON-NLS-1$
return builderStr;
}
@@ -400,24 +400,24 @@ public class UriInfoImpl implements UriI
// we cannot use request.getPathInfo() since it cuts off the ';'
// parameters on Tomcat
String requestPath = request.getRequestURI();
- logger.debug("buildRequestPath requestPath is: {}", requestPath); //$NON-NLS-1$
+ logger.trace("buildRequestPath requestPath is: {}", requestPath); //$NON-NLS-1$
// Syntax-Based Normalization (RFC 3986, section 6.2.2)
requestPath = UriHelper.normalize(requestPath);
- logger.debug("buildRequestPath requestPath normalized is: {}", requestPath); //$NON-NLS-1$
+ logger.trace("buildRequestPath requestPath normalized is: {}", requestPath); //$NON-NLS-1$
// cut off the context path from the beginning
if (request.getContextPath() != null) {
requestPath = requestPath.substring(request.getContextPath().length());
- logger.debug("buildRequestPath after context path removed: {}", requestPath); //$NON-NLS-1$
+ logger.trace("buildRequestPath after context path removed: {}", requestPath); //$NON-NLS-1$
}
// cut off the servlet path from the beginning
boolean isServlet =
RuntimeContextTLS.getRuntimeContext().getAttribute(FilterConfig.class) == null;
- logger.debug("buildRequestPath isServlet: {}", isServlet); //$NON-NLS-1$
+ logger.trace("buildRequestPath isServlet: {}", isServlet); //$NON-NLS-1$
if (request.getServletPath() != null && isServlet) {
requestPath = requestPath.substring(request.getServletPath().length());
logger
- .debug("buildRequestPath requestPath after servlet path removed: {}", requestPath); //$NON-NLS-1$
+ .trace("buildRequestPath requestPath after servlet path removed: {}", requestPath); //$NON-NLS-1$
}
// cut off all leading /
@@ -426,7 +426,7 @@ public class UriInfoImpl implements UriI
++index;
}
requestPath = requestPath.substring(index);
- logger.debug("buildRequestPath returning requestPath: {}", requestPath); //$NON-NLS-1$
+ logger.trace("buildRequestPath returning requestPath: {}", requestPath); //$NON-NLS-1$
return requestPath;
}
}
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/CreateInvocationParametersHandler.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/CreateInvocationParametersHandler.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/CreateInvocationParametersHandler.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/CreateInvocationParametersHandler.java Thu Jul 8 16:12:52 2010
@@ -40,13 +40,13 @@ public class CreateInvocationParametersH
// create and save the invocation parameters for the found method
List<Injectable> formal = result.getMethod().getMetadata().getFormalParameters();
- logger.debug("Formal Injectable parameters list is: {}", formal); //$NON-NLS-1$
+ logger.trace("Formal Injectable parameters list is: {}", formal); //$NON-NLS-1$
Object[] parameters = InjectableFactory.getInstance().instantiate(formal, context);
- if(logger.isDebugEnabled()) {
+ if(logger.isTraceEnabled()) {
if(parameters == null) {
- logger.debug("Actual parameters list to inject is: {}", parameters); //$NON-NLS-1$
+ logger.trace("Actual parameters list to inject is: {}", parameters); //$NON-NLS-1$
} else {
- logger.debug("Actual parameters list to inject is: null"); //$NON-NLS-1$
+ logger.trace("Actual parameters list to inject is: null"); //$NON-NLS-1$
}
}
result.setInvocationParameters(parameters);
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/FindResourceMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/FindResourceMethodHandler.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/FindResourceMethodHandler.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/FindResourceMethodHandler.java Thu Jul 8 16:12:52 2010
@@ -60,7 +60,7 @@ public class FindResourceMethodHandler i
// resource method
if (resource.isExactMatch()) {
logger
- .debug("Root resource @Path matches exactly so finding root resource method in {}", //$NON-NLS-1$
+ .trace("Root resource @Path matches exactly so finding root resource method in {}", //$NON-NLS-1$
resource.getResourceClass().getName());
handleResourceMethod(context, chain);
return;
@@ -75,11 +75,11 @@ public class FindResourceMethodHandler i
if (tail.startsWith("/")) { //$NON-NLS-1$
tail = tail.substring(1);
}
- logger.debug("Unmatched tail to the URI: {}", tail); //$NON-NLS-1$
+ logger.trace("Unmatched tail to the URI: {}", tail); //$NON-NLS-1$
// get a sorted list of all the sub-resources (methods and locators)
List<SubResourceInstance> subResources = resource.getRecord().getMatchingSubResources(tail);
- logger.debug("Possible subresources found: {}", subResources); //$NON-NLS-1$
+ logger.trace("Possible subresources found: {}", subResources); //$NON-NLS-1$
if (subResources.size() == 0) {
result.setError(new WebApplicationException(Response.Status.NOT_FOUND));
return;
@@ -87,7 +87,7 @@ public class FindResourceMethodHandler i
// get all the searchable sub-resources
List<SubResourceInstance> searchableSubResources = getSearchableSubResources(subResources);
- logger.debug("Possible searchable subresources found: {}", searchableSubResources); //$NON-NLS-1$
+ logger.trace("Possible searchable subresources found: {}", searchableSubResources); //$NON-NLS-1$
// save the current data in case we need to role back the information if
// the search fails and we will need to continue to the next
// sub-resource
@@ -144,9 +144,9 @@ public class FindResourceMethodHandler i
result.setFound(true);
result.setMethod(method);
// continue the chain to invoke the method
- if (logger.isDebugEnabled()) {
+ if (logger.isTraceEnabled()) {
MethodMetadata metadata = (method == null) ? null : method.getMetadata();
- logger.debug("Found root resource method to invoke: {} ", metadata); //$NON-NLS-1$
+ logger.trace("Found root resource method to invoke: {} ", metadata); //$NON-NLS-1$
}
chain.doChain(context);
}
@@ -176,9 +176,9 @@ public class FindResourceMethodHandler i
saveFoundMethod(result, matcher, method, context);
// continue the chain to invoke the method
- if (logger.isDebugEnabled()) {
+ if (logger.isTraceEnabled()) {
MethodMetadata metadata = (method == null) ? null : method.getMetadata();
- logger.debug("Found subresource method to invoke: {} ", metadata); //$NON-NLS-1$
+ logger.trace("Found subresource method to invoke: {} ", metadata); //$NON-NLS-1$
}
chain.doChain(context);
}
@@ -202,10 +202,10 @@ public class FindResourceMethodHandler i
saveFoundMethod(result, matcher, subResourceInstance, context);
// continue the chain to invoke the locator
- if (logger.isDebugEnabled()) {
+ if (logger.isTraceEnabled()) {
MethodMetadata metadata =
(subResourceInstance == null) ? null : subResourceInstance.getMetadata();
- logger.debug("Found subresource locator to invoke: {} ", metadata); //$NON-NLS-1$
+ logger.trace("Found subresource locator to invoke: {} ", metadata); //$NON-NLS-1$
}
chain.doChain(context);
@@ -213,7 +213,7 @@ public class FindResourceMethodHandler i
// continue the search in it
Object subResource = context.getResponseEntity();
if (subResource == null) {
- logger.debug("Subresource returned was null so returning a 404 Not Found"); //$NON-NLS-1$
+ logger.trace("Subresource returned was null so returning a 404 Not Found"); //$NON-NLS-1$
result.setError(new WebApplicationException(Status.NOT_FOUND));
return;
}
@@ -225,7 +225,7 @@ public class FindResourceMethodHandler i
// call recursively to search in the sub-resource
result.setFound(false);
logger
- .debug("Re-invoking the chain (due to hitting a subresource locator method) with the new subresource instance {}", //$NON-NLS-1$
+ .trace("Re-invoking the chain (due to hitting a subresource locator method) with the new subresource instance {}", //$NON-NLS-1$
resourceInstance);
handleRequest(context, chain);
}
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/FindRootResourceHandler.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/FindRootResourceHandler.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/FindRootResourceHandler.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/FindRootResourceHandler.java Thu Jul 8 16:12:52 2010
@@ -50,9 +50,9 @@ public class FindRootResourceHandler imp
// create a path stripped from all matrix parameters to use for matching
List<PathSegment> segments = context.getUriInfo().getPathSegments(false);
- logger.debug("Getting URI Info path segments: {}", segments); //$NON-NLS-1$
+ logger.trace("Getting URI Info path segments: {}", segments); //$NON-NLS-1$
String strippedPath = buildPathForMatching(segments);
- logger.debug("Getting stripped path from segments: {}", strippedPath); //$NON-NLS-1$
+ logger.trace("Getting stripped path from segments: {}", strippedPath); //$NON-NLS-1$
// get a list of root resources that can handle the request
// JAX-RS specification requires to search only the first matching
@@ -61,9 +61,9 @@ public class FindRootResourceHandler imp
// matching resources
List<ResourceInstance> matchedResources =
registry.getMatchingRootResources(strippedPath, isContinuedSearchPolicy);
- logger.debug("Found resource instances: {}", matchedResources); //$NON-NLS-1$
+ logger.trace("Found resource instances: {}", matchedResources); //$NON-NLS-1$
if (matchedResources.size() == 0) {
- logger.debug("No resource found matching {}", context.getUriInfo().getPath(false)); //$NON-NLS-1$
+ logger.trace("No resource found matching {}", context.getUriInfo().getPath(false)); //$NON-NLS-1$
SearchResult result =
new SearchResult(new WebApplicationException(Response.Status.NOT_FOUND));
context.setAttribute(SearchResult.class, result);
@@ -84,7 +84,7 @@ public class FindRootResourceHandler imp
headSegmentsCount,
result.getData().getMatchedVariablesPathSegments());
- logger.debug("Using SearchResult: {}", result); //$NON-NLS-1$
+ logger.trace("Using SearchResult: {}", result); //$NON-NLS-1$
// continue that chain to find the actual resource that will handle
// the request.
@@ -102,7 +102,7 @@ public class FindRootResourceHandler imp
// instances used; the subresource is dead)
List<ResourceInstance> resourceInstances = result.getData().getMatchedResources();
for (ResourceInstance res : resourceInstances) {
- logger.debug("Releasing resource instance"); //$NON-NLS-1$
+ logger.trace("Releasing resource instance"); //$NON-NLS-1$
res.releaseInstance(context);
}
}
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/FlushResultHandler.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/FlushResultHandler.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/FlushResultHandler.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/FlushResultHandler.java Thu Jul 8 16:12:52 2010
@@ -65,19 +65,19 @@ public class FlushResultHandler extends
// assert status code is valid
int statusCode = context.getResponseStatusCode();
if (statusCode < 0) {
- logger.debug("Status code was not set. Nothing to do."); //$NON-NLS-1$
+ logger.trace("Status code was not set. Nothing to do."); //$NON-NLS-1$
return;
}
// assert response is not committed
final HttpServletResponse httpResponse = context.getAttribute(HttpServletResponse.class);
if (httpResponse.isCommitted()) {
- logger.debug("The response is already committed. Nothing to do."); //$NON-NLS-1$
+ logger.trace("The response is already committed. Nothing to do."); //$NON-NLS-1$
return;
}
// set the status code
- logger.debug("Response status code set to: {}", statusCode); //$NON-NLS-1$
+ logger.trace("Response status code set to: {}", statusCode); //$NON-NLS-1$
httpResponse.setStatus(statusCode);
// get the entity
@@ -128,7 +128,7 @@ public class FlushResultHandler extends
// we're done if the actual entity is null
if (entity == null) {
- logger.debug("No entity so writing only the headers"); //$NON-NLS-1$
+ logger.trace("No entity so writing only the headers"); //$NON-NLS-1$
flushHeaders(httpResponse, httpHeaders);
return;
}
@@ -147,7 +147,7 @@ public class FlushResultHandler extends
// use the provider to write the entity
if (messageBodyWriter != null) {
- logger.debug("Serialization using provider {}", messageBodyWriter.getClass().getName()); //$NON-NLS-1$
+ logger.trace("Serialization using provider {}", messageBodyWriter.getClass().getName()); //$NON-NLS-1$
final MultivaluedMap<String, Object> headers = httpHeaders;
@@ -157,8 +157,8 @@ public class FlushResultHandler extends
genericType,
declaredAnnotations,
responseMediaType);
- if (logger.isDebugEnabled()) {
- logger.debug("{}@{}.getSize({}, {}, {}, {}, {}) returned {}", new Object[] { //$NON-NLS-1$
+ if (logger.isTraceEnabled()) {
+ logger.trace("{}@{}.getSize({}, {}, {}, {}, {}) returned {}", new Object[] { //$NON-NLS-1$
messageBodyWriter.getClass().getName(),
Integer.toHexString(System.identityHashCode(messageBodyWriter)),
entity, rawType, genericType, declaredAnnotations,
@@ -170,9 +170,9 @@ public class FlushResultHandler extends
FlushHeadersOutputStream outputStream =
new FlushHeadersOutputStream(httpResponse, headers, responseMediaType);
- if (logger.isDebugEnabled()) {
+ if (logger.isTraceEnabled()) {
logger
- .debug("{}@{}.writeTo({}, {}, {}, {}, {}, {}, {}) being called", new Object[] { //$NON-NLS-1$
+ .trace("{}@{}.writeTo({}, {}, {}, {}, {}, {}, {}) being called", new Object[] { //$NON-NLS-1$
messageBodyWriter.getClass().getName(),
Integer.toHexString(System.identityHashCode(messageBodyWriter)),
entity, rawType, genericType, declaredAnnotations,
@@ -185,13 +185,13 @@ public class FlushResultHandler extends
responseMediaType,
httpHeaders,
outputStream);
- logger.debug("Flushing headers if not written"); //$NON-NLS-1$
+ logger.trace("Flushing headers if not written"); //$NON-NLS-1$
outputStream.flushHeaders();
return;
} else {
logger
- .debug("Could not find a writer for {} and {}. Try to find JAF DataSourceProvider", //$NON-NLS-1$
+ .trace("Could not find a writer for {} and {}. Try to find JAF DataSourceProvider", //$NON-NLS-1$
entity.getClass().getName(),
responseMediaType);
}
@@ -213,13 +213,13 @@ public class FlushResultHandler extends
throw new WebApplicationException(500);
}
- logger.debug("Serialization using data content handler {}", dataContentHandler.getClass() //$NON-NLS-1$
+ logger.trace("Serialization using data content handler {}", dataContentHandler.getClass() //$NON-NLS-1$
.getName());
FlushHeadersOutputStream outputStream =
new FlushHeadersOutputStream(httpResponse, httpHeaders, responseMediaType);
- if (logger.isDebugEnabled()) {
- logger.debug("{}@{}.writeTo({}, {}, {}) being called", new Object[] { //$NON-NLS-1$
+ if (logger.isTraceEnabled()) {
+ logger.trace("{}@{}.writeTo({}, {}, {}) being called", new Object[] { //$NON-NLS-1$
dataContentHandler.getClass().getName(),
Integer.toHexString(System.identityHashCode(dataContentHandler)), entity,
responseMediaType.toString(), outputStream});
@@ -227,7 +227,7 @@ public class FlushResultHandler extends
dataContentHandler
.writeTo(entity,
responseMediaType.getType() + "/" + responseMediaType.getSubtype(), outputStream); //$NON-NLS-1$
- logger.debug("Flushing headers if not written"); //$NON-NLS-1$
+ logger.trace("Flushing headers if not written"); //$NON-NLS-1$
outputStream.flushHeaders();
}
@@ -238,12 +238,12 @@ public class FlushResultHandler extends
RequestImpl.VaryHeader varyHeader =
RuntimeContextTLS.getRuntimeContext().getAttribute(RequestImpl.VaryHeader.class);
if (varyHeader != null) {
- logger.debug("Vary header automatically set by a call to RequestImpl"); //$NON-NLS-1$
+ logger.trace("Vary header automatically set by a call to RequestImpl"); //$NON-NLS-1$
headers.putSingle(HttpHeaders.VARY, varyHeader.getVaryHeaderValue());
}
}
- logger.debug("Flushing headers: {}", headers); //$NON-NLS-1$
+ logger.trace("Flushing headers: {}", headers); //$NON-NLS-1$
for (Entry<String, List<Object>> entry : headers.entrySet()) {
String key = entry.getKey();
@@ -316,7 +316,7 @@ public class FlushResultHandler extends
private void flushHeaders() {
if (!writeStarted) {
if (httpResponse.getContentType() == null) {
- logger.debug("Set response Content-Type to: {} ", responseMediaType); //$NON-NLS-1$
+ logger.trace("Set response Content-Type to: {} ", responseMediaType); //$NON-NLS-1$
httpResponse.setContentType(responseMediaType.toString());
}
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/HeadMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/HeadMethodHandler.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/HeadMethodHandler.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/HeadMethodHandler.java Thu Jul 8 16:12:52 2010
@@ -61,7 +61,7 @@ public class HeadMethodHandler implement
.getCode()
&& context.getHttpMethod().equalsIgnoreCase(HttpMethod.HEAD)) {
logger
- .debug("No HEAD method so trying GET method while not sending the response entity"); //$NON-NLS-1$
+ .trace("No HEAD method so trying GET method while not sending the response entity"); //$NON-NLS-1$
context.setHttpMethod(HttpMethod.GET);
HttpServletResponse originalResponse = context.getAttribute(HttpServletResponse.class);
NoBodyResponse noBodyResponse = new NoBodyResponse(originalResponse);
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/InvokeMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/InvokeMethodHandler.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/InvokeMethodHandler.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/InvokeMethodHandler.java Thu Jul 8 16:12:52 2010
@@ -39,9 +39,9 @@ public class InvokeMethodHandler extends
Method javaMethod = searchResult.getMethod().getMetadata().getReflectionMethod();
Object[] parameters = searchResult.getInvocationParameters();
Object instance = searchResult.getResource().getInstance(context);
- if (logger.isDebugEnabled()) {
+ if (logger.isTraceEnabled()) {
logger
- .debug("Invoking method {} of declaring class {} on the instance of a class {}@{} with parameters {}", //$NON-NLS-1$
+ .trace("Invoking method {} of declaring class {} on the instance of a class {}@{} with parameters {}", //$NON-NLS-1$
new Object[] {javaMethod.getName(),
javaMethod.getDeclaringClass().getName(),
instance.getClass().getName(),
@@ -51,7 +51,7 @@ public class InvokeMethodHandler extends
Object result = javaMethod.invoke(instance, parameters);
context.setResponseEntity(result);
} catch (InvocationTargetException ite) {
- logger.debug("Exception encountered during invocation:", ite.getTargetException()); //$NON-NLS-1$
+ logger.trace("Exception encountered during invocation:", ite.getTargetException()); //$NON-NLS-1$
throw ite.getTargetException(); // unpack the original exception
}
}
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/OptionsMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/OptionsMethodHandler.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/OptionsMethodHandler.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/OptionsMethodHandler.java Thu Jul 8 16:12:52 2010
@@ -56,7 +56,7 @@ public class OptionsMethodHandler implem
ResourceRegistry resourceRegistry = context.getAttribute(ResourceRegistry.class);
Set<String> httpMethods = resourceRegistry.getOptions(searchResult.getResource());
logger
- .debug("Invoking OPTIONS request handled by runtime with {} resource and {} HTTP methods", //$NON-NLS-1$
+ .trace("Invoking OPTIONS request handled by runtime with {} resource and {} HTTP methods", //$NON-NLS-1$
searchResult.getResource(),
httpMethods);
if (httpMethods.size() > 0) {
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/PopulateErrorResponseHandler.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/PopulateErrorResponseHandler.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/PopulateErrorResponseHandler.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/PopulateErrorResponseHandler.java Thu Jul 8 16:12:52 2010
@@ -47,7 +47,7 @@ public class PopulateErrorResponseHandle
ExceptionMapper<Throwable> provider =
(ExceptionMapper<Throwable>)findProvider(context, exception);
if (provider != null) {
- logger.debug("Using provider {} to map exception {}", provider, exception); //$NON-NLS-1$
+ logger.trace("Using provider {} to map exception {}", provider, exception); //$NON-NLS-1$
context.setResponseEntity(executeProvider(exception, provider));
} else {
throw exception;
@@ -80,10 +80,10 @@ public class PopulateErrorResponseHandle
(ExceptionMapper<WebApplicationException>)findProvider(msgContext, exception);
}
if (provider != null) {
- logger.debug("Using ExceptionMapper to map response from WebApplicationException"); //$NON-NLS-1$
+ logger.trace("Using ExceptionMapper to map response from WebApplicationException"); //$NON-NLS-1$
msgContext.setResponseEntity(provider.toResponse(exception));
} else {
- logger.debug("Getting response directly from WebApplicationException"); //$NON-NLS-1$
+ logger.trace("Getting response directly from WebApplicationException"); //$NON-NLS-1$
msgContext.setResponseEntity(exception.getResponse());
}
}
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/PopulateResponseMediaTypeHandler.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/PopulateResponseMediaTypeHandler.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/PopulateResponseMediaTypeHandler.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/PopulateResponseMediaTypeHandler.java Thu Jul 8 16:12:52 2010
@@ -54,14 +54,14 @@ public class PopulateResponseMediaTypeHa
Object result = context.getResponseEntity();
if (result == null) {
- logger.debug("No entity so no Content-Type needs to be set"); //$NON-NLS-1$
+ logger.trace("No entity so no Content-Type needs to be set"); //$NON-NLS-1$
return;
}
if (result instanceof Response) {
Response response = (Response)result;
if (response.getEntity() == null) {
- logger.debug("No entity so no Content-Type needs to be set"); //$NON-NLS-1$
+ logger.trace("No entity so no Content-Type needs to be set"); //$NON-NLS-1$
return;
}
@@ -73,7 +73,7 @@ public class PopulateResponseMediaTypeHa
} else {
responseMediaType = MediaType.valueOf(first.toString());
}
- logger.debug("Content-Type was set by application to {}", responseMediaType); //$NON-NLS-1$
+ logger.trace("Content-Type was set by application to {}", responseMediaType); //$NON-NLS-1$
}
}
@@ -83,7 +83,7 @@ public class PopulateResponseMediaTypeHa
if (searchResult != null && searchResult.isFound()) {
MethodMetadata methodMetadata = searchResult.getMethod().getMetadata();
producedMime = methodMetadata.getProduces();
- logger.debug("Determining Content-Type from @Produces on method: {}", producedMime); //$NON-NLS-1$
+ logger.trace("Determining Content-Type from @Produces on method: {}", producedMime); //$NON-NLS-1$
}
if (producedMime == null || producedMime.isEmpty()) {
if (result instanceof Response) {
@@ -106,7 +106,7 @@ public class PopulateResponseMediaTypeHa
.getMessage("populateResponseMediaTypeHandlerFromCompatibleMessageBodyWriters")); //$NON-NLS-1$
}
logger
- .debug("Determining Content-Type from compatible generic type to {} from MessageBodyWriters: {}", //$NON-NLS-1$
+ .trace("Determining Content-Type from compatible generic type to {} from MessageBodyWriters: {}", //$NON-NLS-1$
result.getClass(),
producedMime);
}
@@ -121,7 +121,7 @@ public class PopulateResponseMediaTypeHa
List<CandidateMediaType> candidates = new LinkedList<CandidateMediaType>();
for (MediaType acceptableMediaType : acceptableMediaTypes) {
for (MediaType mediaType : producedMime) {
- logger.debug("Comparing {} to {}", acceptableMediaType, mediaType); //$NON-NLS-1$
+ logger.trace("Comparing {} to {}", acceptableMediaType, mediaType); //$NON-NLS-1$
if (mediaType.isCompatible(acceptableMediaType)) {
MediaType candidateMediaType = null;
if (MediaTypeUtils.compareTo(mediaType, acceptableMediaType) > 0) {
@@ -129,15 +129,15 @@ public class PopulateResponseMediaTypeHa
} else {
candidateMediaType = acceptableMediaType;
}
- logger.debug("MediaType compatible so using candidate type {}", //$NON-NLS-1$
+ logger.trace("MediaType compatible so using candidate type {}", //$NON-NLS-1$
candidateMediaType);
String q = acceptableMediaType.getParameters().get("q"); //$NON-NLS-1$
CandidateMediaType candidate =
new CandidateMediaType(candidateMediaType, q);
if (Double.compare(candidate.q, 0.0) != 0) {
- if (logger.isDebugEnabled()) {
+ if (logger.isTraceEnabled()) {
logger
- .debug("Candidate {} has q value {} so adding to possible candidates", //$NON-NLS-1$
+ .trace("Candidate {} has q value {} so adding to possible candidates", //$NON-NLS-1$
candidate.getMediaType(),
q);
}
@@ -150,7 +150,7 @@ public class PopulateResponseMediaTypeHa
// there are no candidates
if (candidates.isEmpty()) {
if (isErrorFlow()) {
- logger.debug("Error flow and no candidates so not going to set a Content-Type"); //$NON-NLS-1$
+ logger.trace("Error flow and no candidates so not going to set a Content-Type"); //$NON-NLS-1$
return;
}
if (logger.isInfoEnabled()) {
@@ -168,8 +168,8 @@ public class PopulateResponseMediaTypeHa
for (CandidateMediaType candidate : candidates) {
if (max == null) {
max = candidate;
- if (logger.isDebugEnabled()) {
- logger.debug("No previous best candidate so using candidate {}", max //$NON-NLS-1$
+ if (logger.isTraceEnabled()) {
+ logger.trace("No previous best candidate so using candidate {}", max //$NON-NLS-1$
.getMediaType());
}
} else {
@@ -180,16 +180,16 @@ public class PopulateResponseMediaTypeHa
MediaTypeUtils.compareTo(candidate.getMediaType(), max.getMediaType());
if (comparison > 0) {
max = candidate;
- if (logger.isDebugEnabled()) {
+ if (logger.isTraceEnabled()) {
logger
- .debug("Best candidate is now {} because it was a more specific media type", //$NON-NLS-1$
+ .trace("Best candidate is now {} because it was a more specific media type", //$NON-NLS-1$
max.getMediaType());
}
} else if (comparison == 0 && candidate.getQ() > max.getQ()) {
max = candidate;
- if (logger.isDebugEnabled()) {
+ if (logger.isTraceEnabled()) {
logger
- .debug("Best candidate is now {} because it had a higher quality value {} compared to {} with quality value {}", //$NON-NLS-1$
+ .trace("Best candidate is now {} because it had a higher quality value {} compared to {} with quality value {}", //$NON-NLS-1$
new Object[] {max.getMediaType(), max.getQ(), candidate,
candidate.getQ()});
}
@@ -199,7 +199,7 @@ public class PopulateResponseMediaTypeHa
if (!useOctetStream && (candidate.getMediaType().equals(MediaType.WILDCARD_TYPE) || candidate
.getMediaType().equals(APPLICATION_TYPE))) {
logger
- .debug("If necessary, use an application/octet-stream because there is a wildcard: {}", //$NON-NLS-1$
+ .trace("If necessary, use an application/octet-stream because there is a wildcard: {}", //$NON-NLS-1$
candidate.getMediaType());
useOctetStream = true;
}
@@ -209,11 +209,11 @@ public class PopulateResponseMediaTypeHa
responseMediaType = max.getMediaType();
} else if (useOctetStream) {
logger
- .debug("Content-Type was reset to application/octet-stream because it was either */* or was application/*"); //$NON-NLS-1$
+ .trace("Content-Type was reset to application/octet-stream because it was either */* or was application/*"); //$NON-NLS-1$
responseMediaType = MediaType.APPLICATION_OCTET_STREAM_TYPE;
} else {
if (isErrorFlow()) {
- logger.debug("Error flow so not going to set a response Content-Type"); //$NON-NLS-1$
+ logger.trace("Error flow so not going to set a response Content-Type"); //$NON-NLS-1$
return;
}
if (logger.isInfoEnabled()) {
@@ -224,7 +224,7 @@ public class PopulateResponseMediaTypeHa
}
}
- logger.debug("Response Content-Type will be set to {}", responseMediaType); //$NON-NLS-1$
+ logger.trace("Response Content-Type will be set to {}", responseMediaType); //$NON-NLS-1$
context.setResponseMediaType(responseMediaType);
}
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/PopulateResponseStatusHandler.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/PopulateResponseStatusHandler.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/PopulateResponseStatusHandler.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/PopulateResponseStatusHandler.java Thu Jul 8 16:12:52 2010
@@ -53,10 +53,10 @@ public class PopulateResponseStatusHandl
if (status == -1) {
if (entity == null) {
logger
- .debug("No status set and no entity so setting response status to 204 No Content"); //$NON-NLS-1$
+ .trace("No status set and no entity so setting response status to 204 No Content"); //$NON-NLS-1$
status = HttpServletResponse.SC_NO_CONTENT;
} else {
- logger.debug("No status set so setting response status to 200 OK"); //$NON-NLS-1$
+ logger.trace("No status set so setting response status to 200 OK"); //$NON-NLS-1$
status = HttpServletResponse.SC_OK;
}
}
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRecordFactory.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRecordFactory.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRecordFactory.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRecordFactory.java Thu Jul 8 16:12:52 2010
@@ -240,16 +240,16 @@ public class ResourceRecordFactory {
String path = dynamicResource.getPath();
if (path != null) {
classMetadata.addPath(path);
- if (logger.isDebugEnabled()) {
- logger.debug("Adding dispatched path from instance: {}", path); //$NON-NLS-1$
+ if (logger.isTraceEnabled()) {
+ logger.trace("Adding dispatched path from instance: {}", path); //$NON-NLS-1$
}
}
Object parent = dynamicResource.getParent();
if (parent != null) {
classMetadata.getParentInstances().add(parent);
- if (logger.isDebugEnabled()) {
- logger.debug("Adding parent beans from instance: {}", parent); //$NON-NLS-1$
+ if (logger.isTraceEnabled()) {
+ logger.trace("Adding parent beans from instance: {}", parent); //$NON-NLS-1$
}
}
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRegistry.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRegistry.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRegistry.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRegistry.java Thu Jul 8 16:12:52 2010
@@ -116,7 +116,7 @@ public class ResourceRegistry {
* @param priority priority of the resource
*/
public void addResource(Object instance, double priority) {
- logger.debug("Adding resource instance: {} with priority: {}", instance, priority); //$NON-NLS-1$
+ logger.trace("Adding resource instance: {} with priority: {}", instance, priority); //$NON-NLS-1$
writersLock.lock();
try {
@@ -144,7 +144,7 @@ public class ResourceRegistry {
* @param priority priority of the resource
*/
public void addResource(Class<?> clazz, double priority) {
- logger.debug("Adding resource class: {} with priority: {}", clazz, priority); //$NON-NLS-1$
+ logger.trace("Adding resource class: {} with priority: {}", clazz, priority); //$NON-NLS-1$
writersLock.lock();
try {
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/servlet/AbstractRestServlet.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/servlet/AbstractRestServlet.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/servlet/AbstractRestServlet.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/servlet/AbstractRestServlet.java Thu Jul 8 16:12:52 2010
@@ -43,7 +43,7 @@ public abstract class AbstractRestServle
public void init() throws ServletException {
super.init();
requestProcessorAttribute = getInitParameter(REQUEST_PROCESSOR_ATTRIBUTE);
- logger.debug("Request processor attribute is {} for {}", requestProcessorAttribute, this); //$NON-NLS-1$
+ logger.trace("Request processor attribute is {} for {}", requestProcessorAttribute, this); //$NON-NLS-1$
}
protected RequestProcessor getRequestProcessor() {
Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/servlet/RestFilter.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/servlet/RestFilter.java?rev=961830&r1=961829&r2=961830&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/servlet/RestFilter.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/servlet/RestFilter.java Thu Jul 8 16:12:52 2010
@@ -68,14 +68,14 @@ public class RestFilter implements Filte
public void setStatus(int statusCode) {
super.setStatus(statusCode);
this.statusCode = statusCode;
- logger.debug("FilteredHttpServletResponse set status code to {}", statusCode); //$NON-NLS-1$
+ logger.trace("FilteredHttpServletResponse set status code to {}", statusCode); //$NON-NLS-1$
}
@Override
public void setStatus(int statusCode, String msg) {
super.setStatus(statusCode, msg);
this.statusCode = statusCode;
- logger.debug("FilteredHttpServletResponse set status code to {}", statusCode); //$NON-NLS-1$
+ logger.trace("FilteredHttpServletResponse set status code to {}", statusCode); //$NON-NLS-1$
}
int getStatusCode() {
@@ -102,7 +102,7 @@ public class RestFilter implements Filte
* invoked
*/
logger
- .debug("Filter {} did not match a resource so letting request continue on FilterChain {}", //$NON-NLS-1$
+ .trace("Filter {} did not match a resource so letting request continue on FilterChain {}", //$NON-NLS-1$
this,
chain);
httpServletResponse.setStatus(HttpServletResponse.SC_OK);
@@ -110,7 +110,7 @@ public class RestFilter implements Filte
}
} else {
logger
- .debug("Filter {} did not expect a non-HttpServletRequest and/or non-HttpServletResponse but letting chain continue", this); //$NON-NLS-1$
+ .trace("Filter {} did not expect a non-HttpServletRequest and/or non-HttpServletResponse but letting chain continue", this); //$NON-NLS-1$
chain.doFilter(servletRequest, servletResponse);
}
}
@@ -138,7 +138,7 @@ public class RestFilter implements Filte
public void init(final FilterConfig filterConfig) throws ServletException {
restServlet = new RestServletForFilter(filterConfig);
- logger.debug("Initializing RestFilter {} with {} config and {} servlet", new Object[] { //$NON-NLS-1$
+ logger.trace("Initializing RestFilter {} with {} config and {} servlet", new Object[] { //$NON-NLS-1$
this, filterConfig, restServlet});
restServlet.init(new ServletConfig() {
@@ -161,7 +161,7 @@ public class RestFilter implements Filte
}
public void destroy() {
- logger.debug("Destroying RestFilter {}", this); //$NON-NLS-1$
+ logger.trace("Destroying RestFilter {}", this); //$NON-NLS-1$
restServlet.destroy();
}
}