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.camel.api.management.mbean;
018
019import org.apache.camel.api.management.ManagedAttribute;
020import org.apache.camel.api.management.ManagedOperation;
021
022public interface ManagedSchedulePollConsumerMBean extends ManagedConsumerMBean {
023
024    @ManagedAttribute(description = "Scheduled Delay")
025    long getDelay();
026
027    @ManagedAttribute(description = "Scheduled Delay")
028    void setDelay(long delay);
029
030    @ManagedAttribute(description = "Scheduled Initial Delay")
031    long getInitialDelay();
032
033    @ManagedAttribute(description = "Scheduled Initial Delay")
034    void setInitialDelay(long initialDelay);
035
036    @ManagedAttribute(description = "Scheduled Fixed Delay")
037    boolean isUseFixedDelay();
038
039    @ManagedAttribute(description = "Scheduled Fixed Delay")
040    void setUseFixedDelay(boolean useFixedDelay);
041
042    @ManagedAttribute(description = "Scheduled Greedy")
043    boolean isGreedy();
044
045    @ManagedAttribute(description = "Scheduled Greedy")
046    void setGreedy(boolean greedy);
047
048    @ManagedAttribute(description = "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead")
049    boolean isSendEmptyMessageWhenIdle();
050
051    @ManagedAttribute(description = "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead")
052    void setSendEmptyMessageWhenIdle(boolean sendEmptyMessageWhenIdle);
053
054    @ManagedAttribute(description = "The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that.")
055    String getRunningLoggingLevel();
056
057    @ManagedAttribute(description = "The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that.")
058    void setRunningLoggingLevel(String runningLoggingLevel);
059
060    @ManagedAttribute(description = "Scheduled TimeUnit")
061    String getTimeUnit();
062
063    @ManagedAttribute(description = "Scheduled TimeUnit")
064    void setTimeUnit(String timeUnit);
065
066    @ManagedAttribute(description = "Is the scheduler currently polling")
067    boolean isPolling();
068
069    @ManagedAttribute(description = "Is the scheduler started")
070    boolean isSchedulerStarted();
071
072    @ManagedOperation(description = "Starts the scheduler")
073    void startScheduler();
074
075    @ManagedAttribute(description = "Scheduler classname")
076    String getSchedulerClassName();
077
078    @ManagedAttribute(description = "Backoff multiplier")
079    int getBackoffMultiplier();
080
081    @ManagedAttribute(description = "Backoff idle threshold")
082    int getBackoffIdleThreshold();
083
084    @ManagedAttribute(description = "Backoff error threshold")
085    int getBackoffErrorThreshold();
086
087    @ManagedAttribute(description = "Current backoff counter")
088    int getBackoffCounter();
089
090    @ManagedAttribute(description = "Repeat count")
091    long getRepeatCount();
092
093    @ManagedAttribute(description = "Whether a first pool attempt has been done (also if the consumer has been restarted)")
094    boolean isFirstPollDone();
095
096    @ManagedAttribute(description = "Whether the consumer is ready to handle incoming traffic (used for readiness health-check)")
097    boolean isConsumerReady();
098
099    @ManagedAttribute(description = "Total number of polls run")
100    long getCounter();
101
102    @ManagedAttribute(description = "Error counter. If the counter is > 0 that means the consumer failed polling for the last N number of times."
103                                    + " When the consumer is successfully again, then the error counter resets to zero.")
104    long getErrorCounter();
105
106    @ManagedAttribute(description = "Success counter. If the success is > 0 that means the consumer succeeded polling for the last N number of times."
107                                    + " When the consumer is failing again, then the success counter resets to zero.")
108    long getSuccessCounter();
109
110}