@Override
  public GatewaySender create(String id) {
    attrs.setId(id);
    GatewaySender sender = null;

    if (attrs.getDispatcherThreads() <= 0) {
      throw new AsyncEventQueueConfigurationException(
          String.format("AsyncEventQueue %s can not be created with dispatcher threads less than 1",
              id));
    }

    if (attrs.isParallel()) {
      if ((attrs.getOrderPolicy() != null)
          && attrs.getOrderPolicy().equals(OrderPolicy.THREAD)) {
        throw new AsyncEventQueueConfigurationException(
            String.format(
                "AsyncEventQueue %s can not be created with OrderPolicy %s when it is set parallel",
                id, attrs.getOrderPolicy()));
      }

      if (cache instanceof GemFireCacheImpl) {
        sender = new ParallelGatewaySenderImpl(cache, statisticsClock, attrs);
        cache.addGatewaySender(sender);
        if (!attrs.isManualStart()) {
          sender.start();
        }
      } else if (cache instanceof CacheCreation) {
        sender = new ParallelGatewaySenderCreation(cache, attrs);
        cache.addGatewaySender(sender);
      }
    } else {
      if (attrs.getOrderPolicy() == null && attrs.getDispatcherThreads() > 1) {
        attrs.setOrderPolicy(GatewaySender.DEFAULT_ORDER_POLICY);
      }
      if (cache instanceof GemFireCacheImpl) {
        sender = new SerialGatewaySenderImpl(cache, statisticsClock, attrs);
        cache.addGatewaySender(sender);
        if (!attrs.isManualStart()) {
          sender.start();
        }
      } else if (cache instanceof CacheCreation) {
        sender = new SerialGatewaySenderCreation(cache, attrs);
        cache.addGatewaySender(sender);
      }
    }
    return sender;
  }
Used internally to pass the attributes from this factory to the real GatewaySender it is
creating.
geode-wan/src/main/java/org/apache/geode/cache/wan/internal/GatewaySenderFactoryImpl.java