All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ibm.cp4waiops.connectors.sdk.StatusWriter Maven / Gradle / Ivy

There is a newer version: 2.2.9
Show newest version
package com.ibm.cp4waiops.connectors.sdk;

import java.time.Duration;
import java.util.Map;

import com.ibm.aiops.connectors.bridge.ConnectorStatus;

/**
 * Writes status updates for a connector
 */
public interface StatusWriter {
    /**
     * Convenience method to create a ConnectorStatus
     * 
     * @param phase
     *            The connector phase
     * @param retryAfter
     *            Delay before the next status will be sent (regardless of phase)
     * @param extraProperties
     *            Additional key value pairs to be set in the status as "resources"; the SDK may enrich these values
     * 
     * @return
     */
    ConnectorStatus createConnectorStatus(ConnectorStatus.Phase phase, Duration retryAfter,
            Map extraProperties);

    /**
     * Sends the connector status to the server
     * 
     * @param status
     *            The status to write
     * 
     * @return true if the status was written successfully, false otherwise
     */
    boolean writeConnectorStatus(ConnectorStatus status);

    /**
     * @deprecated replaced by writeConnectorStatus()
     */
    boolean WriteConnectorStatus(ConnectorStatus status);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy