Package org.jgroups.conf
Class XmlConfigurator
java.lang.Object
org.jgroups.conf.XmlConfigurator
- All Implemented Interfaces:
ProtocolStackConfigurator,ProtocolHook
Uses XML to configure a protocol stack
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<ProtocolConfiguration> protected static final Log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Stringdump(Collection<ProtocolConfiguration> configs) protected static booleanfind(char starting_ch, String s, InputStream in, StringBuilder sb, boolean drop) private static InputStreamgetAsInputStreamFromClassLoader(String filename) static XmlConfiguratorgetInstance(InputStream stream) getProtocolStackString(boolean convert) protected static XmlConfigurator.ElementType(package private) static voidhelp()protected 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 Stringprivate static StringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jgroups.conf.ProtocolStackConfigurator
afterCreation
-
Field Details
-
configuration
-
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
-
getAsInputStreamFromClassLoader
-
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
- Throws:
Exception
-
dump
-
trim
-
help
static void help()
-