Interface BrokerBackend

All Superinterfaces:
Broker
All Known Implementing Classes:
BrokerImpl

public interface BrokerBackend
extends Broker
  • Method Details

    • setBrokerDB

      void setBrokerDB​(DataSource brokerDB)
    • accessPrincipal

      Principal accessPrincipal​(AuthInfo auth) throws SQLException
      Add or retrieve the node principal. The node is identified by its key. The key can be any string value. It is used as primary identifier and should not change. For API-Key authentication, this can be the API key. For TLS client certificate authentication, this may be the certificate serial number. For external auth, a user id / login name can be used.
      Parameters:
      auth - authentication information
      Returns:
      principal
      Throws:
      SQLException - SQL error
    • updateNodeLastSeen

      void updateNodeLastSeen​(int[] nodeIds, long[] timestamps) throws SQLException
      Throws:
      SQLException
    • updateNodeLastSeen

      default void updateNodeLastSeen​(Map<Integer,​Long> timestamps) throws SQLException
      Throws:
      SQLException
    • updateNodeResource

      void updateNodeResource​(int nodeId, String resourceId, javax.ws.rs.core.MediaType mediaType, InputStream content) throws SQLException, IOException
      Throws:
      SQLException
      IOException
    • clearDataDirectory

      void clearDataDirectory() throws IOException
      Throws:
      IOException