Package io.gridgo.core.support
Interface GatewayContainer
-
- All Known Subinterfaces:
GridgoContext
- All Known Implementing Classes:
DefaultGridgoContext
public interface GatewayContainer
Represents a gateway container.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.Optional<Gateway>
closeGateway(java.lang.String name)
Close a gateway, stopping it from accepting or sending messages.java.util.Optional<Gateway>
findGateway(java.lang.String name)
Find a gateway by name.java.util.Collection<GatewaySubscription>
getGateways()
Get the list of opened gateways.java.util.Map<java.lang.String,GatewaySubscription>
getGatewaysWithNames()
Get all opened gateways with name.default GatewaySubscription
openGateway(java.lang.String name)
Open a new gateway.default GatewaySubscription
openGateway(java.lang.String name, ProducerJoinMode joinMode)
Open a new gateway with a specific join mode.GatewaySubscription
openGateway(java.lang.String name, ProducerTemplate producerTemplate)
Open a new gateway with a specific producer template.
-
-
-
Method Detail
-
openGateway
default GatewaySubscription openGateway(java.lang.String name)
Open a new gateway.- Parameters:
name
- the gateway name- Returns:
- the gateway subscription
-
openGateway
default GatewaySubscription openGateway(java.lang.String name, ProducerJoinMode joinMode)
Open a new gateway with a specific join mode.- Parameters:
name
- the gateway namejoinMode
- the join mode- Returns:
- the gateway subscription
-
openGateway
GatewaySubscription openGateway(java.lang.String name, ProducerTemplate producerTemplate)
Open a new gateway with a specific producer template.- Parameters:
name
- the gateway nameproducerTemplate
- the producer template- Returns:
- the gateway subscription
-
closeGateway
java.util.Optional<Gateway> closeGateway(java.lang.String name)
Close a gateway, stopping it from accepting or sending messages.- Parameters:
name
- the gateway name to be closed- Returns:
- the closed gateway, wrapped in Optional
-
findGateway
java.util.Optional<Gateway> findGateway(java.lang.String name)
Find a gateway by name.- Parameters:
name
- the gateway name- Returns:
- the gateway, wrapped in Optional
-
getGateways
java.util.Collection<GatewaySubscription> getGateways()
Get the list of opened gateways.- Returns:
- the list of opened gateways
-
getGatewaysWithNames
java.util.Map<java.lang.String,GatewaySubscription> getGatewaysWithNames()
Get all opened gateways with name.- Returns:
- opened gateways with name
-
-