private void addMBeanAttributeToSampler ( MBeanSampler mBeanSampler , String mBeanName , MBeanAttribute mBeanAttribute ) throws Exception { if ( mBeanAttribute . getSampler ( ) == null ) { mBeanAttribute . setSampler ( mBeanSampler ) ; } mBeanSampler . addMBeanAttribute ( mBeanName , mBeanAttribute ) ; }
Adds a MBeanAttribute to an MBeanSampler . This also checks if the MBeanAttribute to be added already has a MBeanSampler set if not it will set it .