Class XmlConfigurator
java.lang.Object
org.jgroups.conf.XmlConfigurator
- All Implemented Interfaces:
ProtocolStackConfigurator, ProtocolHook
Uses XML to configure a protocol stack
- Author:
- Vladimir Blagojevic, Bela Ban
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleanfind(char starting_ch, String s, InputStream in, StringBuilder sb, boolean drop) static XmlConfiguratorgetInstance(InputStream stream) getProtocolStackString(boolean convert) protected static XmlConfigurator.ElementTypeprotected static booleanisCommentEnd(InputStream in, StringBuilder sb, boolean drop) protected static booleanisCommentStart(InputStream in, StringBuilder sb, boolean drop) Searches for a sequence of '!--'static voidprotected static XmlConfiguratorparse(InputStream stream) protected static XmlConfiguratorstatic List<ProtocolConfiguration> parseProtocols(XmlNode root) static XmlNodeReads XML and returns a simple tree of XmlNodesprotected static StringreadNode(InputStream in) protected static StringReads the characters between a start and end quote (").protected static StringFixes errors like "/ >" with "/>"Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ProtocolStackConfigurator
afterCreation
-
Field Details
-
log
-
-
Constructor Details
-
XmlConfigurator
-
-
Method Details
-
getInstance
- Throws:
IOException
-
getProtocolStackString
- Parameters:
convert- If false: print old plain output, else print new XML format- Returns:
- String with protocol stack in specified format
-
getProtocolStackString
- Specified by:
getProtocolStackStringin interfaceProtocolStackConfigurator
-
getProtocolStack
- Specified by:
getProtocolStackin interfaceProtocolStackConfigurator
-
parse
- Throws:
IOException
-
parse
- Throws:
Exception
-
parseProtocols
- Throws:
Exception
-
parseXmlDocument
Reads XML and returns a simple tree of XmlNodes- Throws:
IOException
-
readNode
- Throws:
IOException
-
isCommentStart
protected static boolean isCommentStart(InputStream in, StringBuilder sb, boolean drop) throws IOException Searches for a sequence of '!--'- Throws:
IOException
-
isCommentEnd
protected static boolean isCommentEnd(InputStream in, StringBuilder sb, boolean drop) throws IOException - Throws:
IOException
-
find
protected static boolean find(char starting_ch, String s, InputStream in, StringBuilder sb, boolean drop) throws IOException - Throws:
IOException
-
sanitize
-
readAttribute
- Throws:
IOException
-
readQuotedString
Reads the characters between a start and end quote ("). Skips chars escaped with '\'- Throws:
IOException
-
getType
-
main
-