Reorganize methods in MBeanExporter
This commit is contained in:
parent
7c7fa69558
commit
676daa990b
|
|
@ -223,24 +223,6 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo
|
||||||
this.autodetectMode = (autodetect ? AUTODETECT_ALL : AUTODETECT_NONE);
|
this.autodetectMode = (autodetect ? AUTODETECT_ALL : AUTODETECT_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the autodetection mode to use.
|
|
||||||
* @throws IllegalArgumentException if the supplied value is not
|
|
||||||
* one of the {@code AUTODETECT_} constants
|
|
||||||
* @see #setAutodetectModeName(String)
|
|
||||||
* @see #getAutodetectMode()
|
|
||||||
* @see #AUTODETECT_ALL
|
|
||||||
* @see #AUTODETECT_ASSEMBLER
|
|
||||||
* @see #AUTODETECT_MBEAN
|
|
||||||
* @see #AUTODETECT_NONE
|
|
||||||
*/
|
|
||||||
public void setAutodetectMode(int autodetectMode) {
|
|
||||||
if (!constants.getValues(CONSTANT_PREFIX_AUTODETECT).contains(autodetectMode)) {
|
|
||||||
throw new IllegalArgumentException("Only values of autodetect constants allowed");
|
|
||||||
}
|
|
||||||
this.autodetectMode = autodetectMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the autodetection mode to use by name.
|
* Set the autodetection mode to use by name.
|
||||||
* @throws IllegalArgumentException if the supplied value is not resolvable
|
* @throws IllegalArgumentException if the supplied value is not resolvable
|
||||||
|
|
@ -259,6 +241,24 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo
|
||||||
this.autodetectMode = (Integer) constants.asNumber(constantName);
|
this.autodetectMode = (Integer) constants.asNumber(constantName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the autodetection mode to use.
|
||||||
|
* @throws IllegalArgumentException if the supplied value is not
|
||||||
|
* one of the {@code AUTODETECT_} constants
|
||||||
|
* @see #setAutodetectModeName(String)
|
||||||
|
* @see #getAutodetectMode()
|
||||||
|
* @see #AUTODETECT_ALL
|
||||||
|
* @see #AUTODETECT_ASSEMBLER
|
||||||
|
* @see #AUTODETECT_MBEAN
|
||||||
|
* @see #AUTODETECT_NONE
|
||||||
|
*/
|
||||||
|
public void setAutodetectMode(int autodetectMode) {
|
||||||
|
if (!constants.getValues(CONSTANT_PREFIX_AUTODETECT).contains(autodetectMode)) {
|
||||||
|
throw new IllegalArgumentException("Only values of autodetect constants allowed");
|
||||||
|
}
|
||||||
|
this.autodetectMode = autodetectMode;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the autodetect mode to use for this {@code MBeanExporter}.
|
* Get the autodetect mode to use for this {@code MBeanExporter}.
|
||||||
* @return the configured autodetect mode, or {@code null} if not explicitly
|
* @return the configured autodetect mode, or {@code null} if not explicitly
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue