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

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