Class FlightEndpoint

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

public class FlightEndpoint extends Object
POJO to convert to/from the underlying protobuf FlightEndpoint.
  • Constructor Details

    • FlightEndpoint

      public FlightEndpoint(Ticket ticket, Location... locations)
      Constructs a new endpoint with no expiration time.
      Parameters:
      ticket - A ticket that describe the key of a data stream.
      locations - The possible locations the stream can be retrieved from.
    • FlightEndpoint

      public FlightEndpoint(Ticket ticket, Instant expirationTime, Location... locations)
      Constructs a new endpoint with an expiration time.
      Parameters:
      ticket - A ticket that describe the key of a data stream.
      expirationTime - (optional) When this endpoint expires.
      locations - The possible locations the stream can be retrieved from.
  • Method Details

    • getLocations

      public List<Location> getLocations()
    • getTicket

      public Ticket getTicket()
    • getExpirationTime

      public Optional<Instant> getExpirationTime()
    • getAppMetadata

      public byte[] getAppMetadata()
    • serialize

      public ByteBuffer serialize()
      Get the serialized form of this protocol message.

      Intended to help interoperability by allowing non-Flight services to still return Flight types.

    • deserialize

      public static FlightEndpoint deserialize(ByteBuffer serialized) throws IOException, URISyntaxException
      Parse the serialized form of this protocol message.

      Intended to help interoperability by allowing Flight clients to obtain stream info from non-Flight services.

      Parameters:
      serialized - The serialized form of the message, as returned by serialize().
      Returns:
      The deserialized message.
      Throws:
      IOException - if the serialized form is invalid.
      URISyntaxException - if the serialized form contains an unsupported URI format.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

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

      public static FlightEndpoint.Builder builder(Ticket ticket, Location... locations)
      Create a builder for FlightEndpoint.
      Parameters:
      ticket - A ticket that describe the key of a data stream.
      locations - The possible locations the stream can be retrieved from.