Class ExtendedAccessLogValve.PatternTokenizer

  • Enclosing class:
    ExtendedAccessLogValve

    protected static class ExtendedAccessLogValve.PatternTokenizer
    extends java.lang.Object
    Tokenizer for parsing the log pattern string.
    • Constructor Summary

      Constructors 
      Constructor Description
      PatternTokenizer​(java.lang.String str)
      Creates a new tokenizer for the given pattern string.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getParameter()
      Returns the parameter value from the most recent parameter token.
      java.lang.String getRemains()
      Returns the remaining unparsed portion of the pattern string.
      java.lang.String getToken()
      Returns the next token from the pattern string.
      java.lang.String getWhiteSpaces()
      Returns any whitespace following the current position.
      boolean hasParameter()
      Returns whether the last token was followed by a parameter indicator.
      boolean hasSubToken()
      Returns whether the last token was followed by a sub-token indicator.
      boolean isEnded()
      Returns whether the tokenizer has reached the end of the pattern string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PatternTokenizer

        public PatternTokenizer​(java.lang.String str)
        Creates a new tokenizer for the given pattern string.
        Parameters:
        str - the pattern string to tokenize
    • Method Detail

      • hasSubToken

        public boolean hasSubToken()
        Returns whether the last token was followed by a sub-token indicator.
        Returns:
        true if the last token had a sub-token
      • hasParameter

        public boolean hasParameter()
        Returns whether the last token was followed by a parameter indicator.
        Returns:
        true if the last token had a parameter
      • getToken

        public java.lang.String getToken()
                                  throws java.io.IOException
        Returns the next token from the pattern string.
        Returns:
        the next token, or null if no more tokens are available
        Throws:
        java.io.IOException - if an I/O error occurs
      • getParameter

        public java.lang.String getParameter()
                                      throws java.io.IOException
        Returns the parameter value from the most recent parameter token.
        Returns:
        the parameter value, or null if no parameter is available
        Throws:
        java.io.IOException - if an I/O error occurs
      • getWhiteSpaces

        public java.lang.String getWhiteSpaces()
                                        throws java.io.IOException
        Returns any whitespace following the current position.
        Returns:
        the whitespace characters, or an empty string if none
        Throws:
        java.io.IOException - if an I/O error occurs
      • isEnded

        public boolean isEnded()
        Returns whether the tokenizer has reached the end of the pattern string.
        Returns:
        true if the end has been reached
      • getRemains

        public java.lang.String getRemains()
                                    throws java.io.IOException
        Returns the remaining unparsed portion of the pattern string.
        Returns:
        the remaining characters in the pattern
        Throws:
        java.io.IOException - if an I/O error occurs