/** * Advance the current parsing position while it is pointing at a * non-whitespace character, or until it moves past the end of the string. * Return the final value. */ public int skipText() { while ((index < length) && !isWhite(chars[index])) index++; return (index); }
public final MappingData obtainMappingData() { if (cachedMappingData == null) { cachedMappingData = new MappingData(); } return cachedMappingData; }
/** * Add a new Wrapper to an existing Context. * * @param hostName Virtual host name this wrapper belongs to * @param contextPath Context path this wrapper belongs to * @param path Wrapper mapping * @param wrapper Wrapper object */ public void addWrapper(String hostName, String contextPath, String path, Object wrapper) { addWrapper(hostName, contextPath, path, wrapper, false); }
/** * Remove a wrapper from the context associated with this wrapper. * * @param path Wrapper mapping */ public void removeWrapper(String path) { removeWrapper(context, path); }
/** * Instantiates the given EventListener class. * * @return the new EventListener instance */ protected EventListener createEventListenerInstance(String eventListenerClassname) throws Exception { return (EventListener) ClassLoaderUtil.load(eventListenerClassname); }
/** * * @return A {@link String} containing the HTTP response. */ public static String getErrorPage(String headerMessage, String message, String serverName) { return prepareBody(headerMessage, message, serverName); }
private AggrCompletionHandler obtainAggrCompletionHandler() { if (aggrCompletionHandler == null) { aggrCompletionHandler = new AggrCompletionHandler(); } return aggrCompletionHandler; }
/** * Construct a string parser that is initialized to parse the specified * string. * * @param string The string to be parsed */ public StringParser(String string) { super(); setString(string); }
public void addWrapper(String path, Object wrapper, boolean jspWildCard, String servletName, boolean isEmptyPathSpecial) { addWrapper(context, path, wrapper, jspWildCard, servletName, isEmptyPathSpecial); }
/** * Return the index of the next occurrence of a whitespace character, * or the index of the character after the last position of the string * if no more whitespace characters are found. The current parsing * position is updated to the returned value. */ public int findWhite() { while ((index < length) && !isWhite(chars[index])) index++; return (index); }
/** * Remove a wrapper from the context associated with this wrapper. * * @param path Wrapper mapping */ public void removeWrapper(String path) { removeWrapper(context, path); }
@Override public void mapPath(final HttpRequestPacket requestPacket, final DataChunk path, final MappingData mappingData) throws Exception { mapper.map(requestPacket, path, mappingData); }
/** * Instantiates the given EventListener class. * * @return the new EventListener instance */ protected EventListener createEventListenerInstance(String eventListenerClassname) throws Exception { return (EventListener) ClassLoaderUtil.load(eventListenerClassname); }
/** * * @return A {@link String} containing the HTTP response. */ public static String getErrorPage(String headerMessage, String message, String serverName) { return prepareBody(headerMessage, message, serverName); }
/** * Add a new Wrapper to an existing Context. * * @param hostName Virtual host name this wrapper belongs to * @param contextPath Context path this wrapper belongs to * @param path Wrapper mapping * @param wrapper Wrapper object */ public void addWrapper(String hostName, String contextPath, String path, Object wrapper) { addWrapper(hostName, contextPath, path, wrapper, false); }
/** * Advance the current parsing position while it is pointing at a * non-whitespace character, or until it moves past the end of the string. * Return the final value. */ public int skipText() { while ((index < length) && !isWhite(chars[index])) index++; return (index); }
/** * Add a new Wrapper to an existing Context. * * @param hostName Virtual host name this wrapper belongs to * @param contextPath Context path this wrapper belongs to * @param path Wrapper mapping * @param wrapper Wrapper object */ public void addWrapper(String hostName, String contextPath, String path, Object wrapper) { addWrapper(hostName, contextPath, path, wrapper, false); }
/** * Return the index of the next occurrence of a non-whitespace character, * or the index of the character after the last position of the string * if no more non-whitespace characters are found. The current * parsing position is updated to the returned value. */ public int findText() { while ((index < length) && isWhite(chars[index])) index++; return (index); }
/** * Return the index of the next occurrence of a whitespace character, * or the index of the character after the last position of the string * if no more whitespace characters are found. The current parsing * position is updated to the returned value. */ public int findWhite() { while ((index < length) && !isWhite(chars[index])) index++; return (index); }