Class KeePassRpcEndpoint

java.lang.Object
com.aresstack.keepassrpc.pairing.KeePassRpcEndpoint

public final class KeePassRpcEndpoint extends Object
Immutable host and port pair for a KeePassRPC WebSocket endpoint.

KeePassRPC usually listens on 127.0.0.1:12546. Applications can use this value object to pass explicit endpoint settings to pairing and credential clients.

  • Field Details

  • Constructor Details

    • KeePassRpcEndpoint

      public KeePassRpcEndpoint(String host, int port)
      Create an endpoint.
      Parameters:
      host - hostname or IP address; blank values fall back to DEFAULT_HOST
      port - TCP port in the range 1..65535
  • Method Details

    • localhost

      public static KeePassRpcEndpoint localhost()
      Return the default local KeePassRPC endpoint.
      Returns:
      endpoint for 127.0.0.1:12546
    • getHost

      public String getHost()
    • getPort

      public int getPort()
    • toWebSocketUri

      public URI toWebSocketUri()
      Convert the endpoint to the WebSocket URI used by KeePassRPC.
      Returns:
      WebSocket URI such as ws://127.0.0.1:12546/
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object