rapture.common.api.ActivityApi Maven / Gradle / Ivy
/**
* The MIT License (MIT)
*
* Copyright (C) 2011-2016 Incapture Technologies LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* This is an autogenerated file. You should not edit this file as any changes
* will be overwritten.
*/
package rapture.common.api;
import rapture.common.exception.RaptureException;
import rapture.common.CallingContext;
import java.util.List;
import java.util.Map;
import rapture.common.Activity;
import rapture.common.ActivityQueryResponse;
@SuppressWarnings("all")
public interface ActivityApi {
/**
* This method creates and starts recording a new activity. It returns a unique id that
* can be used to update the status of the activity.
*
*/
String createActivity(CallingContext context, String description, String message, Long progress, Long max);
/**
* This method updates the status of an activity. The return value is false if the
* activity was already marked as finished or aborted. If the value is false, this
* function will not take effect.
*
*/
Boolean updateActivity(CallingContext context, String activityId, String message, Long progress, Long max);
/**
* This method marks an activity as finished. The return value is false if the activity
* was already marked as finished or aborted. If the value is false, this function
* will not take effect.
*
*/
Boolean finishActivity(CallingContext context, String activityId, String message);
/**
* This method is used to request that an activity abort. This will indicate to callers
* of updateActivity that the request is aborted, via the return value of calls that
* write to this activity, such as updateActivity or recordActivity. The return value
* is false if the activity was already marked as finished or aborted. If the value
* is false, this function will not take effect.
*
*/
Boolean requestAbortActivity(CallingContext context, String activityId, String message);
/**
* Retrieve activities updated after a given timestamp - nextBatchId: the id for the
* batch, if this is not the first request. Empty string to indicate the first request
* - batchSize: the maximum number of items you want to see in this batch. Maximum
* is 10000 -- if the number passed in is > 10k, it gets set to 10k. - lastSeen: an
* epoch timestamp in milliseconds. only activities that were last updated after this
* time will be returned
*
*/
ActivityQueryResponse queryByExpiryTime(CallingContext context, String nextBatchId, Long batchSize, Long lastSeen);
/**
* Get an activity by id
*
*/
Activity getById(CallingContext context, String activityId);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy