gedi-geode-extensions-core/src/main/java/gedi/solutions/geode/client/GemFireJmxClient.java
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);
		}
		
	}
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);
		}
		
	}
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
@param name the JMX client name
@param jmx the JMX connection
@return JMX member object
Obtain a GemFire JMX client