geode-wan/src/test/java/org/apache/geode/management/internal/pulse/TestRemoteClusterDUnitTest.java
@SuppressWarnings("serial")
  protected void stopGatewaySender(final VM vm) {
    SerializableRunnable stopGatewaySender = new SerializableRunnable("Stop Gateway Sender") {
      public void run() {
        Cache cache = GemFireCacheImpl.getInstance();
        ManagementService service = ManagementService.getManagementService(cache);
        GatewaySenderMXBean bean = service.getLocalGatewaySenderMXBean("pn");
        assertNotNull(bean);
        bean.stop();
        assertFalse(bean.isRunning());
      }
    };
    vm.invoke(stopGatewaySender);
  }
/**
   * stops a gateway sender
   * 
   * @param vm reference to VM
   */
stops a gateway sender

@param vm reference to VM
stops a gateway sender @param vm reference to VM
@SuppressWarnings("serial")
  protected void stopGatewaySender(final VM vm) {
    SerializableRunnable stopGatewaySender = new SerializableRunnable("Stop Gateway Sender") {
      public void run() {
        Cache cache = GemFireCacheImpl.getInstance();
        ManagementService service = ManagementService.getManagementService(cache);
        GatewaySenderMXBean bean = service.getLocalGatewaySenderMXBean("pn");
        assertNotNull(bean);
        bean.stop();
        assertFalse(bean.isRunning());
      }
    };
    vm.invoke(stopGatewaySender);
  }
@ SuppressWarnings ( "serial" ) protected void stopGatewaySender ( final VM vm ) { SerializableRunnable stopGatewaySender = new SerializableRunnable ( "Stop Gateway Sender" ) { public void run ( ) { Cache cache = GemFireCacheImpl . getInstance ( ) ; ManagementService service = ManagementService . getManagementService ( cache ) ; GatewaySenderMXBean bean = service . getLocalGatewaySenderMXBean ( "pn" ) ; assertNotNull ( bean ) ; bean . stop ( ) ; assertFalse ( bean . isRunning ( ) ) ; } } ; vm . invoke ( stopGatewaySender ) ; }
stops a gateway sender
stops a gateway sender