ProjectBrowserSession class final

A browser session over a declared project target.

Constructors

ProjectBrowserSession({required ProjectOperationProfile profile, required Directory workspace, required ProcessLeaseRegistry leaseRegistry, String? leaseId, ProcessLiveness? liveness, ProcessTreeProbe? treeProbe, Duration readinessTimeout = const Duration(seconds: 30), Duration stopGrace = const Duration(seconds: 3)})
Creates a session.

Properties

attached → bool
Whether the session is attached to a target.
no setter
effectiveLeaseId → String
The lease id of this session, derived from the profile and the workspace when the caller did not name one.
no setter
hashCode → int
The hash code for this object.
no setterinherited
lastOutcome → ProjectBrowserSessionOutcome
The result of the last attach or detach.
no setter
leaseId → String?
The lease id of the serve process.
final
leaseRegistry → ProcessLeaseRegistry
The lease registry of this session's processes.
final
liveness → ProcessLiveness
The liveness seam.
final
ownership → ProjectSessionOwnership?
Who owns the process behind url.
no setter
profile → ProjectOperationProfile
The declared commands of the project behind the target.
final
readinessTimeout → Duration
How long a spawned process may take to become ready.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stopGrace → Duration
The grace period of the teardown ladder.
final
treeProbe → ProcessTreeProbe
The process-tree seam.
final
url → Uri?
The URL a browser window navigates to, when the session is attached.
no setter
workspace → Directory
The owner project root.
final

Methods

attach({Uri? url, bool replace = false}) → Future<ProjectBrowserSessionOutcome>
Attaches the session to a target.
detach() → Future<ProjectBrowserSessionOutcome>
Releases the session.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

leaseIdFor(String profileId, String workspacePath) → String
The deterministic lease id of a profile/workspace pair.