Constructors Summary |
---|
public MBeanNamingInfo(MBeanNamingDescriptor descr, String type, String[] params)
// i18n StringManager
// private static StringManager localStrings =
// StringManager.getManager( MBeanNamingInfo.class );
/*int category, */
this(/*category,*/ descr, type, params, true);
|
public MBeanNamingInfo(MBeanNamingDescriptor descr, String type, String[] params, boolean bTestParamSize)
m_descr = descr;
if(m_descr==null) {
String msg = /*localStrings.getString*/( "admin.server.core.mbean.config.naming.mbeannamingdescriptor_not_found_for_type" + type );
throw new MBeanNamingException( msg );
}
if(bTestParamSize)
{
int parmSize = (params==null)?0:params.length;
if(m_descr.getParmListSize()>parmSize) {
String msg = /*localStrings.getString*/( "admin.server.core.mbean.config.naming.wrong_parameters_array_size"+ type );
throw new MBeanNamingException( msg );
}
}
m_ids = new String[m_descr.getParmListSize()];
for(int i=0; i<m_ids.length; i++)
m_ids[i] = params[i];
|
public MBeanNamingInfo(MBeanNamingDescriptor descr, String dottedName)
m_descr = descr; //MBeansNaming.findNamingDescriptor(dottedName);
if(m_descr==null) {
String msg = /*localStrings.getString*/( "admin.server.core.mbean.config.naming.mbeannamingdescriptor_not_found_for_dotted_name"+dottedName );
throw new MBeanNamingException( msg );
}
m_ids = m_descr.extractParmList(dottedName);
|
public MBeanNamingInfo(MBeanNamingDescriptor descr, ObjectName objectName)
m_descr = descr; //MBeansNaming.findNamingDescriptor(objectName);
if(m_descr==null) {
String msg = /*localStrings.getString*/( "admin.server.core.mbean.config.naming.mbeannamingdescriptor_not_found_for_object_name"+ objectName );
throw new MBeanNamingException( msg );
}
m_ids = m_descr.extractParmList(objectName);
|
Methods Summary |
---|
private java.lang.String | escapeString(java.lang.String str, java.lang.String idPrefix)
if(str == null)
return null;
if(idPrefix==null)
return str.replace('.", '`").replaceAll("`","\\\\.");
else
return idPrefix+str.replace('.", '`").replaceAll("`","\\\\.");
|
private java.lang.String[] | escapeStrings(java.lang.String[] arr, java.lang.String idPrefix)
if(arr == null)
return null;
String[] ret = new String[arr.length];
for(int i=0; i<arr.length; i++)
{
ret[i] = escapeString(arr[i], idPrefix);
}
return ret;
|
public java.lang.String[] | getDottedNames()
return getDottedNames(null);
|
public java.lang.String[] | getDottedNames(java.lang.String idPrefix)
return m_descr.createDottedNames(escapeStrings(m_ids, idPrefix));
|
public java.lang.String[] | getLocationParams()
return m_ids;
|
public int | getMode()
return m_descr.getMode();
|
public javax.management.ObjectName | getObjectName()
return m_descr.createObjectName(m_ids);
|
public java.lang.String | getServerInstanceName()
if(m_ids==null || m_ids.length==0)
{
String msg = /*localStrings.getString*/( "admin.server.core.mbean.config.naming.wrong_parameters_array_size"+ m_descr.getType() );
throw new MBeanNamingException( msg );
}
return m_ids[0];
|
public java.lang.String | getType()
return m_descr.getType();
|
public java.lang.String | getXPath()
return m_descr.createXPath(m_ids);
|
public boolean | isModeConfig()
int mode = m_descr.getMode();
return ((mode&MBeansNaming.MODE_CONFIG)!=0);
|
public boolean | isModeMonitorable()
int mode = m_descr.getMode();
return ((mode&MBeansNaming.MODE_MONITOR)!=0);
|