Package org.aktin.broker.db
Interface BrokerBackend
- All Superinterfaces:
Broker
- All Known Implementing Classes:
BrokerImpl
public interface BrokerBackend extends Broker
-
Method Summary
Modifier and Type Method Description PrincipalaccessPrincipal(AuthInfo auth)Add or retrieve the node principal.voidclearDataDirectory()voidsetBrokerDB(DataSource brokerDB)voidupdateNodeLastSeen(int[] nodeIds, long[] timestamps)default voidupdateNodeLastSeen(Map<Integer,Long> timestamps)voidupdateNodeResource(int nodeId, String resourceId, javax.ws.rs.core.MediaType mediaType, InputStream content)Methods inherited from interface org.aktin.broker.server.Broker
clearRequestTargets, createRequest, createRequest, deleteRequest, getAllNodes, getNode, getNodeResource, getRequestDefinition, getRequestInfo, getRequestNodeStatusMessage, getRequestTargets, getRequestTypes, listAllRequests, listRequestNodeStatus, listRequestsForNode, markRequestDeletedForNode, setRequestClosed, setRequestDefinition, setRequestNodeStatus, setRequestNodeStatusMessage, setRequestPublished, setRequestTargets
-
Method Details
-
setBrokerDB
-
accessPrincipal
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
- Throws:
SQLException
-
updateNodeLastSeen
- Throws:
SQLException
-
updateNodeResource
void updateNodeResource(int nodeId, String resourceId, javax.ws.rs.core.MediaType mediaType, InputStream content) throws SQLException, IOException- Throws:
SQLExceptionIOException
-
clearDataDirectory
- Throws:
IOException
-