VMware GemFire Java API Reference
Package org.apache.geode.cache.wan
Interface GatewayReceiver
-
public interface GatewayReceiverA GatewayReceiver that receives the events from aGatewaySender. GatewayReceiver is used in conjunction with aGatewaySenderto connect two distributed-systems. This GatewayReceiver will receive all the events originating in distributed-systems that has aGatewaySenderconnected to this distributed-system.
-
-
Field Summary
Fields Modifier and Type Field Description static booleanAPPLY_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.static java.lang.StringDEFAULT_BIND_ADDRESSThe default ip address or host name that the receiver's socket will listen on for client connections.static intDEFAULT_END_PORTDefault end value of the port range from which theGatewayReceiver's port will be chosenstatic java.lang.StringDEFAULT_HOSTNAME_FOR_SENDERSstatic booleanDEFAULT_MANUAL_STARTThe default value for manually starting aGatewayReceiver.static intDEFAULT_MAXIMUM_TIME_BETWEEN_PINGSThe default maximum amount of time between client pings.static intDEFAULT_SOCKET_BUFFER_SIZEThe default buffer size for socket buffers for theGatewayReceiver.static intDEFAULT_START_PORTDefault start value of the port range from which theGatewayReceiver's port will be chosenstatic java.lang.StringRECEIVER_GROUP
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddestroy()Destroys thisGatewayReceiverand removes theGatewayReceiverMBeanassociated with thisGatewayReceiver.java.lang.StringgetBindAddress()Returns a string representing the ip address or host name that this server will listen on.intgetEndPort()Returns end value of the port range from which theGatewayReceiver's port will be chosen.java.util.List<GatewayTransportFilter>getGatewayTransportFilters()Returns the list ofGatewayTransportFilteradded to this GatewayReceiver.java.lang.StringgetHost()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.java.lang.StringgetHostnameForSenders()Returns the hostname configured byGatewayReceiverFactory.setHostnameForSenders(String)intgetMaximumTimeBetweenPings()Returns the maximum amount of time between client pings.intgetPort()Returns the port on which thisGatewayReceiverlistens for clients.CacheServergetServer()Return the underlying CacheserverintgetSocketBufferSize()Returns the configured buffer size of the socket connection for thisGatewayReceiver.intgetStartPort()Returns start value of the port range from which theGatewayReceiver's port will be chosen.booleanisManualStart()Returns the manual start boolean property for this GatewayReceiver.booleanisRunning()Returns whether or not this receiver is runningvoidstart()Starts this receiver.voidstop()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 theClientHealthMonitorto 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.IOExceptionStarts 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 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
java.util.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
java.lang.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
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
-
-