Class Context

    • Constructor Detail

      • Context

        public Context()
    • Method Detail

      • prepare

        public void prepare​(Map<String,​Object> topoConf)
        Description copied from interface: IContext
        This method is invoked at the startup of messaging plugin.
        Specified by:
        prepare in interface IContext
        Parameters:
        topoConf - storm configuration
      • bind

        public IConnection bind​(String stormId,
                                int port,
                                IConnectionCallback cb,
                                Supplier<Object> newConnectionResponse)
        Description copied from interface: IContext
        This method establishes a server side connection.
        Specified by:
        bind in interface IContext
        Parameters:
        stormId - topology ID
        port - port #
        cb - The callback to deliver received messages to
        newConnectionResponse - Supplier of the initial message to send to new client connections. If authentication is required, the message will be sent after authentication is complete.
        Returns:
        server side connection
      • connect

        public IConnection connect​(String stormId,
                                   String host,
                                   int port,
                                   AtomicBoolean[] remoteBpStatus)
        Description copied from interface: IContext
        This method establish a client side connection to a remote server implementation should return a new connection every call.
        Specified by:
        connect in interface IContext
        Parameters:
        stormId - topology ID
        host - remote host
        port - remote port
        remoteBpStatus - array of booleans reflecting Back Pressure status of remote tasks.
        Returns:
        client side connection
      • term

        public void term()
        Description copied from interface: IContext
        This method is invoked when a worker is unloading a messaging plugin.
        Specified by:
        term in interface IContext