Author: heiko.braun(a)jboss.com
Date: 2007-11-20 06:34:38 -0500 (Tue, 20 Nov 2007)
New Revision: 5070
Added:
stack/native/branches/rest/src/main/java/org/jboss/rs/model/StatefulResourceResolver.java
Removed:
stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceResolver.java
Modified:
stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java
stack/native/branches/rest/src/main/java/org/jboss/rs/media/ContentNegotiation.java
stack/native/branches/rest/src/main/java/org/jboss/rs/media/DefaultContentNegotiation.java
stack/native/branches/rest/src/test/java/org/jboss/test/rs/invocation/InvocationBuilderTestCase.java
stack/native/branches/rest/src/test/java/org/jboss/test/rs/model/ResolverTestCase.java
Log:
Renamed to StatefulResourceResolver
Modified:
stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java
===================================================================
---
stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java 2007-11-20
11:30:56 UTC (rev 5069)
+++
stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java 2007-11-20
11:34:38 UTC (rev 5070)
@@ -27,7 +27,7 @@
import org.jboss.rs.ResourceRegistryFactory;
import org.jboss.rs.model.ResourceMethod;
import org.jboss.rs.model.ResourceModel;
-import org.jboss.rs.model.ResourceResolver;
+import org.jboss.rs.model.StatefulResourceResolver;
import org.jboss.rs.model.ResourceLocator;
import org.jboss.rs.runtime.*;
@@ -96,7 +96,7 @@
parseAcceptHeader(req, rt);
// locate the resource to be invoked
- ResourceResolver resolver = ResourceResolver.newInstance(rt);
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(rt);
ResourceMethod resourceMethod = resolver.resolve();
// evaluate locator stack
Modified:
stack/native/branches/rest/src/main/java/org/jboss/rs/media/ContentNegotiation.java
===================================================================
---
stack/native/branches/rest/src/main/java/org/jboss/rs/media/ContentNegotiation.java 2007-11-20
11:30:56 UTC (rev 5069)
+++
stack/native/branches/rest/src/main/java/org/jboss/rs/media/ContentNegotiation.java 2007-11-20
11:34:38 UTC (rev 5070)
@@ -30,7 +30,7 @@
/**
* Matches available resource methods against the runtime context.<br>
- * Since this is likely to change it can be plugged into the {@link
org.jboss.rs.model.ResourceResolver}.
+ * Since this is likely to change it can be plugged into the {@link
org.jboss.rs.model.StatefulResourceResolver}.
*
* @author Heiko.Braun(a)jboss.com
* @version $Revision$
Modified:
stack/native/branches/rest/src/main/java/org/jboss/rs/media/DefaultContentNegotiation.java
===================================================================
---
stack/native/branches/rest/src/main/java/org/jboss/rs/media/DefaultContentNegotiation.java 2007-11-20
11:30:56 UTC (rev 5069)
+++
stack/native/branches/rest/src/main/java/org/jboss/rs/media/DefaultContentNegotiation.java 2007-11-20
11:34:38 UTC (rev 5070)
@@ -47,7 +47,7 @@
* <li>HTTP 406
* </ol>
*
- * @see org.jboss.rs.model.ResourceResolver
+ * @see org.jboss.rs.model.StatefulResourceResolver
*
* @author Heiko.Braun(a)jboss.com
* @version $Revision$
Deleted:
stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceResolver.java
===================================================================
---
stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceResolver.java 2007-11-20
11:30:56 UTC (rev 5069)
+++
stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceResolver.java 2007-11-20
11:34:38 UTC (rev 5070)
@@ -1,240 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.rs.model;
-
-import org.jboss.rs.media.ContentNegotiation;
-import org.jboss.rs.media.DefaultContentNegotiation;
-import org.jboss.rs.runtime.RuntimeContext;
-
-import java.util.*;
-
-/**
- * Resolves resource methods from {@link
org.jboss.rs.runtime.RuntimeContext#getPath()}.<br>
- * Once a set a of resource methods is identified, the resolver
- * delegates to a {@link org.jboss.rs.media.ContentNegotiation} plugin
- * to do a more fine grained media type matching.
- *
- * @author Heiko.Braun(a)jboss.com
- * @version $Revision$
- */
-public class ResourceResolver
-{
- // the runtime context
- private RuntimeContext context;
-
- // pluggable content negotitation
- private ContentNegotiation connegPlugin;
-
- private Stack<ResourceLocator> visitedLocator = new
Stack<ResourceLocator>();
-
- private Map<ResourceLocator, String> locatorWorkingPath = new
HashMap<ResourceLocator, String>();
-
- private String methodWorkingPath;
-
- /**
- * Provides a resolver with the default content negotitation.
- *
- * @param context the runtime context
- * @return a configured resource resolver instance
- */
- public static ResourceResolver newInstance(RuntimeContext context)
- {
- assert context!=null;
- ResourceResolver resourceResolver = new ResourceResolver(context);
- resourceResolver.connegPlugin = new DefaultContentNegotiation();
- return resourceResolver;
- }
-
- private ResourceResolver(RuntimeContext context)
- {
- this.context = context;
- }
-
- public ResourceMethod resolve()
- throws NoResourceException, NoMethodException
- {
- ResourceMethod resourceMethod = null;
-
- // Filter the set of resource classes by rejecting those whose
- // regular expression does not match uri
- List<ResourceMatch> includedResources = new
ArrayList<ResourceMatch>();
- Iterator<ResourceModel> it1 = context.getRootResources().iterator();
- while(it1.hasNext())
- {
- ResourceModel model = it1.next();
- RegexQualifier qualifier = model.resolve(context.getPath());
- if(qualifier!=null)
- includedResources.add( new ResourceMatch(model, qualifier) );
- }
-
- if(includedResources.isEmpty())
- throw new NoResourceException("No resource matches URI
'"+context.getPath()+"'");
-
- Collections.sort(includedResources);
-
- // DFS by locator, should result in a resource match
- Iterator<ResourceMatch> it2 = includedResources.iterator();
- while(it2.hasNext() && null==resourceMethod)
- {
- ResourceMatch rootResource = it2.next();
- resourceMethod = dfsResourceMatch(rootResource);
- }
-
- if(null == resourceMethod)
- throw new NoMethodException("No method matches URI
'"+context.getPath());
-
- // gotcha
- return resourceMethod;
- }
-
- /**
- * Recursive scan for resource methods.
- * Inspect a resource match for methods and if it fails try the locators.
- *
- * @param dfsEntry
- * @return
- */
- private ResourceMethod dfsResourceMatch(ResourceMatch dfsEntry)
- throws NoMethodException, NoResourceException
- {
- ResourceMethod resourceMethod = null;
- String nextUriToken = dfsEntry.qualifier.nextUriToken;
-
- // resource and subresource methods first
- resourceMethod = resolveResourceMethod(dfsEntry, nextUriToken);
-
- // root didn't match, so recurse locators to find a resource
- if(resourceMethod!=null)
- {
- methodWorkingPath = nextUriToken;
- }
- else
- {
- ResourceMatch<ResourceModel> subResource = resolveByLocator(dfsEntry);
- if(subResource!=null)
- resourceMethod = dfsResourceMatch(subResource);
- }
-
- return resourceMethod;
- }
-
- private ResourceMatch<ResourceModel>
resolveByLocator(ResourceMatch<ResourceModel> resourceMatch)
- throws NoResourceException
- {
- ResourceMatch<ResourceModel> match = null;
-
- List<ResourceMatch<ResourceModel>> weightedResults = new
ArrayList<ResourceMatch<ResourceModel>>();
- Iterator<ResourceLocator> locators =
resourceMatch.model.getResourceLocator().iterator();
- while(locators.hasNext())
- {
- ResourceLocator bridge = locators.next();
- RegexQualifier qualifier =
bridge.resolve(resourceMatch.qualifier.nextUriToken);
- if(qualifier!=null)
- weightedResults.add( new ResourceMatch<ResourceModel>( bridge.field(),
qualifier) );
- }
-
- if(!weightedResults.isEmpty())
- {
- Collections.sort(weightedResults);
- match = weightedResults.get(0);
- }
-
- // TODO: cleanup locator matching after sort
- for(ResourceLocator loc : resourceMatch.model.getResourceLocator())
- {
- if(match.model == loc.field())
- {
- visitedLocator.add(0, loc);
- locatorWorkingPath.put(loc, resourceMatch.qualifier.nextUriToken);
- }
- }
-
- return match;
- }
-
- private ResourceMethod resolveResourceMethod(ResourceMatch<ResourceModel>
methodTarget, String uriToken)
- throws NoMethodException
- {
- ResourceMethod match = null;
- List<ResourceMatch<ResourceMethod>> matches = new
ArrayList<ResourceMatch<ResourceMethod>>();
-
- if("".equals(uriToken) || "/".equals(uriToken)) // resources
methods
- {
- // use any available resource method for further mathing by mimetype, etc
- for(ResourceMethod resourceMethod : methodTarget.model.getResourceMethods())
- {
- matches.add(
- new ResourceMatch<ResourceMethod>(resourceMethod,
RegexQualifier.NONE)
- );
- }
- }
- else // subresource methods
- {
- List<ResourceMethod> methods =
methodTarget.model.getSubResourceMethods();
- Iterator<ResourceMethod> it = methods.iterator();
- while(it.hasNext())
- {
- ResourceMethod method = it.next();
- RegexQualifier qualifier = method.resolve(uriToken);
- if(qualifier!=null && ("".equals(qualifier.nextUriToken) ||
"/".equals(qualifier.nextUriToken)))
- {
- matches.add(
- new ResourceMatch<ResourceMethod>(method, qualifier)
- );
- }
- }
- }
-
- if(!matches.isEmpty())
- {
- Collections.sort(matches);
- match = contentNegotiation(matches);
- }
-
- return match;
- }
-
- private ResourceMethod
contentNegotiation(List<ResourceMatch<ResourceMethod>> matches)
- throws NoMethodException
- {
- assert connegPlugin !=null;
-
- // delegate to conneg plugin
- return connegPlugin.match(context, matches);
- }
-
- public Stack<ResourceLocator> getVisitedLocator() {
- return visitedLocator;
- }
-
- public String getLocatorWorkingPath(ResourceLocator loc)
- {
- assert locatorWorkingPath.containsKey(loc);
- return locatorWorkingPath.get(loc);
- }
-
- public String getMethodWorkingPath()
- {
- assert methodWorkingPath!=null;
- return methodWorkingPath;
- }
-}
Copied:
stack/native/branches/rest/src/main/java/org/jboss/rs/model/StatefulResourceResolver.java
(from rev 5069,
stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceResolver.java)
===================================================================
---
stack/native/branches/rest/src/main/java/org/jboss/rs/model/StatefulResourceResolver.java
(rev 0)
+++
stack/native/branches/rest/src/main/java/org/jboss/rs/model/StatefulResourceResolver.java 2007-11-20
11:34:38 UTC (rev 5070)
@@ -0,0 +1,240 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.rs.model;
+
+import org.jboss.rs.media.ContentNegotiation;
+import org.jboss.rs.media.DefaultContentNegotiation;
+import org.jboss.rs.runtime.RuntimeContext;
+
+import java.util.*;
+
+/**
+ * Resolves resource methods from {@link
org.jboss.rs.runtime.RuntimeContext#getPath()}.<br>
+ * Once a set a of resource methods is identified, the resolver
+ * delegates to a {@link org.jboss.rs.media.ContentNegotiation} plugin
+ * to do a more fine grained media type matching.
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class StatefulResourceResolver
+{
+ // the runtime context
+ private RuntimeContext context;
+
+ // pluggable content negotitation
+ private ContentNegotiation connegPlugin;
+
+ private Stack<ResourceLocator> visitedLocator = new
Stack<ResourceLocator>();
+
+ private Map<ResourceLocator, String> locatorWorkingPath = new
HashMap<ResourceLocator, String>();
+
+ private String methodWorkingPath;
+
+ /**
+ * Provides a resolver with the default content negotitation.
+ *
+ * @param context the runtime context
+ * @return a configured resource resolver instance
+ */
+ public static StatefulResourceResolver newInstance(RuntimeContext context)
+ {
+ assert context!=null;
+ StatefulResourceResolver resourceResolver = new StatefulResourceResolver(context);
+ resourceResolver.connegPlugin = new DefaultContentNegotiation();
+ return resourceResolver;
+ }
+
+ private StatefulResourceResolver(RuntimeContext context)
+ {
+ this.context = context;
+ }
+
+ public ResourceMethod resolve()
+ throws NoResourceException, NoMethodException
+ {
+ ResourceMethod resourceMethod = null;
+
+ // Filter the set of resource classes by rejecting those whose
+ // regular expression does not match uri
+ List<ResourceMatch> includedResources = new
ArrayList<ResourceMatch>();
+ Iterator<ResourceModel> it1 = context.getRootResources().iterator();
+ while(it1.hasNext())
+ {
+ ResourceModel model = it1.next();
+ RegexQualifier qualifier = model.resolve(context.getPath());
+ if(qualifier!=null)
+ includedResources.add( new ResourceMatch(model, qualifier) );
+ }
+
+ if(includedResources.isEmpty())
+ throw new NoResourceException("No resource matches URI
'"+context.getPath()+"'");
+
+ Collections.sort(includedResources);
+
+ // DFS by locator, should result in a resource match
+ Iterator<ResourceMatch> it2 = includedResources.iterator();
+ while(it2.hasNext() && null==resourceMethod)
+ {
+ ResourceMatch rootResource = it2.next();
+ resourceMethod = dfsResourceMatch(rootResource);
+ }
+
+ if(null == resourceMethod)
+ throw new NoMethodException("No method matches URI
'"+context.getPath());
+
+ // gotcha
+ return resourceMethod;
+ }
+
+ /**
+ * Recursive scan for resource methods.
+ * Inspect a resource match for methods and if it fails try the locators.
+ *
+ * @param dfsEntry
+ * @return
+ */
+ private ResourceMethod dfsResourceMatch(ResourceMatch dfsEntry)
+ throws NoMethodException, NoResourceException
+ {
+ ResourceMethod resourceMethod = null;
+ String nextUriToken = dfsEntry.qualifier.nextUriToken;
+
+ // resource and subresource methods first
+ resourceMethod = resolveResourceMethod(dfsEntry, nextUriToken);
+
+ // root didn't match, so recurse locators to find a resource
+ if(resourceMethod!=null)
+ {
+ methodWorkingPath = nextUriToken;
+ }
+ else
+ {
+ ResourceMatch<ResourceModel> subResource = resolveByLocator(dfsEntry);
+ if(subResource!=null)
+ resourceMethod = dfsResourceMatch(subResource);
+ }
+
+ return resourceMethod;
+ }
+
+ private ResourceMatch<ResourceModel>
resolveByLocator(ResourceMatch<ResourceModel> resourceMatch)
+ throws NoResourceException
+ {
+ ResourceMatch<ResourceModel> match = null;
+
+ List<ResourceMatch<ResourceModel>> weightedResults = new
ArrayList<ResourceMatch<ResourceModel>>();
+ Iterator<ResourceLocator> locators =
resourceMatch.model.getResourceLocator().iterator();
+ while(locators.hasNext())
+ {
+ ResourceLocator bridge = locators.next();
+ RegexQualifier qualifier =
bridge.resolve(resourceMatch.qualifier.nextUriToken);
+ if(qualifier!=null)
+ weightedResults.add( new ResourceMatch<ResourceModel>( bridge.field(),
qualifier) );
+ }
+
+ if(!weightedResults.isEmpty())
+ {
+ Collections.sort(weightedResults);
+ match = weightedResults.get(0);
+ }
+
+ // TODO: cleanup locator matching after sort
+ for(ResourceLocator loc : resourceMatch.model.getResourceLocator())
+ {
+ if(match.model == loc.field())
+ {
+ visitedLocator.add(0, loc);
+ locatorWorkingPath.put(loc, resourceMatch.qualifier.nextUriToken);
+ }
+ }
+
+ return match;
+ }
+
+ private ResourceMethod resolveResourceMethod(ResourceMatch<ResourceModel>
methodTarget, String uriToken)
+ throws NoMethodException
+ {
+ ResourceMethod match = null;
+ List<ResourceMatch<ResourceMethod>> matches = new
ArrayList<ResourceMatch<ResourceMethod>>();
+
+ if("".equals(uriToken) || "/".equals(uriToken)) // resources
methods
+ {
+ // use any available resource method for further mathing by mimetype, etc
+ for(ResourceMethod resourceMethod : methodTarget.model.getResourceMethods())
+ {
+ matches.add(
+ new ResourceMatch<ResourceMethod>(resourceMethod,
RegexQualifier.NONE)
+ );
+ }
+ }
+ else // subresource methods
+ {
+ List<ResourceMethod> methods =
methodTarget.model.getSubResourceMethods();
+ Iterator<ResourceMethod> it = methods.iterator();
+ while(it.hasNext())
+ {
+ ResourceMethod method = it.next();
+ RegexQualifier qualifier = method.resolve(uriToken);
+ if(qualifier!=null && ("".equals(qualifier.nextUriToken) ||
"/".equals(qualifier.nextUriToken)))
+ {
+ matches.add(
+ new ResourceMatch<ResourceMethod>(method, qualifier)
+ );
+ }
+ }
+ }
+
+ if(!matches.isEmpty())
+ {
+ Collections.sort(matches);
+ match = contentNegotiation(matches);
+ }
+
+ return match;
+ }
+
+ private ResourceMethod
contentNegotiation(List<ResourceMatch<ResourceMethod>> matches)
+ throws NoMethodException
+ {
+ assert connegPlugin !=null;
+
+ // delegate to conneg plugin
+ return connegPlugin.match(context, matches);
+ }
+
+ public Stack<ResourceLocator> getVisitedLocator() {
+ return visitedLocator;
+ }
+
+ public String getLocatorWorkingPath(ResourceLocator loc)
+ {
+ assert locatorWorkingPath.containsKey(loc);
+ return locatorWorkingPath.get(loc);
+ }
+
+ public String getMethodWorkingPath()
+ {
+ assert methodWorkingPath!=null;
+ return methodWorkingPath;
+ }
+}
Property changes on:
stack/native/branches/rest/src/main/java/org/jboss/rs/model/StatefulResourceResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
stack/native/branches/rest/src/test/java/org/jboss/test/rs/invocation/InvocationBuilderTestCase.java
===================================================================
---
stack/native/branches/rest/src/test/java/org/jboss/test/rs/invocation/InvocationBuilderTestCase.java 2007-11-20
11:30:56 UTC (rev 5069)
+++
stack/native/branches/rest/src/test/java/org/jboss/test/rs/invocation/InvocationBuilderTestCase.java 2007-11-20
11:34:38 UTC (rev 5070)
@@ -54,7 +54,7 @@
{
URI uri = new URI("/rest/widgets/Foo/spec/Bar");
RuntimeContext context = defaultRuntimeContext(MethodHTTP.GET, uri);
- ResourceResolver resolver = ResourceResolver.newInstance(context);
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(context);
ResourceMethod method = resolver.resolve();
@@ -103,7 +103,7 @@
URI uri = new URI("/rest/widgets/special");
RuntimeContext context = defaultRuntimeContext(MethodHTTP.POST, uri);
context.parseContentTypeHeader("text/xml");
- ResourceResolver resolver = ResourceResolver.newInstance(context);
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(context);
ResourceMethod method = resolver.resolve();
context.setWorkingPath(resolver.getMethodWorkingPath());
Modified:
stack/native/branches/rest/src/test/java/org/jboss/test/rs/model/ResolverTestCase.java
===================================================================
---
stack/native/branches/rest/src/test/java/org/jboss/test/rs/model/ResolverTestCase.java 2007-11-20
11:30:56 UTC (rev 5069)
+++
stack/native/branches/rest/src/test/java/org/jboss/test/rs/model/ResolverTestCase.java 2007-11-20
11:34:38 UTC (rev 5070)
@@ -27,7 +27,7 @@
import org.jboss.rs.runtime.RuntimeContext;
import org.jboss.rs.model.ResourceModel;
import org.jboss.rs.model.ResourceModelParser;
-import org.jboss.rs.model.ResourceResolver;
+import org.jboss.rs.model.StatefulResourceResolver;
import org.jboss.rs.model.ResourceMethod;
import org.jboss.test.rs.WidgetList;
@@ -57,7 +57,7 @@
{
URI uri = new URI("/rest/widgets/Id/spec");
RuntimeContext context = defaultRuntimeContext(MethodHTTP.GET, uri);
- ResourceResolver resolver = ResourceResolver.newInstance(context);
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(context);
ResourceMethod method = resolver.resolve();
assertNotNull(method);
@@ -70,7 +70,7 @@
RuntimeContext context = defaultRuntimeContext(MethodHTTP.POST, uri);
context.parseContentTypeHeader("text/xml");
- ResourceResolver resolver = ResourceResolver.newInstance(context);
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(context);
ResourceMethod method = resolver.resolve();
@@ -82,7 +82,7 @@
{
URI uri = new URI("/rest/widgets/offers");
RuntimeContext context = defaultRuntimeContext(MethodHTTP.GET, uri);
- ResourceResolver resolver = ResourceResolver.newInstance(context);
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(context);
ResourceMethod method = resolver.resolve();
@@ -94,7 +94,7 @@
{
URI uri = new URI("/rest/widgets/Id/spec/SpecName");
RuntimeContext context = defaultRuntimeContext(MethodHTTP.GET, uri);
- ResourceResolver resolver = ResourceResolver.newInstance(context);
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(context);
ResourceMethod method = resolver.resolve();
@@ -108,7 +108,7 @@
RuntimeContext context = defaultRuntimeContext(MethodHTTP.GET, uri);
context.parseAcceptHeader("text/plain");
- ResourceResolver resolver = ResourceResolver.newInstance(context);
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(context);
ResourceMethod method = resolver.resolve();
assertNotNull(method);