Class Location

java.lang.Object
org.apache.arrow.flight.Location

public class Location extends Object
A URI where a Flight stream is available.
  • Constructor Details

    • Location

      public Location(String uri) throws URISyntaxException
      Constructs a new instance.
      Parameters:
      uri - the URI of the Flight service
      Throws:
      IllegalArgumentException - if the URI scheme is unsupported
      URISyntaxException
    • Location

      public Location(URI uri)
      Construct a new instance from an existing URI.
      Parameters:
      uri - the URI of the Flight service
  • Method Details

    • getUri

      public URI getUri()
    • toSocketAddress

      public SocketAddress toSocketAddress()
      Helper method to turn this Location into a SocketAddress.
      Returns:
      null if could not be converted
    • reuseConnection

      public static Location reuseConnection()
      Construct a special URI to indicate to clients that they may fetch data by reusing an existing connection to a Flight RPC server.
    • forGrpcInsecure

      public static Location forGrpcInsecure(String host, int port)
      Construct a URI for a Flight+gRPC server without transport security.
      Throws:
      IllegalArgumentException - if the constructed URI is invalid.
    • forGrpcTls

      public static Location forGrpcTls(String host, int port)
      Construct a URI for a Flight+gRPC server with transport security.
      Throws:
      IllegalArgumentException - if the constructed URI is invalid.
    • forGrpcDomainSocket

      public static Location forGrpcDomainSocket(String path)
      Construct a URI for a Flight+gRPC server over a Unix domain socket.
      Throws:
      IllegalArgumentException - if the constructed URI is invalid.
    • toString

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object