Interface GatewayReceiver


public interface GatewayReceiver
A GatewayReceiver that receives the events from a GatewaySender. GatewayReceiver is used in conjunction with a GatewaySender to connect two distributed-systems. This GatewayReceiver will receive all the events originating in distributed-systems that has a GatewaySender connected to this distributed-system.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
    If the batch already seen by this receiver, arrives again then whether it is to be re-applied or not is decided by this attribute.
    static final String
    The default ip address or host name that the receiver's socket will listen on for client connections.
    static final int
    Default end value of the port range from which the GatewayReceiver's port will be chosen
    static final String
     
    static final boolean
    The default value for manually starting a GatewayReceiver.
    static final int
    The default maximum amount of time between client pings.
    static final int
    The default buffer size for socket buffers for the GatewayReceiver.
    static final int
    Default start value of the port range from which the GatewayReceiver's port will be chosen
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Destroys this GatewayReceiverand removes the GatewayReceiverMBean associated with this GatewayReceiver.
    Returns a string representing the ip address or host name that this server will listen on.
    int
    Returns end value of the port range from which the GatewayReceiver's port will be chosen.
    Returns the list of GatewayTransportFilter added to this GatewayReceiver.
    Returns a string representing the ip address or host name that server locators will tell clients (GatewaySenders in this case) that this receiver is listening on.
    Returns the hostname configured by GatewayReceiverFactory.setHostnameForSenders(String)
    int
    Returns the maximum amount of time between client pings.
    int
    Returns the port on which this GatewayReceiver listens for clients.
    Return the underlying Cacheserver
    int
    Returns the configured buffer size of the socket connection for this GatewayReceiver.
    int
    Returns start value of the port range from which the GatewayReceiver's port will be chosen.
    boolean
    Returns the manual start boolean property for this GatewayReceiver.
    boolean
    Returns whether or not this receiver is running
    void
    Starts this receiver.
    void
    Stops this receiver.
  • Field Details

    • RECEIVER_GROUP

      static final String RECEIVER_GROUP
      See Also:
    • DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS

      static final int DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS
      The default maximum amount of time between client pings. This value is used by the ClientHealthMonitor to determine the health of this GatewayReceiver's clients.
      See Also:
    • DEFAULT_START_PORT

      static final int DEFAULT_START_PORT
      Default start value of the port range from which the GatewayReceiver's port will be chosen
      See Also:
    • DEFAULT_END_PORT

      static final int DEFAULT_END_PORT
      Default end value of the port range from which the GatewayReceiver's port will be chosen
      See Also:
    • DEFAULT_SOCKET_BUFFER_SIZE

      static final int DEFAULT_SOCKET_BUFFER_SIZE
      The default buffer size for socket buffers for the GatewayReceiver.
      See Also:
    • DEFAULT_BIND_ADDRESS

      static final String DEFAULT_BIND_ADDRESS
      The default ip address or host name that the receiver's socket will listen on for client connections. The current default is an empty string.
      See Also:
    • DEFAULT_HOSTNAME_FOR_SENDERS

      static final String DEFAULT_HOSTNAME_FOR_SENDERS
      See Also:
    • DEFAULT_MANUAL_START

      static final boolean DEFAULT_MANUAL_START
      The default value for manually starting a GatewayReceiver.
      Since:
      GemFire 8.1
      See Also:
    • APPLY_RETRIES

      static final boolean APPLY_RETRIES
      If the batch already seen by this receiver, arrives again then whether it is to be re-applied or not is decided by this attribute.
  • Method Details

    • start

      void start() throws IOException
      Starts this receiver. Once the receiver is running, its configuration cannot be changed.
      Throws:
      IOException - If an error occurs while starting the receiver
    • stop

      void stop()
      Stops this receiver. Note that the GatewayReceiver can be reconfigured and restarted if desired.
    • destroy

      void destroy()
      Destroys this GatewayReceiverand removes the GatewayReceiverMBean associated with this GatewayReceiver. This method does not remove the GatewayReceiver from cluster configuration. The stop method should be called before calling destroy}
      Throws:
      org.apache.geode.internal.cache.wan.GatewayReceiverException - if GatewayReceiver has not been stopped before calling destroy
    • isRunning

      boolean isRunning()
      Returns whether or not this receiver is running
      Returns:
      whether this receiver is running
    • getGatewayTransportFilters

      List<GatewayTransportFilter> getGatewayTransportFilters()
      Returns the list of GatewayTransportFilter added to this GatewayReceiver.
      Returns:
      the list of GatewayTransportFilter added to this GatewayReceiver.
    • getMaximumTimeBetweenPings

      int getMaximumTimeBetweenPings()
      Returns the maximum amount of time between client pings. This value is used by the ClientHealthMonitor to determine the health of this GatewayReceiver's clients (i.e. the GatewaySenders). The default is 60000 ms.
      Returns:
      the maximum amount of time between client pings.
    • getPort

      int getPort()
      Returns the port on which this GatewayReceiver listens for clients.
      Returns:
      the port on which this GatewayReceiver listens for clients
    • getStartPort

      int getStartPort()
      Returns start value of the port range from which the GatewayReceiver's port will be chosen.
      Returns:
      the start value of the port range from which the GatewayReceiver's port will be chosen
    • getEndPort

      int getEndPort()
      Returns end value of the port range from which the GatewayReceiver's port will be chosen.
      Returns:
      the end value of the port range from which the GatewayReceiver's port will be chosen
    • getHost

      String getHost()
      Returns a string representing the ip address or host name that server locators will tell clients (GatewaySenders in this case) that this receiver is listening on.
      Returns:
      the ip address or host name to give to clients so they can connect to this receiver
    • getHostnameForSenders

      String getHostnameForSenders()
      Returns the hostname configured by GatewayReceiverFactory.setHostnameForSenders(String)
      Returns:
      the hostname configured by GatewayReceiverFactory.setHostnameForSenders(String)
    • getSocketBufferSize

      int getSocketBufferSize()
      Returns the configured buffer size of the socket connection for this GatewayReceiver. The default is 524288 bytes.
      Returns:
      the configured buffer size of the socket connection for this GatewayReceiver
    • getBindAddress

      String getBindAddress()
      Returns a string representing the ip address or host name that this server will listen on.
      Returns:
      the ip address or host name that this server is to listen on
      See Also:
    • isManualStart

      boolean isManualStart()
      Returns the manual start boolean property for this GatewayReceiver. Default is true i.e. the GatewayReceiver will not automatically start once created.
      Returns:
      the manual start boolean property for this GatewayReceiver
    • getServer

      CacheServer getServer()
      Return the underlying Cacheserver
      Returns:
      the underlying Cacheserver