Class VplanRoutingContext

java.lang.Object
org.jenkinsci.plugins.vmanager.charts.util.VplanRoutingContext

public final class VplanRoutingContext extends Object
Per-build routing-OID holder for vManager VPLAN_LEVEL REST calls (/rest/vplan/get).

Unlike COVERAGE_LEVEL — which uses a single shared OID for all calls in a build — VPLAN routing OIDs are scoped to a single (vPlan, vPlanType) pair. The same (vplan, type) combination may be reused across charts within one build (the OID returned by chart 1 is sent on the first matching call in chart 2), but a different (vplan, type) starts a new chain (no OID on its first call).

Implementation: a per-build Map keyed by "<vplan><type>". Lookups before the first server response for a key return null (caller omits the x-vmgr-routing-oid header). Each successful response updates the map for that key.

Reset between builds because a fresh instance is created per build in the RunListener. Not thread-safe.

  • Field Details

  • Constructor Details

    • VplanRoutingContext

      public VplanRoutingContext()
  • Method Details

    • getOid

      public String getOid(String vplan, String type)
      Returns:
      OID previously returned for (vplan, type), or null.
    • hasOid

      public boolean hasOid(String vplan, String type)
    • setOid

      public void setOid(String vplan, String type, String oid)