java.lang.Object
net.i2p.router.OutNetMessagePool

public class OutNetMessagePoolextends Object
Routes outbound messages to the communication system for delivery. Validates messages, manages reply selectors, and coordinates with the message registry for reliable delivery.
  • Field Details

    • _log

      private final Log _log
      Logger for this class.
    • _context

      private final RouterContext _context
      The router context the pool belongs to.
  • Constructor Details

    • OutNetMessagePool

      public OutNetMessagePool(RouterContext context)
      Retains the context and opens the pool's log.
      Parameters:
      context - the router context whose transport and log manager are used
  • Method Details

    • add

      public void add(OutNetMessage msg)
      Add a new outbound network message to the pool for delivery. The message will be validated before being queued.
      Parameters:
      msg - the OutNetMessage to add
    • validate

      private boolean validate(OutNetMessage msg)
      Validate an outbound message before adding it to the pool.
      Parameters:
      msg - the message to validate
      Returns:
      true if the message is valid and should be processed