Interface GatewaySubscription

    • Method Detail

      • attachConnector

        ConnectorAttachment attachConnector​(java.lang.String endpoint)
        Attach a connector to the gateway with an endpoint.
        Parameters:
        endpoint - the endpoint
        Returns:
        the connector attachment
      • attachConnector

        ConnectorAttachment attachConnector​(java.lang.String endpoint,
                                            io.gridgo.connector.ConnectorResolver resolver)
        Attach a connector to the gateway with an endpoint using a custom resolver.
        Parameters:
        endpoint - the endpoint
        resolver - the resolver
        Returns:
        the connector attachment
      • attachConnector

        ConnectorAttachment attachConnector​(java.lang.String endpoint,
                                            io.gridgo.connector.support.config.ConnectorContext connectorContext)
        Attach a connector to the gateway with an endpoint and a context.
        Parameters:
        endpoint - the endpoint
        connectorContext - the context
        Returns:
        the connector attachment
      • attachConnector

        ConnectorAttachment attachConnector​(java.lang.String endpoint,
                                            io.gridgo.connector.ConnectorResolver resolver,
                                            io.gridgo.connector.support.config.ConnectorContext connectorContext)
        Attach a connector to the gateway with an endpoint and a context using a custom resolver.
        Parameters:
        endpoint - the endpoint
        resolver - the resolver
        connectorContext - the context
        Returns:
        the connector attachment
      • attachConnector

        ConnectorAttachment attachConnector​(io.gridgo.connector.Connector connector)
        Attach a connector object to the gateway.
        Parameters:
        connector - the connector
        Returns:
        the connector attachment
      • attachRoutingPolicy

        GatewaySubscription attachRoutingPolicy​(RoutingPolicy policy)
        Attach a routing policy to the gateway.
        Parameters:
        policy - the policy
        Returns:
        the GatewaySubscription itself
      • subscribe

        ProcessorSubscription subscribe​(Processor processor)
        Subscribe a processor so that it can receive messages from the gateway's attached connectors.
        Parameters:
        processor - the processor
        Returns:
        the ProcessorSubscription
      • setAutoStart

        GatewaySubscription setAutoStart​(boolean autoStart)
        Set the gateway autoStart flag.
        Parameters:
        autoStart - the autoStart value
        Returns:
        the GatewaySubscription itself
      • setProducerInstrumenter

        GatewaySubscription setProducerInstrumenter​(io.gridgo.framework.execution.ProducerInstrumenter instrumenter)
      • getSubscriptions

        java.util.List<ProcessorSubscription> getSubscriptions()
        Get the list of subscriptions attached to this gateway
        Returns:
        the list of subscriptions
      • get

        Gateway get()
        Get the Gateway associated with this subscription.
        Returns:
        the associated gateway