Class EsbStatusBuilder
java.lang.Object
com.kingsrook.qqq.esb.api.EsbStatusBuilder
Builds the bodies of the ESB endpoints (see the specs in the specs package), as maps in
exactly the shape of the endpoint contract, from the QContext's instance and
session: ESB meta-data, this node's counters (EsbStats) and trigger states
(QEsbRuntime), and broker data from the management API when a provider has
a managementUrl.
Checks permissions (throwing QPermissionDeniedException), and throws
QNotFoundException for an unknown table, process, trigger or destination, or
a table or process without ESB meta-data. Never includes a provider's urls
or credentials.
One builder per request: it keeps the broker adapters and queue infos it
looked up, so each queue is asked about once.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor - for the QContext's instance (and, for permissions, session). -
Method Summary
Modifier and TypeMethodDescriptionbrowseDeadLetters(String triggerName, Integer offset, Integer limit) GET /deadLetters/{trigger}: a page of the trigger's dead-letter queue.browseMessages(String destinationName, String triggerName, Integer offset, Integer limit) GET /messages/{destination}: a page of a queue's messages - or, for a topic, of one of its triggers' subscription queues (named by triggerName; required for a topic, ignored for a queue).GET /overview: the providers (name, type, connected, managementEnabled - never urls or credentials), every destination with its publishers and its triggers (on processes the user can access), and permissions.buildProcess(String processName) GET /process/{process}: the process's publications and triggers, and permissions.buildTable(String tableName) GET /table/{table}: the table's publications, the triggers subscribed to their destinations (on processes the user can access), and permissions.withRuntime(QEsbRuntime runtime) Fluent setter for the runtime whose trigger states are reported (by default, QEsbRuntime.getInstance()).
-
Field Details
-
DEFAULT_LIMIT
-
MAX_LIMIT
/////////////////////////////////////////////////////////////////
-
-
Constructor Details
-
EsbStatusBuilder
public EsbStatusBuilder()Constructor - for the QContext's instance (and, for permissions, session).
-
-
Method Details
-
buildTable
GET /table/{table}: the table's publications, the triggers subscribed to their destinations (on processes the user can access), and permissions. Needs READ on the table.- Throws:
QException
-
buildProcess
GET /process/{process}: the process's publications and triggers, and permissions. Needs access to the process.- Throws:
QException
-
buildOverview
GET /overview: the providers (name, type, connected, managementEnabled - never urls or credentials), every destination with its publishers and its triggers (on processes the user can access), and permissions. Needs access to the ESB app (esbView).- Throws:
QException
-
browseDeadLetters
public Map<String,Object> browseDeadLetters(String triggerName, Integer offset, Integer limit) throws QException GET /deadLetters/{trigger}: a page of the trigger's dead-letter queue. Needs access to the trigger's process.- Throws:
QException
-
browseMessages
public Map<String,Object> browseMessages(String destinationName, String triggerName, Integer offset, Integer limit) throws QException GET /messages/{destination}: a page of a queue's messages - or, for a topic, of one of its triggers' subscription queues (named by triggerName; required for a topic, ignored for a queue). Needs esbView, or READ on a table that publishes to the destination, or access to a process that it triggers. A topic subscription requires access to its selected trigger's process unless the user has service-level ESB view access.- Throws:
QException
-
withRuntime
Fluent setter for the runtime whose trigger states are reported (by default, QEsbRuntime.getInstance()).
-