org.glassfish.jersey.internal
Class ContextResolverFactory

java.lang.Object
  extended by org.glassfish.jersey.internal.ContextResolverFactory
All Implemented Interfaces:
ContextResolvers

public class ContextResolverFactory
extends Object
implements ContextResolvers

A factory implementation for managing ContextResolver instances.

Author:
Paul Sandoz, Marek Potociar (marek.potociar at oracle.com)

Nested Class Summary
static class ContextResolverFactory.Binder
          Injection binder defining ContextResolverFactory and ContextResolvers bindings.
 
Constructor Summary
ContextResolverFactory(org.glassfish.hk2.api.ServiceLocator locator)
          Create new context resolver factory backed by the supplied HK2 service locator.
 
Method Summary
<T> ContextResolver<T>
resolve(Type t, MediaType m)
          Get ContextResolver<T> instance for a given type and media type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextResolverFactory

@Inject
public ContextResolverFactory(org.glassfish.hk2.api.ServiceLocator locator)
Create new context resolver factory backed by the supplied HK2 service locator.

Parameters:
locator - HK2 service locator.
Method Detail

resolve

public <T> ContextResolver<T> resolve(Type t,
                                      MediaType m)
Description copied from interface: ContextResolvers
Get ContextResolver<T> instance for a given type and media type.

Specified by:
resolve in interface ContextResolvers
Type Parameters:
T - Java type produced by the context resolver.
Parameters:
t - type supported by the context resolver.
m - media type supported by the context resolver.
Returns:
proper context resolver instance if found, otherwise null.


Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.