org.freenetproject

## Class ForwardPortStatus

- java.lang.Object
- - org.freenetproject.ForwardPortStatus

-     public class ForwardPortStatus
      extends Object

  Represents the status of a port forwarding operation.
  This class encapsulates the result of UPnP port forwarding attempts, including success/failure status, reason messages, and external port information.
  Version:
    1.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFINITE_FAILURE` The port forward definitely failed.
    `static int` | `DEFINITE_SUCCESS` The port forward definitely succeeded.
    `int` | `externalPort` The external port that was actually forwarded.
    `static int` | `IN_PROGRESS` The port forward is in progress
    `static int` | `MAYBE_SUCCESS` The port forward may have succeeded.
    `static int` | `PROBABLE_FAILURE` The port forward probably failed
    `static int` | `PROBABLE_SUCCESS` The port forward probably succeeded.
    `String` | `reasonString` A descriptive message explaining the status or reason for failure
    `int` | `status` The current status of the port forwarding operation

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ForwardPortStatus(int status, String reason, int externalPort)` Creates a new ForwardPortStatus with the specified status, reason, and external port.

  - ### Method Summary

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFINITE_FAILURE

          public static final int DEFINITE_FAILURE

      The port forward definitely failed.
      See Also:
        Constant Field Values

    - #### DEFINITE_SUCCESS

          public static final int DEFINITE_SUCCESS

      The port forward definitely succeeded.
      See Also:
        Constant Field Values

    - #### externalPort

          public final int externalPort

      The external port that was actually forwarded. Some plugins may need to change the external port and can return it to the node here.

    - #### IN_PROGRESS

          public static final int IN_PROGRESS

      The port forward is in progress
      See Also:
        Constant Field Values

    - #### MAYBE_SUCCESS

          public static final int MAYBE_SUCCESS

      The port forward may have succeeded. Or it may not have. We should definitely try to check out of band. See UP&P: Many routers say they've forwarded the port when they haven't.
      See Also:
        Constant Field Values

    - #### PROBABLE_FAILURE

          public static final int PROBABLE_FAILURE

      The port forward probably failed
      See Also:
        Constant Field Values

    - #### PROBABLE_SUCCESS

          public static final int PROBABLE_SUCCESS

      The port forward probably succeeded. I.e. it succeeded unless there was for example hostile action on the part of the router.
      See Also:
        Constant Field Values

    - #### reasonString

          public final String reasonString

      A descriptive message explaining the status or reason for failure

    - #### status

          public final int status

      The current status of the port forwarding operation

  - ### Constructor Detail

    - #### ForwardPortStatus

          public ForwardPortStatus(int status,
                                   String reason,
                                   int externalPort)

      Creates a new ForwardPortStatus with the specified status, reason, and external port.
      Parameters:
        `status` - the status code of the port forwarding operation
        `reason` - a descriptive message explaining the status or reason for failure
        `externalPort` - the external port that was actually forwarded