@Test public void testGetServiceID() { }
public String getServiceID() { String regex = "\\d+/\\d+\\.\\d+\\.\\d+\\.\\d+/[\\w-]+"; Pattern service = Pattern.compile(regex); Matcher serviceMatcher = service.matcher(getMessage()); if(serviceMatcher.find()) { return serviceMatcher.group(); } return null; }
SimpleLogMessage implements LogMessage { public String getServiceID() { String regex = "\\d+/\\d+\\.\\d+\\.\\d+\\.\\d+/[\\w-]+"; Pattern service = Pattern.compile(regex); Matcher serviceMatcher = service.matcher(getMessage()); if(serviceMatcher.find()) { return serviceMatcher.group(); } return null; } }
SimpleLogMessage implements LogMessage { public String getServiceID() { String regex = "\\d+/\\d+\\.\\d+\\.\\d+\\.\\d+/[\\w-]+"; Pattern service = Pattern.compile(regex); Matcher serviceMatcher = service.matcher(getMessage()); if(serviceMatcher.find()) { return serviceMatcher.group(); } return null; } private  SimpleLogMessage(String logMessage); }
SimpleLogMessage implements LogMessage { public String getServiceID() { String regex = "\\d+/\\d+\\.\\d+\\.\\d+\\.\\d+/[\\w-]+"; Pattern service = Pattern.compile(regex); Matcher serviceMatcher = service.matcher(getMessage()); if(serviceMatcher.find()) { return serviceMatcher.group(); } return null; } private  SimpleLogMessage(String logMessage); static LogMessage create(String logMessage); String getMessage(); boolean isEndMessage(); @Override String toString(); boolean isPersistMessage(); boolean isPersistBeginMessage(); boolean isPersistEndMessage(); boolean isBeginMessage(); boolean isErrorMessage(); boolean isCollectorBeginMessage(); boolean isCollectorEndMessage(); Date getDate(); String getServiceID(); String getThread(); }
SimpleLogMessage implements LogMessage { public String getServiceID() { String regex = "\\d+/\\d+\\.\\d+\\.\\d+\\.\\d+/[\\w-]+"; Pattern service = Pattern.compile(regex); Matcher serviceMatcher = service.matcher(getMessage()); if(serviceMatcher.find()) { return serviceMatcher.group(); } return null; } private  SimpleLogMessage(String logMessage); static LogMessage create(String logMessage); String getMessage(); boolean isEndMessage(); @Override String toString(); boolean isPersistMessage(); boolean isPersistBeginMessage(); boolean isPersistEndMessage(); boolean isBeginMessage(); boolean isErrorMessage(); boolean isCollectorBeginMessage(); boolean isCollectorEndMessage(); Date getDate(); String getServiceID(); String getThread();  }