public int compare(ProviderInfo<?> p1, ProviderInfo<?> p2) { return compare(getFilterPriority(p1, providerCls), getFilterPriority(p2, providerCls)); }
public boolean isWriteable(Class<?> type, Type gType, Annotation[] anns, MediaType mt) { if (delegatingWriters != null) { return getDelegatingWriter(type, gType, anns, mt) != null; } return isProviderKeyNotSet(); }
public void writeTo(JAXBElement<?> obj, Class<?> cls, Type genericType, Annotation[] anns, MediaType m, MultivaluedMap<String, Object> headers, OutputStream os) throws IOException { super.writeTo(obj, cls, genericType, anns, m, headers, os); } }
public static void releaseRequestState(Message message) { releaseRequestState(ServerProviderFactory.getInstance(message), message); } public static void releaseRequestState(ServerProviderFactory factory, Message message) {
public boolean isReadable(Class<?> type, Type gType, Annotation[] anns, MediaType mt) { if (delegatingReaders != null) { return getDelegatingReader(type, gType, anns, mt) != null; } return isProviderKeyNotSet(); }
private void sortReaders() { if (!customComparatorAvailable(MessageBodyReader.class)) { messageReaders.sort(new MessageBodyReaderComparator()); } else { doCustomSort(messageReaders); } } private <T> void sortWriters() {
protected void addAttachmentUnmarshaller(Unmarshaller um) { Collection<Attachment> attachments = getAttachments(false); if (attachments != null) { um.setAttachmentUnmarshaller(new JAXBAttachmentUnmarshaller( attachments)); } }
public void initProviders(List<ClassResourceInfo> cris) { Set<Object> set = getReadersWriters(); for (Object o : set) { Object provider = ((ProviderInfo<?>)o).getProvider(); if (provider instanceof AbstractConfigurableProvider) { ((AbstractConfigurableProvider)provider).init(cris); } } }
public ProviderInfoClassComparator(Class<?> expectedCls) { this.comp = new ClassComparator(expectedCls); this.defaultComp = true; } public ProviderInfoClassComparator(Comparator<Object> comp) {
protected void validateMap(MultivaluedMap<String, String> params) { if (validator != null) { validator.validate(params); } }
private Object doRead(Class<?> cls, XMLStreamReader input) { try { return read(cls); } catch (Exception ex) { return null; } }
public JAXBElement readFrom(Class<JAXBElement> type, Type genericType, Annotation[] anns, MediaType mt, MultivaluedMap<String, String> headers, InputStream is) throws IOException { return super.readFrom(type, genericType, anns, mt, headers, is); } public void writeTo(JAXBElement<?> obj, Class<?> cls, Type genericType, Annotation[] anns,
protected void setXmlPiProperty(Marshaller ms, String value) throws Exception { if (xmlPiPropertyName != null) { setMarshallerProp(ms, value, xmlPiPropertyName, null); } else { setMarshallerProp(ms, value, XML_PI_PROPERTY_RI, XML_PI_PROPERTY_RI_INT); } }
@Override public Configurable register(Class<?> providerClass, int bindingPriority) { return doRegister(createProvider(providerClass), bindingPriority, FILTER_INTERCEPTOR_CLASSES); }
@SuppressWarnings("unchecked") public <T> DataWriter<T> createWriter(final Class<T> cls) { return (DataWriter<T>)new MessageBodyDataWriter(); }
protected Unmarshaller createUnmarshaller(Class<?> cls, Type genericType) throws JAXBException { return createUnmarshaller(cls, genericType, false); }
private ServerProviderFactory(Bus bus) { super(bus); wadlGenerator = createWadlGenerator(bus); }
protected ProviderFactory(Bus bus) { this.bus = bus; providerCache = initCache(bus); }
public NameKeyMap(boolean ascending) { super(new NameKeyComparator(ascending)); } }
public boolean isReadable(Class<?> type, Type gType, Annotation[] anns, MediaType mt) { if (delegatingReaders != null) { return getDelegatingReader(type, gType, anns, mt) != null; } else { return isProviderKeyNotSet(); } }