Package org.jgroups.conf
Class ProtocolConfiguration
java.lang.Object
org.jgroups.conf.ProtocolConfiguration
Parses and encapsulates the specification for 1 protocol of the protocol stack, e.g.
UNICAST(timeout=5000)-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProtocolConfiguration(String config_str) Creates a new ProtocolConfiguration.ProtocolConfiguration(String protocol_name, Map<String, String> properties) ProtocolConfiguration(String protocol_name, Map<String, String> properties, ClassLoader loader) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubtree(XmlNode node) protected static StringgetParameterString(String name, String value) protected static StringgetParameterStringXml(String name, String val) getProtocolString(boolean new_format) booleanisAssignableProtocol(Class<? extends Protocol> other, Class<?> loadingClass) Determines if the classotheris the same or superclass (or superinterface) as theProtocolconfigured by this instance.loadProtocolClass(Class<?> loadingClass) Load the class of theProtocolconfigured by this instance.protected voidparsePropertiesString(Map<String, String> properties) voidtoString()
-
Field Details
-
protocol_name
-
loader
-
properties_str
-
properties
-
subtrees
-
-
Constructor Details
-
ProtocolConfiguration
Creates a new ProtocolConfiguration.- Parameters:
config_str- The configuration specification for the protocol, e.g.VERIFY_SUSPECT(timeout=1500)
- Throws:
Exception
-
ProtocolConfiguration
-
ProtocolConfiguration
public ProtocolConfiguration(String protocol_name, Map<String, String> properties, ClassLoader loader)
-
-
Method Details
-
addSubtree
-
getSubtrees
-
getProtocolName
-
getClassLoader
-
getProperties
-
loadProtocolClass
Load the class of theProtocolconfigured by this instance.- Parameters:
loadingClass- TheClassto fetch the preferredClassLoader. It can be null.- Returns:
- The
Classof theProtocol. - Throws:
Exception- If unable to find or load the class.
-
isAssignableProtocol
public boolean isAssignableProtocol(Class<? extends Protocol> other, Class<?> loadingClass) throws Exception Determines if the classotheris the same or superclass (or superinterface) as theProtocolconfigured by this instance.- Parameters:
other- TheClassto check.loadingClass- TheClassto fetch the preferredClassLoader. It can be null.- Returns:
trueifotheris the same or superclass/interface as theProtocolconfigured by this instance.- Throws:
Exception- If unable to find or load the class.
-
substituteVariables
public void substituteVariables() -
toString
-
propertiesToString
-
getProtocolString
-
getProtocolString
-
getProtocolStringNewXml
-
getParameterString
-
getParameterStringXml
-
parsePropertiesString
- Throws:
Exception
-