|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jgroups.conf.ClassConfigurator
public class ClassConfigurator
This class will be replaced with the class that read info
from the magic number configurator that reads info from the xml file.
The name and the relative path of the magic number map file can be specified
as value of the property org.jgroups.conf.magicNumberFile.
It must be relative to one of the classpath elements, to allow the
classloader to locate the file. If a value is not specified,
MagicNumberReader.MAGIC_NUMBER_FILE is used, which defaults
to "jg-magic-map.xml".
MagicNumberReader| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
|---|---|
ClassConfigurator()
|
|
| Method Summary | |
|---|---|
static void |
add(short magic,
java.lang.Class clazz)
Method to register a user-defined header with jg-magic-map at runtime |
static java.lang.Class |
get(short magic)
Returns a class for a magic number. |
static java.lang.Class |
get(java.lang.String clazzname)
Loads and returns the class from the class name |
static short |
getMagicNumber(java.lang.Class clazz)
Returns the magic number for the class. |
protected static void |
init()
|
static java.lang.String |
printClassMap()
|
static java.lang.String |
printMagicMap()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public ClassConfigurator()
| Method Detail |
|---|
protected static void init()
throws ChannelException
ChannelException
public static void add(short magic,
java.lang.Class clazz)
throws java.lang.IllegalArgumentException
magic - The magic number. Needs to be > 1024clazz - The class. Usually a subclass of Header
java.lang.IllegalArgumentException - If the magic number is already taken, or the magic number is <= 1024public static java.lang.Class get(short magic)
magic - the magic number that maps to the class
public static java.lang.Class get(java.lang.String clazzname)
clazzname - a fully classified class name to be loaded
public static short getMagicNumber(java.lang.Class clazz)
clazz - a class object that we want the magic number for
public java.lang.String toString()
toString in class java.lang.Objectpublic static java.lang.String printMagicMap()
public static java.lang.String printClassMap()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||