com.atlassian.seraph.util
Class ServerInformationParser

java.lang.Object
  extended by com.atlassian.seraph.util.ServerInformationParser

public class ServerInformationParser
extends Object

Parses ServletContext.getServerInfo() into separate pieces.

Since:
2.4.0

Nested Class Summary
static class ServerInformationParser.ServerInformation
          Holder for easily accessible information about a server.
 
Constructor Summary
ServerInformationParser()
           
 
Method Summary
static ServerInformationParser.ServerInformation parse(String serverInformationText)
          Given a String in the expected format, returns parsed server information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerInformationParser

public ServerInformationParser()
Method Detail

parse

public static ServerInformationParser.ServerInformation parse(String serverInformationText)
Given a String in the expected format, returns parsed server information. The textual server information must be in the format of "ServerName/ServerVersion (OtherInformation)". For example, Apache Tomcat 6.0.20 would be formatted as "Apache Tomcat/6.0.20". The "other information" part is optional. http://download.oracle.com/javaee/6/api/javax/servlet/ServletContext.html#getServerInfo%28%29

Parameters:
serverInformationText - the textual version of the server information
Returns:


Copyright © 2013 Atlassian. All Rights Reserved.