Interface PortMapping

    • Method Detail

      • start

        void start​(HandlerContext ctx,
                   NodeUpEvent event,
                   Runnable onFailure)
        Tells the method to create a port forwarding and renew it independently. If no forwarding can be created, onFailure must be called once.
        Parameters:
        ctx - the handler context
        event - the node up event
        onFailure - will be called once on failure
      • stop

        void stop​(HandlerContext ctx)
        Shall remove any existing port forwarding again.
        Parameters:
        ctx - the handler context
      • handleMessage

        void handleMessage​(HandlerContext ctx,
                           AddressedByteBuf msg)
        Is called for incoming messages and thus enables this method to react to relevant messages.
        Parameters:
        ctx - the handler context
        msg - the message
      • acceptMessage

        boolean acceptMessage​(AddressedByteBuf msg)
        Is called for incoming messages and returns true if the message should be consumed and removed from the pipeline.
        Parameters:
        msg - the message
        Returns:
        true if the message is relevant for the current port forwarding method. Otherwise false