Class VOMSESLineParser
- java.lang.Object
-
- org.italiangrid.voms.request.impl.VOMSESLineParser
-
public class VOMSESLineParser extends java.lang.ObjectA parser for VOMSES lines. The VOMSES line format is as follows:"alias" "hostname" "port" "server DN" "vo_name"
This parser eats up whitespace and characters outside of quotes and tolerates an additional quoted field ("globus_version") that was for some time needed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static interfaceVOMSESLineParser.ParserState
-
Field Summary
Fields Modifier and Type Field Description private VOMSESLineParser.ParserStatecurrentStateprivate java.lang.StringBuildercurrentToken(package private) static intGLOBUS_VERSIONprivate VOMSESLineParser.ParserStateinsideQuotes(package private) static intMIN_VOMSES_FIELD_COUNTprivate VOMSESLineParser.ParserStateoutsideQuotesprivate booleantokenCompleteprivate inttokenCountprivate java.lang.String[]tokens(package private) static intVO_ALIAS(package private) static intVO_NAME(package private) static intVOMS_HOST(package private) static intVOMS_PORT(package private) static intVOMS_SERVER_DN(package private) static java.lang.String[]VOMSES_FIELD_NAMES
-
Constructor Summary
Constructors Constructor Description VOMSESLineParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidinit()private voidlineSanityChecks(java.lang.String line)VOMSServerInfoparse(java.lang.String line)voidtokenChar(char c)voidtokenEnd()voidtokenStart()private voidvalidateTokens(java.lang.String line)
-
-
-
Field Detail
-
outsideQuotes
private final VOMSESLineParser.ParserState outsideQuotes
-
insideQuotes
private final VOMSESLineParser.ParserState insideQuotes
-
VOMSES_FIELD_NAMES
static final java.lang.String[] VOMSES_FIELD_NAMES
-
VO_ALIAS
static final int VO_ALIAS
- See Also:
- Constant Field Values
-
VOMS_HOST
static final int VOMS_HOST
- See Also:
- Constant Field Values
-
VOMS_PORT
static final int VOMS_PORT
- See Also:
- Constant Field Values
-
VOMS_SERVER_DN
static final int VOMS_SERVER_DN
- See Also:
- Constant Field Values
-
VO_NAME
static final int VO_NAME
- See Also:
- Constant Field Values
-
GLOBUS_VERSION
static final int GLOBUS_VERSION
- See Also:
- Constant Field Values
-
MIN_VOMSES_FIELD_COUNT
static final int MIN_VOMSES_FIELD_COUNT
- See Also:
- Constant Field Values
-
tokens
private java.lang.String[] tokens
-
currentToken
private java.lang.StringBuilder currentToken
-
tokenCount
private int tokenCount
-
tokenComplete
private boolean tokenComplete
-
currentState
private VOMSESLineParser.ParserState currentState
-
-
Method Detail
-
lineSanityChecks
private void lineSanityChecks(java.lang.String line)
-
init
private void init()
-
parse
public VOMSServerInfo parse(java.lang.String line)
-
validateTokens
private void validateTokens(java.lang.String line)
-
tokenStart
public void tokenStart()
-
tokenEnd
public void tokenEnd()
-
tokenChar
public void tokenChar(char c)
-
-