X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Fbeans%2FEventLogRecord.java;h=cfdda9172b0b4f79978fb052c1560a42f6f95891;hb=5906de2465975e42e4983abe411f30fa16050fdf;hp=b8a3aa53823f6c6b22b600be821687afa4d04a43;hpb=8cbe8a88bc6dfe8673a33a017fe6a5a3e7ce86c3;p=dmaap%2Fdatarouter.git diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/EventLogRecord.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/EventLogRecord.java index b8a3aa53..cfdda917 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/EventLogRecord.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/EventLogRecord.java @@ -32,10 +32,10 @@ import org.onap.dmaap.datarouter.provisioning.BaseServlet; /** * This class is used to log provisioning server events. Each event consists of a who - * (who made the provisioning request including the IP address, the X-ATT-DR-ON-BEHALF-OF + * (who made the provisioning request including the IP address, the X-DMAAP-DR-ON-BEHALF-OF * header value, and the client certificate), a what (what request was made; the method * and servlet involved), and a how (how the request was handled; the result code and - * message returned to the client). EventLogRecords are logged using log4j at the INFO level. + * message returned to the client). * * @author Robert Eby * @version $Id: EventLogRecord.java,v 1.1 2013/04/26 21:00:25 eby Exp $ @@ -49,12 +49,16 @@ public class EventLogRecord { private int result; // How private String message; + /** + * EventLogRecord constructor. + * @param request HTTP Request + */ public EventLogRecord(HttpServletRequest request) { // Who is making the request this.ipaddr = request.getRemoteAddr(); - String s = request.getHeader(BaseServlet.BEHALF_HEADER); - this.behalfof = (s != null) ? s : ""; - X509Certificate certs[] = (X509Certificate[]) request.getAttribute(BaseServlet.CERT_ATTRIBUTE); + String str = request.getHeader(BaseServlet.BEHALF_HEADER); + this.behalfof = (str != null) ? str : ""; + X509Certificate [] certs = (X509Certificate[]) request.getAttribute(BaseServlet.CERT_ATTRIBUTE); this.clientSubject = (certs != null && certs.length > 0) ? certs[0].getSubjectX500Principal().getName() : "";