Class AdapterHandshake

Namespace
MirrorPulse.Adapter.Sdk
Assembly
MirrorPulse.Adapter.Sdk.dll

Negotiates Worker protocol versions and checks the Host's Ready response.

public static class AdapterHandshake
Inheritance
AdapterHandshake
Inherited Members

Remarks

Send the initial Hello in envelope version 1, including for a v2-only Worker.

Properties

V2Capabilities

The mandatory capabilities for a protocol-v2 deployment session.

public static IReadOnlyList<string> V2Capabilities { get; }

Property Value

IReadOnlyList<string>

Methods

Negotiate(AdapterHello, int, AdapterVersionRange?)

Finds the highest common supported version for an ordinary deployment.

public static AdapterNegotiation Negotiate(AdapterHello offer, int configuredRootCount, AdapterVersionRange? hostVersions = null)

Parameters

offer AdapterHello
configuredRootCount int
hostVersions AdapterVersionRange

Returns

AdapterNegotiation

Remarks

A v2 offer missing a mandatory capability is rejected. Configuration-only sessions use the separate Ready validation path.

ReadHello(JsonElement)

Older Workers had no version offer; malformed offers never use this fallback.

public static AdapterHello ReadHello(JsonElement payload)

Parameters

payload JsonElement

Returns

AdapterHello

ValidateReady(AdapterReady, AdapterHello)

Validates Ready for an ordinary deployment before the Worker selects the negotiated protocol.

public static void ValidateReady(AdapterReady ready, AdapterHello offer)

Parameters

ready AdapterReady
offer AdapterHello

ValidateReady(AdapterReady, AdapterHello, bool)

Checks Ready against the session mode supplied in the Worker launch arguments.

public static void ValidateReady(AdapterReady ready, AdapterHello offer, bool configurationOnly)

Parameters

ready AdapterReady
offer AdapterHello
configurationOnly bool

Exceptions

InvalidDataException

The selected version, capabilities, root bindings or mode are invalid.