Class Resender


  • public class Resender
    extends java.lang.Object
    The resender handles scheduling and execution of sending instances of RoutingNode. An instance of this class is owned by MessageBus. Because this class does not have any internal thread, it depends on message bus to keep polling it whenever it has time.
    Author:
    Simon Thoresen Hult
    • Constructor Summary

      Constructors 
      Constructor Description
      Resender​(RetryPolicy retryPolicy)
      Constructs a new resender.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canRetry​(int errorCode)
      Returns whether or not the current RetryPolicy supports resending a Reply that contains an error with the given error code.
      void destroy()
      Discards all the routing nodes currently scheduled for resending.
      void resendScheduled()
      Invokes RoutingNode.send() on all routing nodes that are applicable for sending at the current time.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Resender

        public Resender​(RetryPolicy retryPolicy)
        Constructs a new resender.
        Parameters:
        retryPolicy - The retry policy to use.
    • Method Detail

      • canRetry

        public boolean canRetry​(int errorCode)
        Returns whether or not the current RetryPolicy supports resending a Reply that contains an error with the given error code.
        Parameters:
        errorCode - The code to check.
        Returns:
        True if the message can be resent.
      • resendScheduled

        public void resendScheduled()
        Invokes RoutingNode.send() on all routing nodes that are applicable for sending at the current time.
      • destroy

        public void destroy()
        Discards all the routing nodes currently scheduled for resending.