Package org.apache.activemq.broker.util

Examples of org.apache.activemq.broker.util.AuditLogEntry


    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        if (audit && request instanceof HttpServletRequest) {

            HttpServletRequest http = (HttpServletRequest)request;
            AuditLogEntry entry = new HttpAuditLogEntry();
            if (http.getRemoteUser() != null) {
                entry.setUser(http.getRemoteUser());
            }
            entry.setTimestamp(System.currentTimeMillis());
            entry.setOperation(http.getRequestURI());
            entry.setRemoteAddr(http.getRemoteAddr());
            entry.getParameters().put("params", http.getParameterMap());
            auditLog.log(entry);
        }
        chain.doFilter(request, response);
    }
View Full Code Here


                for (Principal principal : subject.getPrincipals()) {
                    caller += principal.getName() + " ";
                }
            }

            AuditLogEntry entry = new JMXAuditLogEntry();
            entry.setUser(caller);
            entry.setTimestamp(System.currentTimeMillis());
            entry.setOperation(this.getMBeanInfo().getClassName() + "." + s);
            entry.getParameters().put("arguments", objects);

            auditLog.log(entry);
        }
        return super.invoke(s, objects, strings);
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.broker.util.AuditLogEntry

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.