public interface Broker
| Modifier and Type | Method and Description |
|---|---|
void |
clearRequestTargets(int requestId) |
int |
createRequest()
Create request without specifying content yet.
|
int |
createRequest(String mediaType,
Reader content) |
void |
deleteRequest(int id) |
List<Node> |
getAllNodes() |
Node |
getNode(int nodeId) |
DateDataSource |
getNodeResource(int nodeId,
String resourceId) |
Reader |
getRequestDefinition(int requestId,
String mediaType)
Get the request definition source for the specified request and media type.
|
RequestInfo |
getRequestInfo(int requestId)
Get basic status info for the given request id.
|
Reader |
getRequestNodeStatusMessage(int requestId,
int nodeId)
Retrieve the status message reported by the specified node for the specified request.
|
int[] |
getRequestTargets(int requestId) |
List<String> |
getRequestTypes(int requestId) |
List<RequestInfo> |
listAllRequests() |
List<RequestStatusInfo> |
listRequestNodeStatus(Integer requestId)
Retrieve list with node status for the specified request.
|
List<RequestInfo> |
listRequestsForNode(int nodeId) |
boolean |
markRequestDeletedForNode(int nodeId,
int requestId)
Mark a request as deleted for a given node
|
void |
setRequestClosed(int requestId,
Instant timestamp) |
void |
setRequestDefinition(int requestId,
String mediaType,
Reader content) |
void |
setRequestNodeStatus(int requestId,
int nodeId,
RequestStatus status,
Instant timestamp) |
void |
setRequestNodeStatusMessage(int requestId,
int nodeId,
String messageType,
Reader message)
Set the node status message.
|
void |
setRequestPublished(int requestId,
Instant timestamp) |
void |
setRequestTargets(int requestId,
int[] nodes) |
List<Node> getAllNodes() throws SQLException
SQLExceptionNode getNode(int nodeId) throws SQLException
SQLExceptionint createRequest(String mediaType, Reader content) throws SQLException
SQLExceptionint createRequest()
throws SQLException
setRequestDefinition(int, String, Reader)SQLException - database errorvoid setRequestDefinition(int requestId,
String mediaType,
Reader content)
throws SQLException
SQLExceptionvoid deleteRequest(int id)
throws SQLException
SQLExceptionList<RequestInfo> listAllRequests() throws SQLException
SQLExceptionList<String> getRequestTypes(int requestId) throws SQLException
SQLExceptionReader getRequestDefinition(int requestId, String mediaType) throws SQLException, IOException
since the connection will be closed in this method, we cannot stream the CLOB directly from the database. Therefore, we will read the CLOB into memory if small, or a temporary file, if large.
requestId - request idmediaType - media typeSQLException - sql errorIOException - io error during CLOB bufferingList<RequestInfo> listRequestsForNode(int nodeId) throws SQLException
SQLExceptionvoid setRequestNodeStatus(int requestId,
int nodeId,
RequestStatus status,
Instant timestamp)
throws SQLException
SQLExceptionvoid setRequestNodeStatusMessage(int requestId,
int nodeId,
String messageType,
Reader message)
throws SQLException
setRequestNodeStatus(int, int, RequestStatus, Instant),
If there is no status entry for the specified node, this method will fail.requestId - request idnodeId - node idmessageType - media type for the status messagemessage - content of the status messageSQLException - sql errrorboolean markRequestDeletedForNode(int nodeId,
int requestId)
throws SQLException
nodeId - node idrequestId - request idtrue if the request could be marked as deleted. false if the request was already deleted or could not be foundSQLException - sql errorList<RequestStatusInfo> listRequestNodeStatus(Integer requestId) throws SQLException
requestId - request idnull if request is not found.SQLException - SQL errorRequestInfo getRequestInfo(int requestId) throws SQLException
requestId - request idnull if not foundSQLException - SQL errorvoid setRequestPublished(int requestId,
Instant timestamp)
throws SQLException
SQLExceptionvoid setRequestClosed(int requestId,
Instant timestamp)
throws SQLException
SQLExceptionvoid setRequestTargets(int requestId,
int[] nodes)
throws SQLException
SQLExceptionint[] getRequestTargets(int requestId)
throws SQLException
SQLExceptionvoid clearRequestTargets(int requestId)
throws SQLException
SQLExceptionReader getRequestNodeStatusMessage(int requestId, int nodeId) throws SQLException, IOException
requestId - request idnodeId - node idSQLExceptionIOExceptionDateDataSource getNodeResource(int nodeId, String resourceId) throws SQLException
SQLExceptionCopyright © 2014–2018 University of Oldenburg. All rights reserved.