public static Collection<GatewayReceiverMXBean> listGatewayReceivers(JMX jmx)
			throws Exception
			{

				DistributedSystemMXBean system = jmx.newBean(DistributedSystemMXBean.class, 
						new ObjectName("GemFire:service=System,type=Distributed"));
				
				ObjectName[] objectNames =  system.listGatewayReceiverObjectNames();
				
				if(objectNames == null)
					return null;
				
				GatewayReceiverMXBean gatewayReceiver = null;
				
				ArrayList<GatewayReceiverMXBean> list = new ArrayList<GatewayReceiverMXBean>(objectNames.length);
				
				for (ObjectName objectName : objectNames)
				{
					gatewayReceiver = jmx.newBean(GatewayReceiverMXBean.class, objectName);
					list.add(gatewayReceiver);
				}
				
				return list;
			}
public static Collection < GatewayReceiverMXBean > listGatewayReceivers ( JMX jmx ) throws Exception { DistributedSystemMXBean system = jmx . newBean ( DistributedSystemMXBean . class , new ObjectName ( "GemFire:service=System,type=Distributed" ) ) ; ObjectName [ ] objectNames = system . listGatewayReceiverObjectNames ( ) ; if ( objectNames == null ) return null ; GatewayReceiverMXBean gatewayReceiver = null ; ArrayList < GatewayReceiverMXBean > list = new ArrayList < GatewayReceiverMXBean > ( objectNames . length ) ; for ( ObjectName objectName : objectNames ) { gatewayReceiver = jmx . newBean ( GatewayReceiverMXBean . class , objectName ) ; list . add ( gatewayReceiver ) ; } return list ; }
--------------------------------------------------------