if (obj instanceof ResponseFilter)
appProviders.addResponseFilter((ResponseFilter)obj);
}
else if (clazz.getAnnotation(Path.class) != null)
{
AbstractResourceDescriptor descriptor = new ApplicationResource(applicationId, obj);
descriptor.accept(rdv);
resources.addResource(new SingletonObjectFactory<AbstractResourceDescriptor>(descriptor, obj));
}
else
{
LOG.warn("Unknown class type: " + clazz.getName() + " found in " + applicationId);
}
}
}
Set<Class<?>> classes = app.getClasses();
if (classes != null && classes.size() > 0)
{
for (Class clazz : classes)
{
if (clazz.getAnnotation(Provider.class) != null)
{
if (ContextResolver.class.isAssignableFrom(clazz))
appProviders.addContextResolver(clazz);
if (ExceptionMapper.class.isAssignableFrom(clazz))
appProviders.addExceptionMapper(clazz);
if (MessageBodyReader.class.isAssignableFrom(clazz))
appProviders.addMessageBodyReader(clazz);
if (MessageBodyWriter.class.isAssignableFrom(clazz))
appProviders.addMessageBodyWriter(clazz);
}
else if (clazz.getAnnotation(Filter.class) != null)
{
if (MethodInvokerFilter.class.isAssignableFrom(clazz))
appProviders.addMethodInvokerFilter(clazz);
if (RequestFilter.class.isAssignableFrom(clazz))
appProviders.addRequestFilter(clazz);
if (ResponseFilter.class.isAssignableFrom(clazz))
appProviders.addResponseFilter(clazz);
}
else if (clazz.getAnnotation(Path.class) != null)
{
AbstractResourceDescriptor descriptor = new ApplicationResource(applicationId, clazz);
descriptor.accept(rdv);
resources.addResource(new PerRequestObjectFactory<AbstractResourceDescriptor>(descriptor));
}
else
{
LOG.warn("Unknown class type: " + clazz.getName() + " found in: " + applicationId);