use of com.evolveum.midpoint.provisioning.ucf.api.async.UcfAsyncUpdateChangeListener in project midpoint by Evolveum.
the class ResourceObjectConverter method listenForAsynchronousUpdates.
public void listenForAsynchronousUpdates(@NotNull ProvisioningContext ctx, @NotNull ResourceObjectAsyncChangeListener outerListener, @NotNull OperationResult parentResult) throws SchemaException, CommunicationException, ConfigurationException, ObjectNotFoundException, ExpressionEvaluationException {
LOGGER.trace("Listening for async updates in {}", ctx);
ConnectorInstance connector = ctx.getConnector(AsyncUpdateCapabilityType.class, parentResult);
UcfAsyncUpdateChangeListener innerListener = (ucfChange, listenerTask, listenerResult) -> {
ResourceObjectAsyncChange change = new ResourceObjectAsyncChange(ucfChange, ResourceObjectConverter.this, ctx);
change.initialize(listenerTask, listenerResult);
outerListener.onChange(change, listenerTask, listenerResult);
};
connector.listenForChanges(innerListener, ctx::canRun, parentResult);
LOGGER.trace("Finished listening for async updates");
}
Aggregations