Class EndpointManager

java.lang.Object
org.eclipse.rdf4j.federated.EndpointManager

public class EndpointManager extends Object
EndpointManager is the singleton instance that manages available Endpoints. Particular endpoints can be looked up by their id and connection and all relevant information can be used.
Author:
Andreas Schwarte
  • Field Details Link icon

    • log Link icon

      protected static final org.slf4j.Logger log
    • endpoints Link icon

      protected HashMap<String,Endpoint> endpoints
    • inRepair Link icon

      protected boolean inRepair
    • lastRepaired Link icon

      protected Long lastRepaired
  • Method Details Link icon

    • initialize Link icon

      public static EndpointManager initialize(List<Endpoint> endpoints)
      Initialize the singleton endpoint manager with the provided endpoints
      Parameters:
      endpoints -
    • addEndpoint Link icon

      public void addEndpoint(Endpoint e)
      Add the (initialized) endpoint to this endpoint manager to be used by the FederationManager.
      Parameters:
      e - the endpoint
    • removeEndpoint Link icon

      protected void removeEndpoint(Endpoint e) throws NoSuchElementException
      Remove the provided endpoint from this endpoint manager to be used by the FederationManager. In addition, this method unregisters the FederatedService from RDF4J.
      Parameters:
      e - the endpoint
      Throws:
      NoSuchElementException - if there is no mapping for some endpoint id
    • getAvailableEndpoints Link icon

      public Collection<Endpoint> getAvailableEndpoints()
      Returns:
      a collection of available endpoints in this endpoint manager
    • getEndpoint Link icon

      public Endpoint getEndpoint(String endpointID)
      Parameters:
      endpointID -
      Returns:
      the endpoint corresponding to the provided id or null
    • getEndpointByUrl Link icon

      public Endpoint getEndpointByUrl(String endpointUrl)
      Return the Endpoint for the provided endpoint url, if it exists. Otherwise return null.
      Parameters:
      endpointUrl -
      Returns:
      the endpoint by its URL
    • getEndpointByName Link icon

      public Endpoint getEndpointByName(String endpointName)
    • getEndpoints Link icon

      public List<Endpoint> getEndpoints(Set<String> endpointIDs) throws NoSuchElementException
      Parameters:
      endpointIDs -
      Returns:
      a list of endpoints corresponding to the provided ids
      Throws:
      NoSuchElementException - if there is no mapping for some endpoint id