Package com.volantis.shared.net.url.http

Examples of com.volantis.shared.net.url.http.CachedHttpContentStateBuilder.build()


                    seekableStream.reset();
                }
                responseInfo = new DefaultRepresentation(
                    method,
                    mimeType,
                    cacheBuilder.build(),
                    seekableStream);
            }
        } else {
            LOGGER.error("request-failed",
                new String[]{ url.toString(),
View Full Code Here


        builder.setMethodAccessor(accessor);

        Time t = Time.inMilliSeconds(System.currentTimeMillis());
        builder.setRequestTime(t);
        builder.setResponseTime(t);
        final CachedHttpContentState state = builder.build();

        // A mock Representation that adds a "default" timeout to local and
        // non-http image sources.
        return new Representation() {
View Full Code Here

            builder.setMethodAccessor(
                new HttpResponseHeaderAccessorWrapper(accessor));
            httpContent = new HTTPResponseAccessorWrapper(accessor);
            final int statusCode = accessor.getStatusCode();
            if (isStatusCodeCachable(statusCode)) {
                state = builder.build();
                if (state != null && state.isCacheable()) {
                    httpContent = new CachedHttpContent(httpContent, state, clock,
                        new CacheableDependency(key, state, clock,
                            cache, this));
                    cacheable = true;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.