Package com.volantis.shared.time

Examples of com.volantis.shared.time.Time.inMillis()


                    if (lastModified != null) {
                        final String lastModifiedAsString;
                        // SimpleDateFormat is not thread safe
                        synchronized (RFC1123) {
                            lastModifiedAsString = RFC1123.format(
                                new Date(lastModified.inMillis()));
                        }
                        final Header header =
                            new HeaderImpl(HeaderNames.IF_MODIFIED_SINCE_HEADER);
                        header.setValue(lastModifiedAsString);
                        executor.addRequestHeader(header);
View Full Code Here


                        // SimpleDateFormat is not thread safe so create a
                        // new instance
                        DateFormat RFC1123 = DateFormats.RFC_1123_GMT.create();

                        lastModifiedAsString = RFC1123.format(
                            new Date(lastModified.inMillis()));

                        method.setRequestHeader(HEADER_IF_MODIFIED_SINCE,
                            lastModifiedAsString);
                    }
View Full Code Here

            cachingDirectives.getExpires() != null) {
            // if enabled, set Expires, Cache-Control/max-age and Vary response
            // headers
            final Time expires = cachingDirectives.getExpires();
            if (expires != Time.NEVER) {
                response.addDateHeader("Expires", expires.inMillis());
                // compute max-age value
                final Period timeToLive = cachingDirectives.getTimeToLive();
                long maxAgeInSeconds = 0;
                if (timeToLive != null) {
                    maxAgeInSeconds =
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.