Interface JobExecutionSharedAsyncApi
-
public interface JobExecutionSharedAsyncApi
This interfaces exposes an event source,JobEventSource
, that emits events to which a client application can subscribe to.
It differs from
Below an example that shows how to get a sharedJobExecutionAsyncApi
as it allow events to be balanced among multiple client listeners.JobEventSource
for a all jobs:
Then, you can use theString subscriptionId = "myClientApp"; JobEventSource eventSource = jobExecutionSharedAsyncApi.getSharedJobEventSource(myClientApp);
JobEventSource
's methods.- See Also:
JobEventSource
,JobExecutionAsyncApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JobEventSource
getSharedJobEventSource(java.lang.String subscriptionId)
Returns a shared connectable job event source the client can subscribe to.
-
-
-
Method Detail
-
getSharedJobEventSource
JobEventSource getSharedJobEventSource(java.lang.String subscriptionId)
Returns a shared connectable job event source the client can subscribe to.The events of all jobs are emitted as the source is connected.
All clients that use the same subscription id get the events balanced among them. For instance, if two applications listen job solutions for the same subscription id, only one will receives the
JobSolution
of a particular job.- Parameters:
subscriptionId
- an id that is used to get events balanced with other client listeners- Returns:
- A connectable job event source the client can subscribe to.
- See Also:
JobEventSource
-
-