Gemfire JavaDocs
Package org.apache.geode.cache.wan
Interface GatewayReceiver
-
public interface GatewayReceiver
A GatewayReceiver that receives the events from aGatewaySender
. GatewayReceiver is used in conjunction with aGatewaySender
to connect two distributed-systems. This GatewayReceiver will receive all the events originating in distributed-systems that has aGatewaySender
connected to this distributed-system.
-
-
Field Summary
Fields Modifier and Type Field Description static 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.static java.lang.String
DEFAULT_BIND_ADDRESS
The default ip address or host name that the receiver's socket will listen on for client connections.static int
DEFAULT_END_PORT
Default end value of the port range from which theGatewayReceiver
's port will be chosenstatic java.lang.String
DEFAULT_HOSTNAME_FOR_SENDERS
static boolean
DEFAULT_MANUAL_START
The default value for manually starting aGatewayReceiver
.static int
DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS
The default maximum amount of time between client pings.static int
DEFAULT_SOCKET_BUFFER_SIZE
The default buffer size for socket buffers for theGatewayReceiver
.static int
DEFAULT_START_PORT
Default start value of the port range from which theGatewayReceiver
's port will be chosenstatic java.lang.String
RECEIVER_GROUP
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
destroy()
Destroys thisGatewayReceiver
and removes theGatewayReceiverMBean
associated with thisGatewayReceiver
.java.lang.String
getBindAddress()
Returns a string representing the ip address or host name that this server will listen on.int
getEndPort()
Returns end value of the port range from which theGatewayReceiver
's port will be chosen.java.util.List<GatewayTransportFilter>
getGatewayTransportFilters()
Returns the list ofGatewayTransportFilter
added to this GatewayReceiver.java.lang.String
getHost()
Returns a string representing the ip address or host name that server locators will tell clients (GatewaySender
s in this case) that this receiver is listening on.java.lang.String
getHostnameForSenders()
Returns the hostname configured byGatewayReceiverFactory.setHostnameForSenders(String)
int
getMaximumTimeBetweenPings()
Returns the maximum amount of time between client pings.int
getPort()
Returns the port on which thisGatewayReceiver
listens for clients.CacheServer
getServer()
Return the underlying Cacheserverint
getSocketBufferSize()
Returns the configured buffer size of the socket connection for thisGatewayReceiver
.int
getStartPort()
Returns start value of the port range from which theGatewayReceiver
's port will be chosen.boolean
isManualStart()
Returns the manual start boolean property for this GatewayReceiver.boolean
isRunning()
Returns whether or not this receiver is runningvoid
start()
Starts this receiver.void
stop()
Stops this receiver.
-
-
-
Field Detail
-
RECEIVER_GROUP
static final java.lang.String RECEIVER_GROUP
- See Also:
- Constant Field Values
-
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 theClientHealthMonitor
to determine the health of thisGatewayReceiver
's clients.- See Also:
- Constant Field Values
-
DEFAULT_START_PORT
static final int DEFAULT_START_PORT
Default start value of the port range from which theGatewayReceiver
's port will be chosen- See Also:
- Constant Field Values
-
DEFAULT_END_PORT
static final int DEFAULT_END_PORT
Default end value of the port range from which theGatewayReceiver
's port will be chosen- See Also:
- Constant Field Values
-
DEFAULT_SOCKET_BUFFER_SIZE
static final int DEFAULT_SOCKET_BUFFER_SIZE
The default buffer size for socket buffers for theGatewayReceiver
.- See Also:
- Constant Field Values
-
DEFAULT_BIND_ADDRESS
static final java.lang.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:
- Constant Field Values
-
DEFAULT_HOSTNAME_FOR_SENDERS
static final java.lang.String DEFAULT_HOSTNAME_FOR_SENDERS
- See Also:
- Constant Field Values
-
DEFAULT_MANUAL_START
static final boolean DEFAULT_MANUAL_START
The default value for manually starting aGatewayReceiver
.- Since:
- GemFire 8.1
- See Also:
- Constant Field Values
-
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 Detail
-
start
void start() throws java.io.IOException
Starts this receiver. Once the receiver is running, its configuration cannot be changed.- Throws:
java.io.IOException
- If an error occurs while starting the receiver
-
stop
void stop()
Stops this receiver. Note that theGatewayReceiver
can be reconfigured and restarted if desired.
-
destroy
void destroy()
Destroys thisGatewayReceiver
and removes theGatewayReceiverMBean
associated with thisGatewayReceiver
. This method does not remove theGatewayReceiver
from cluster configuration. Thestop
method should be called before calling destroy}- Throws:
org.apache.geode.internal.cache.wan.GatewayReceiverException
- ifGatewayReceiver
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
java.util.List<GatewayTransportFilter> getGatewayTransportFilters()
Returns the list ofGatewayTransportFilter
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 theClientHealthMonitor
to determine the health of thisGatewayReceiver
'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 thisGatewayReceiver
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 theGatewayReceiver
'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 theGatewayReceiver
's port will be chosen.- Returns:
- the end value of the port range from which the
GatewayReceiver
's port will be chosen
-
getHost
java.lang.String getHost()
Returns a string representing the ip address or host name that server locators will tell clients (GatewaySender
s 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
java.lang.String getHostnameForSenders()
Returns the hostname configured byGatewayReceiverFactory.setHostnameForSenders(String)
- Returns:
- the hostname configured by
GatewayReceiverFactory.setHostnameForSenders(String)
-
getSocketBufferSize
int getSocketBufferSize()
Returns the configured buffer size of the socket connection for thisGatewayReceiver
. The default is 524288 bytes.- Returns:
- the configured buffer size of the socket connection for this
GatewayReceiver
-
getBindAddress
java.lang.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:
DEFAULT_BIND_ADDRESS
-
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
-
-