001/**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.activemq;
018
019public interface ScheduledMessage {
020    /**
021     * The time in milliseconds that a message will wait before being scheduled to be
022     * delivered by the broker
023     */
024    public static final String AMQ_SCHEDULED_DELAY = "AMQ_SCHEDULED_DELAY";
025    /**
026     * The time in milliseconds to wait after the start time to wait before scheduling the message again
027     */
028    public static final String AMQ_SCHEDULED_PERIOD = "AMQ_SCHEDULED_PERIOD";
029    /**
030     * The number of times to repeat scheduling a message for delivery
031     */
032    public static final String AMQ_SCHEDULED_REPEAT = "AMQ_SCHEDULED_REPEAT";
033    /**
034     * Use a Cron tab entry to set the schedule
035     */
036    public static final String AMQ_SCHEDULED_CRON = "AMQ_SCHEDULED_CRON";
037    /**
038     * An Id that is assigned to a Scheduled Message, this value is only available once the
039     * Message is scheduled, Messages sent to the Browse Destination or delivered to the
040     * assigned Destination will have this value set.
041     */
042    public static final String AMQ_SCHEDULED_ID = "scheduledJobId";
043
044    /**
045     * Special destination to send Message's to with an assigned "action" that the Scheduler
046     * should perform such as removing a message.
047     */
048    public static final String AMQ_SCHEDULER_MANAGEMENT_DESTINATION = "ActiveMQ.Scheduler.Management";
049    /**
050     * Used to specify that a some operation should be performed on the Scheduled Message,
051     * the Message must have an assigned Id for this action to be taken.
052     */
053    public static final String AMQ_SCHEDULER_ACTION = "AMQ_SCHEDULER_ACTION";
054
055    /**
056     * Indicates that a browse of the Scheduled Messages is being requested.
057     */
058    public static final String AMQ_SCHEDULER_ACTION_BROWSE = "BROWSE";
059    /**
060     * Indicates that a Scheduled Message is to be remove from the Scheduler, the Id of
061     * the scheduled message must be set as a property in order for this action to have
062     * any effect.
063     */
064    public static final String AMQ_SCHEDULER_ACTION_REMOVE = "REMOVE";
065    /**
066     * Indicates that all scheduled Messages should be removed.
067     */
068    public static final String AMQ_SCHEDULER_ACTION_REMOVEALL = "REMOVEALL";
069
070    /**
071     * A property that holds the beginning of the time interval that the specified action should
072     * be applied within.  Maps to a long value that specified time in milliseconds since UTC.
073     */
074    public static final String AMQ_SCHEDULER_ACTION_START_TIME = "ACTION_START_TIME";
075    /**
076     * A property that holds the end of the time interval that the specified action should be
077     * applied within.  Maps to a long value that specified time in milliseconds since UTC.
078     */
079    public static final String AMQ_SCHEDULER_ACTION_END_TIME = "ACTION_END_TIME";
080
081}