Class VpcConnectorTunnelClient.VpcConnectorTunnelHandle

java.lang.Object
app.ductape.sdk.cloud.VpcConnectorTunnelClient.VpcConnectorTunnelHandle
All Implemented Interfaces:
AutoCloseable
Enclosing class:
VpcConnectorTunnelClient

public static final class VpcConnectorTunnelClient.VpcConnectorTunnelHandle extends Object implements AutoCloseable
Live tunnel handle: a stream_id-correlated WebSocket session plus the local loopback TCP proxy that relays bytes to/from it. Mirrors TS's Duplex stream, but as a real local socket so JDBC (no custom-stream hook) can dial it directly.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    int
    startLocalProxy(Duration acceptTimeout)
    Binds a loopback-only ephemeral TCP listener, returns the bound local port immediately, then in a background thread accepts exactly one connection within acceptTimeout before relaying bytes bidirectionally with the WebSocket using the same stream_data JSON envelope framing as TS.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • streamId

      public String streamId()
    • startLocalProxy

      public int startLocalProxy(Duration acceptTimeout)
      Binds a loopback-only ephemeral TCP listener, returns the bound local port immediately, then in a background thread accepts exactly one connection within acceptTimeout before relaying bytes bidirectionally with the WebSocket using the same stream_data JSON envelope framing as TS. Closes the listener immediately after accept (or on timeout).
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable