Package javax.ws.rs.ext

Examples of javax.ws.rs.ext.RuntimeDelegate


    }

    private static List<String> iterableToList(final Iterable<?> values) {
        final LinkedList<String> linkedList = new LinkedList<String>();

        final RuntimeDelegate rd = RuntimeDelegate.getInstance();
        for (Object element : values) {
            linkedList.add(HeadersFactory.asString(element, rd));
        }

        return linkedList;
View Full Code Here


    public static List<String> asStringList(final List<Object> headerValues, final RuntimeDelegate rd) {
        if (headerValues == null || headerValues.isEmpty()) {
            return Collections.emptyList();
        }

        final RuntimeDelegate delegate;
        if (rd == null) {
            delegate = RuntimeDelegate.getInstance();
        } else {
            delegate = rd;
        }
View Full Code Here

    public static MultivaluedMap<String, String> asStringHeaders(final MultivaluedMap<String, Object> headers) {
        if (headers == null) {
            return null;
        }

        final RuntimeDelegate rd = RuntimeDelegate.getInstance();
        return new AbstractMultivaluedMap<String, String>(
                Maps.transformValues(headers, new Function<List<Object>, List<String>>() {
                    @Override
                    public List<String> apply(List<Object> input) {
                        return HeadersFactory.asStringList(input, rd);
View Full Code Here

        if (values == null || values.size() == 0) {
            return Collections.unmodifiableList(new ArrayList<MediaType>(MediaTypes.GENERAL_ACCEPT_MEDIA_TYPE_LIST));
        }
        final List<MediaType> result = new ArrayList<MediaType>(values.size());
        final RuntimeDelegate rd = RuntimeDelegate.getInstance();
        boolean conversionApplied = false;
        for (final Object value : values) {
            if (value instanceof MediaType) {
                result.add((MediaType) value);
            } else {
View Full Code Here

        if (values == null || values.size() == 0) {
            return Collections.singletonList(new AcceptableLanguageTag("*", null).getAsLocale());
        }

        final List<Locale> result = new ArrayList<Locale>(values.size());
        final RuntimeDelegate rd = RuntimeDelegate.getInstance();
        boolean conversionApplied = false;
        for (final Object value : values) {
            if (value instanceof Locale) {
                result.add((Locale) value);
            } else {
View Full Code Here

        if (values == null || values.isEmpty()) {
            return Collections.emptySet();
        }

        final Set<Link> result = new HashSet<Link>(values.size());
        final RuntimeDelegate rd = RuntimeDelegate.getInstance();
        boolean conversionApplied = false;
        for (final Object value : values) {
            if (value instanceof Link) {
                result.add((Link) value);
            } else {
View Full Code Here

TOP

Related Classes of javax.ws.rs.ext.RuntimeDelegate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.