All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gemstone.gemfire.cache.wan.GatewayReceiverFactory Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2010-2015 Pivotal Software, Inc. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you
 * may not use this file except in compliance with the License. You
 * may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 * implied. See the License for the specific language governing
 * permissions and limitations under the License. See accompanying
 * LICENSE file.
 */

package com.gemstone.gemfire.cache.wan;

/**
 * @author Suranjan Kumar
 * @author Yogesh Mahajan
 * 
 * @since 7.0
 */
public interface GatewayReceiverFactory {
  /**
   * Sets the start port for the GatewayReceiver.
   * If set the GatewayReceiver will start at one of the port between startPort
   * and endPort.
   * The default startPort 50505.
   * @param startPort
   */
  public GatewayReceiverFactory setStartPort(int startPort);

  /**
   * Sets the end port for the GatewayReceiver.
   * If set the GatewayReceiver will start at one of the port between startPort
   * and endPort.
   * The default endPort 50605.
   * @param endPort
   */
  public GatewayReceiverFactory setEndPort(int endPort);
  
  /**
   * Sets the buffer size in bytes of the socket connection for this
   * GatewayReceiver. The default is 32768 bytes.
   * 
   * @param socketBufferSize
   *          The size in bytes of the socket buffer
   */
  public GatewayReceiverFactory setSocketBufferSize(int socketBufferSize);

  /**
   * Sets the ip address or host name that this GatewayReceiver is to listen on
   * for GatewaySender Connection
   * 
   * @param address
   *          String representing ip address or host name
   */
  public GatewayReceiverFactory setBindAddress(String address);

  /**
   * Adds a GatewayTransportFilter
   * 
   * @param filter
   *          GatewayTransportFilter
   */
  public GatewayReceiverFactory addGatewayTransportFilter(
      GatewayTransportFilter filter);

  /**
   * Removes a GatewayTransportFilter
   * 
   * @param filter
   *          GatewayTransportFilter
   */
  public GatewayReceiverFactory removeGatewayTransportFilter(
      GatewayTransportFilter filter);

  /**
   * Sets the maximum amount of time between client pings.The default is 60000
   * ms.
   * 
   * @param time
   *          The maximum amount of time between client pings
   */
  public GatewayReceiverFactory setMaximumTimeBetweenPings(int time);
  
  /**
   * Sets the ip address or host name that server locators will tell
   * GatewaySenders that this GatewayReceiver is listening on.
   * 
   * @param address
   *          String representing ip address or host name
   */
  public GatewayReceiverFactory setHostnameForSenders(String address);
  
  /**
   * Creates and returns an instance of GatewayReceiver
   * 
   * @return instance of GatewayReceiver
   */
  public GatewayReceiver create();

  /**
   * Creates and returns an instance of GatewayReceiver with given ID
   * 
   * @return instance of GatewayReceiver
   */
  public GatewayReceiver create(String id);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy