Class AhpHost
java.lang.Object
com.github.copilot.AhpHost
- All Implemented Interfaces:
AutoCloseable
A ready, connection-owned AHP listener. The handle remains bound to its
original transport across client reconnects. Disposal never deletes
application sessions.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Disposes the listener and waits for acknowledged cleanup.dispose()Stops the listener and joins runtime cleanup.Gets the GitHub Mission Control environment identity.Gets the listener identity.getPid()Gets the legacy process ID.getToken()Gets the secret token.getUrl()Gets the bound address.publishSession(String sessionId) Publishes an exact resident session attached to the owning client, without invoking a factory or transferring session ownership.
-
Method Details
-
getHostId
-
getUrl
Gets the bound address.- Returns:
- the actual bound WebSocket URL, or
nullwithout a local server
-
getToken
Gets the secret token.- Returns:
- the token, or
nullwithout an authenticated local server
-
getPid
Gets the legacy process ID.- Returns:
- the process ID, or
nullfor in-process hosting
-
getEnvironmentId
Gets the GitHub Mission Control environment identity.- Returns:
- the environment ID, or
nullwithout a GitHub environment
-
dispose
Stops the listener and joins runtime cleanup. Every call reaches the runtime, including concurrent and repeated disposal calls.- Returns:
- completion of listener cleanup
-
publishSession
Publishes an exact resident session attached to the owning client, without invoking a factory or transferring session ownership.- Parameters:
sessionId- resident session identity- Returns:
- the published AHP session identity
-
close
public void close()Disposes the listener and waits for acknowledged cleanup.- Specified by:
closein interfaceAutoCloseable
-