public static MemberMXBean getMember ( String name , JMX jmx ) { try { String pattern = "GemFire:type=Member,member=" + name ; Set < ObjectName > objectNames = jmx . searchObjectNames ( pattern ) ; if ( objectNames == null || objectNames . isEmpty ( ) ) return null ; ObjectName serverName = new ObjectName ( pattern ) ; return jmx . newBean ( MemberMXBean . class , serverName ) ; } catch ( MalformedObjectNameException e ) { throw new RuntimeException ( "Unable to get member " + name + " ERROR:" + e . getMessage ( ) , e ) ; } }
Obtain a GemFire JMX client