public abstract class ProviderFactory extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
ProviderFactory.AbstractPriorityComparator |
protected static class |
ProviderFactory.BindingPriorityComparator |
static class |
ProviderFactory.ClassComparator |
protected static class |
ProviderFactory.NameKey |
protected static class |
ProviderFactory.NameKeyComparator |
protected static class |
ProviderFactory.NameKeyMap<T> |
static class |
ProviderFactory.ProviderInfoClassComparator |
Modifier and Type | Field and Description |
---|---|
static String |
ACTIVE_JAXRS_PROVIDER_KEY |
protected static String |
CLIENT_FACTORY_NAME |
static String |
DEFAULT_FILTER_NAME_BINDING |
protected static String |
IGNORE_TYPE_VARIABLES |
static String |
PROVIDER_SELECTION_PROPERTY_CHANGED |
protected Map<ProviderFactory.NameKey,ProviderInfo<javax.ws.rs.ext.ReaderInterceptor>> |
readerInterceptors |
protected static String |
SERVER_FACTORY_NAME |
protected Map<ProviderFactory.NameKey,ProviderInfo<javax.ws.rs.ext.WriterInterceptor>> |
writerInterceptors |
Modifier | Constructor and Description |
---|---|
protected |
ProviderFactory(Bus bus) |
Modifier and Type | Method and Description |
---|---|
protected void |
addProviderToList(List<?> list,
ProviderInfo<?> provider) |
void |
clearProviders() |
void |
clearThreadLocalProxies() |
protected static int |
compareClasses(Class<?> expectedCls,
Object o1,
Object o2) |
protected static int |
compareClasses(Object o1,
Object o2) |
protected static int |
compareCustomStatus(ProviderInfo<?> p1,
ProviderInfo<?> p2) |
<T> ContextProvider<T> |
createContextProvider(Type contextType,
Message m) |
<T> javax.ws.rs.ext.ContextResolver<T> |
createContextResolver(Type contextType,
Message m) |
<T> javax.ws.rs.ext.ContextResolver<T> |
createContextResolver(Type contextType,
Message m,
javax.ws.rs.core.MediaType type) |
<T> javax.ws.rs.ext.MessageBodyReader<T> |
createMessageBodyReader(Class<T> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
Message m) |
<T> List<javax.ws.rs.ext.ReaderInterceptor> |
createMessageBodyReaderInterceptor(Class<T> bodyType,
Type parameterType,
Annotation[] parameterAnnotations,
javax.ws.rs.core.MediaType mediaType,
Message m,
boolean checkMbrNow,
Set<String> names) |
<T> javax.ws.rs.ext.MessageBodyWriter<T> |
createMessageBodyWriter(Class<T> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
Message m) |
<T> List<javax.ws.rs.ext.WriterInterceptor> |
createMessageBodyWriterInterceptor(Class<T> bodyType,
Type parameterType,
Annotation[] parameterAnnotations,
javax.ws.rs.core.MediaType mediaType,
Message m,
Set<String> names) |
<T> javax.ws.rs.ext.ParamConverter<T> |
createParameterHandler(Class<T> paramType,
Type genericType,
Annotation[] anns,
Message m) |
protected static Object |
createProvider(String className,
Bus bus) |
static ProviderInfo<? extends Object> |
createProviderFromConstructor(Constructor<?> c,
Map<Class<?>,Object> values,
Bus theBus,
boolean checkContexts,
boolean custom) |
protected static boolean |
filterContractSupported(ProviderInfo<?> provider,
Class<?> providerCls,
Class<?> contract) |
protected static <T> List<ProviderInfo<T>> |
getBoundFilters(Map<ProviderFactory.NameKey,ProviderInfo<T>> boundFilters,
Set<String> names) |
Bus |
getBus() |
abstract javax.ws.rs.core.Configuration |
getConfiguration(Message message) |
List<ProviderInfo<javax.ws.rs.ext.ContextResolver<?>>> |
getContextResolvers() |
javax.ws.rs.ext.MessageBodyWriter<?> |
getDefaultJaxbWriter() |
protected static Set<String> |
getFilterNameBindings(Bus bus,
Object provider) |
protected static Set<String> |
getFilterNameBindings(ProviderInfo<?> p) |
protected static int |
getFilterPriority(ProviderInfo<?> p,
Class<?> providerCls) |
static ProviderFactory |
getInstance(Message m) |
protected <T> boolean |
handleMapper(ProviderInfo<T> em,
Class<?> expectedType,
Message m,
Class<?> providerClass,
boolean injectContext) |
protected <T> boolean |
handleMapper(ProviderInfo<T> em,
Class<?> expectedType,
Message m,
Class<?> providerClass,
Class<?> commonBaseClass,
boolean injectContext) |
protected static ProviderCache |
initCache(Bus theBus) |
protected static void |
initFactory(ProviderFactory factory) |
void |
initProviders(List<ClassResourceInfo> cris) |
protected void |
injectContextProxies(Collection<?>... providerLists) |
protected void |
injectContextProxiesIntoProvider(ProviderInfo<?> pi) |
protected void |
injectContextValues(ProviderInfo<?> pi,
Message m) |
boolean |
isParamConverterContextsAvailable() |
protected static <T> void |
mapInterceptorFilters(Map<ProviderFactory.NameKey,ProviderInfo<T>> map,
List<ProviderInfo<T>> filters,
Class<?> providerCls,
boolean ascending) |
protected List<ProviderInfo<? extends Object>> |
prepareProviders(boolean custom,
boolean busGlobal,
Object[] providers,
ProviderInfo<javax.ws.rs.core.Application> application) |
void |
registerUserProvider(Object provider) |
void |
setBus(Bus bus) |
protected void |
setBusProviders() |
protected void |
setCommonProviders(List<ProviderInfo<? extends Object>> theProviders) |
void |
setProviderComparator(Comparator<?> providerComparator) |
protected abstract void |
setProviders(boolean custom,
boolean busGlobal,
Object... providers) |
void |
setSchemaLocations(List<String> schemas) |
void |
setUserProviders(List<?> userProviders)
Use for injection of entityProviders
|
public static final String DEFAULT_FILTER_NAME_BINDING
public static final String PROVIDER_SELECTION_PROPERTY_CHANGED
public static final String ACTIVE_JAXRS_PROVIDER_KEY
protected static final String SERVER_FACTORY_NAME
protected static final String CLIENT_FACTORY_NAME
protected static final String IGNORE_TYPE_VARIABLES
protected Map<ProviderFactory.NameKey,ProviderInfo<javax.ws.rs.ext.ReaderInterceptor>> readerInterceptors
protected Map<ProviderFactory.NameKey,ProviderInfo<javax.ws.rs.ext.WriterInterceptor>> writerInterceptors
protected ProviderFactory(Bus bus)
public Bus getBus()
protected static ProviderCache initCache(Bus theBus)
protected static void initFactory(ProviderFactory factory)
public abstract javax.ws.rs.core.Configuration getConfiguration(Message message)
public <T> javax.ws.rs.ext.ContextResolver<T> createContextResolver(Type contextType, Message m)
public <T> javax.ws.rs.ext.ContextResolver<T> createContextResolver(Type contextType, Message m, javax.ws.rs.core.MediaType type)
public <T> ContextProvider<T> createContextProvider(Type contextType, Message m)
public <T> javax.ws.rs.ext.ParamConverter<T> createParameterHandler(Class<T> paramType, Type genericType, Annotation[] anns, Message m)
protected <T> boolean handleMapper(ProviderInfo<T> em, Class<?> expectedType, Message m, Class<?> providerClass, boolean injectContext)
protected <T> boolean handleMapper(ProviderInfo<T> em, Class<?> expectedType, Message m, Class<?> providerClass, Class<?> commonBaseClass, boolean injectContext)
public <T> List<javax.ws.rs.ext.ReaderInterceptor> createMessageBodyReaderInterceptor(Class<T> bodyType, Type parameterType, Annotation[] parameterAnnotations, javax.ws.rs.core.MediaType mediaType, Message m, boolean checkMbrNow, Set<String> names)
public <T> List<javax.ws.rs.ext.WriterInterceptor> createMessageBodyWriterInterceptor(Class<T> bodyType, Type parameterType, Annotation[] parameterAnnotations, javax.ws.rs.core.MediaType mediaType, Message m, Set<String> names)
public <T> javax.ws.rs.ext.MessageBodyReader<T> createMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, Message m)
public <T> javax.ws.rs.ext.MessageBodyWriter<T> createMessageBodyWriter(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, Message m)
protected void setBusProviders()
protected abstract void setProviders(boolean custom, boolean busGlobal, Object... providers)
protected void setCommonProviders(List<ProviderInfo<? extends Object>> theProviders)
public boolean isParamConverterContextsAvailable()
protected void injectContextValues(ProviderInfo<?> pi, Message m)
protected void addProviderToList(List<?> list, ProviderInfo<?> provider)
protected void injectContextProxies(Collection<?>... providerLists)
protected void injectContextProxiesIntoProvider(ProviderInfo<?> pi)
public List<ProviderInfo<javax.ws.rs.ext.ContextResolver<?>>> getContextResolvers()
public void registerUserProvider(Object provider)
public void setUserProviders(List<?> userProviders)
userProviders
- the userProviders to setprotected static int compareCustomStatus(ProviderInfo<?> p1, ProviderInfo<?> p2)
public void clearThreadLocalProxies()
public void clearProviders()
public void setBus(Bus bus)
protected static <T> List<ProviderInfo<T>> getBoundFilters(Map<ProviderFactory.NameKey,ProviderInfo<T>> boundFilters, Set<String> names)
public void initProviders(List<ClassResourceInfo> cris)
public static ProviderFactory getInstance(Message m)
public static ProviderInfo<? extends Object> createProviderFromConstructor(Constructor<?> c, Map<Class<?>,Object> values, Bus theBus, boolean checkContexts, boolean custom)
protected static <T> void mapInterceptorFilters(Map<ProviderFactory.NameKey,ProviderInfo<T>> map, List<ProviderInfo<T>> filters, Class<?> providerCls, boolean ascending)
protected static Set<String> getFilterNameBindings(ProviderInfo<?> p)
protected static int getFilterPriority(ProviderInfo<?> p, Class<?> providerCls)
protected static boolean filterContractSupported(ProviderInfo<?> provider, Class<?> providerCls, Class<?> contract)
protected List<ProviderInfo<? extends Object>> prepareProviders(boolean custom, boolean busGlobal, Object[] providers, ProviderInfo<javax.ws.rs.core.Application> application)
public javax.ws.rs.ext.MessageBodyWriter<?> getDefaultJaxbWriter()
public void setProviderComparator(Comparator<?> providerComparator)
Apache CXF