Class VOMSESLineParser
- java.lang.Object
-
- org.italiangrid.voms.request.impl.VOMSESLineParser
-
public class VOMSESLineParser extends java.lang.Object
A 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 interface
VOMSESLineParser.ParserState
-
Field Summary
Fields Modifier and Type Field Description private VOMSESLineParser.ParserState
currentState
private java.lang.StringBuilder
currentToken
(package private) static int
GLOBUS_VERSION
private VOMSESLineParser.ParserState
insideQuotes
(package private) static int
MIN_VOMSES_FIELD_COUNT
private VOMSESLineParser.ParserState
outsideQuotes
private boolean
tokenComplete
private int
tokenCount
private java.lang.String[]
tokens
(package private) static int
VO_ALIAS
(package private) static int
VO_NAME
(package private) static int
VOMS_HOST
(package private) static int
VOMS_PORT
(package private) static int
VOMS_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 void
init()
private void
lineSanityChecks(java.lang.String line)
VOMSServerInfo
parse(java.lang.String line)
void
tokenChar(char c)
void
tokenEnd()
void
tokenStart()
private void
validateTokens(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)
-
-