Package io.gridgo.core
Interface GridgoContext
-
- All Superinterfaces:
io.gridgo.framework.ComponentLifecycle,GatewayContainer,io.gridgo.framework.NamedComponent
- All Known Implementing Classes:
DefaultGridgoContext
public interface GridgoContext extends GatewayContainer, io.gridgo.framework.ComponentLifecycle
Represents a context in which a Gridgo application runs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description GridgoContextattachComponent(ContextAwareComponent component)Attach a io.gridgo.core.support.ContextAwareComponent to this context.default GatewayfindGatewayMandatory(java.lang.String name)java.util.List<ContextAwareComponent>getComponents()io.gridgo.connector.ConnectorFactorygetConnectorFactory()java.util.function.Consumer<java.lang.Throwable>getExceptionHandler()java.util.Optional<GatewaySubscription>getGatewaySubscription(java.lang.String name)io.gridgo.framework.support.RegistrygetRegistry()default GridgoContextstartGateway(java.lang.String name)default GridgoContextstopGateway(java.lang.String name)-
Methods inherited from interface io.gridgo.core.support.GatewayContainer
closeGateway, findGateway, getGateways, getGatewaysWithNames, openGateway, openGateway, openGateway
-
-
-
-
Method Detail
-
attachComponent
GridgoContext attachComponent(ContextAwareComponent component)
Attach a io.gridgo.core.support.ContextAwareComponent to this context.- Parameters:
component- the component to be attached- Returns:
- this context
-
findGatewayMandatory
default Gateway findGatewayMandatory(java.lang.String name)
-
startGateway
default GridgoContext startGateway(java.lang.String name)
-
stopGateway
default GridgoContext stopGateway(java.lang.String name)
-
getGatewaySubscription
java.util.Optional<GatewaySubscription> getGatewaySubscription(java.lang.String name)
-
getRegistry
io.gridgo.framework.support.Registry getRegistry()
-
getConnectorFactory
io.gridgo.connector.ConnectorFactory getConnectorFactory()
-
getExceptionHandler
java.util.function.Consumer<java.lang.Throwable> getExceptionHandler()
-
getComponents
java.util.List<ContextAwareComponent> getComponents()
-
-