Package org.apache.geode.cache.wan
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
FieldsModifier and TypeFieldDescriptionstatic final booleanIf 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 StringThe default ip address or host name that the receiver's socket will listen on for client connections.static final intDefault end value of the port range from which theGatewayReceiver's port will be chosenstatic final Stringstatic final booleanThe default value for manually starting aGatewayReceiver.static final intThe default maximum amount of time between client pings.static final intThe default buffer size for socket buffers for theGatewayReceiver.static final intDefault start value of the port range from which theGatewayReceiver's port will be chosenstatic final String -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroys thisGatewayReceiverand removes theGatewayReceiverMBeanassociated with thisGatewayReceiver.Returns a string representing the ip address or host name that this server will listen on.intReturns end value of the port range from which theGatewayReceiver's port will be chosen.Returns the list ofGatewayTransportFilteradded to this GatewayReceiver.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 hostname configured byGatewayReceiverFactory.setHostnameForSenders(String)intReturns the maximum amount of time between client pings.intgetPort()Returns the port on which thisGatewayReceiverlistens for clients.Return the underlying CacheserverintReturns the configured buffer size of the socket connection for thisGatewayReceiver.intReturns start value of the port range from which theGatewayReceiver's port will be chosen.booleanReturns the manual start boolean property for this GatewayReceiver.booleanReturns whether or not this receiver is runningvoidstart()Starts this receiver.voidstop()Stops this receiver.
-
Field Details
-
RECEIVER_GROUP
- See Also:
-
DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS
static final int DEFAULT_MAXIMUM_TIME_BETWEEN_PINGSThe default maximum amount of time between client pings. This value is used by theClientHealthMonitorto determine the health of thisGatewayReceiver's clients.- See Also:
-
DEFAULT_START_PORT
static final int DEFAULT_START_PORTDefault start value of the port range from which theGatewayReceiver's port will be chosen- See Also:
-
DEFAULT_END_PORT
static final int DEFAULT_END_PORTDefault end value of the port range from which theGatewayReceiver's port will be chosen- See Also:
-
DEFAULT_SOCKET_BUFFER_SIZE
static final int DEFAULT_SOCKET_BUFFER_SIZEThe default buffer size for socket buffers for theGatewayReceiver.- See Also:
-
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
- See Also:
-
DEFAULT_MANUAL_START
static final boolean DEFAULT_MANUAL_STARTThe default value for manually starting aGatewayReceiver.- Since:
- GemFire 8.1
- See Also:
-
APPLY_RETRIES
static final boolean APPLY_RETRIESIf 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
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 theGatewayReceivercan be reconfigured and restarted if desired. -
destroy
void destroy()Destroys thisGatewayReceiverand removes theGatewayReceiverMBeanassociated with thisGatewayReceiver. This method does not remove theGatewayReceiverfrom cluster configuration. Thestopmethod should be called before calling destroy}- Throws:
org.apache.geode.internal.cache.wan.GatewayReceiverException- ifGatewayReceiverhas 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 ofGatewayTransportFilteradded to this GatewayReceiver.- Returns:
- the list of
GatewayTransportFilteradded to this GatewayReceiver.
-
getMaximumTimeBetweenPings
int getMaximumTimeBetweenPings()Returns the maximum amount of time between client pings. This value is used by theClientHealthMonitorto 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 thisGatewayReceiverlistens for clients.- Returns:
- the port on which this
GatewayReceiverlistens 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
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 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
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
-