Package com.lissenberg.blog.domain

Examples of com.lissenberg.blog.domain.RequestInfo


    public Statistics getStatistics(Long blogId) {
        ExternalContext ctx = getCurrentInstance().getExternalContext();
        String userAgent = ctx.getRequestHeaderMap().get(USER_AGENT);
        String referer = ctx.getRequestHeaderMap().get(REFERER);
        RequestInfo request = new RequestInfo(blogId, referer, userAgent);
        return statsService.updateStatistics(blogId, request);
    }
View Full Code Here


        for (int i = 0; i < 500; i++) {
            if (i % 20 == 0) {
                // add a pause to guarantee we can test ordering by visit
                Thread.sleep(10);
            }
            RequestInfo req = new RequestInfo(1L, "refererer_" + i, "user-agent_" + i);
            entityManager.persist(req);
        }
        entityTransaction.commit();

        List<RequestInfo> results = statsService.getRequestInfoForPost(1L);
View Full Code Here

TOP

Related Classes of com.lissenberg.blog.domain.RequestInfo

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.