Skip to content

Commit

Permalink
[AMQ-9450] Expose Job Scheduler views with destination via JMX
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrpav authored and jbonofre committed Mar 9, 2024
1 parent e178019 commit 81e6b90
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public TabularData getAllJobs() throws Exception {
return getAllJobs(false);
}

@Override
public TabularData getAllJobs(boolean includeDestinationName) throws Exception {
OpenTypeFactory factory = OpenTypeSupport.getFactory(Job.class);
CompositeType ct = factory.getCompositeType();
Expand All @@ -81,6 +82,7 @@ public TabularData getAllJobs(String startTime, String finishTime) throws Except
return getAllJobs(startTime, finishTime, false);
}

@Override
public TabularData getAllJobs(String startTime, String finishTime, boolean includeDestinationName) throws Exception {
OpenTypeFactory factory = OpenTypeSupport.getFactory(Job.class);
CompositeType ct = factory.getCompositeType();
Expand Down Expand Up @@ -124,6 +126,7 @@ public TabularData getNextScheduleJobs() throws Exception {
return getNextScheduleJobs(false);
}

@Override
public TabularData getNextScheduleJobs(boolean includeDestinationName) throws Exception {
OpenTypeFactory factory = OpenTypeSupport.getFactory(Job.class);
CompositeType ct = factory.getCompositeType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@ public interface JobSchedulerViewMBean {
@MBeanInfo("get the next job(s) to be scheduled. Not HTML friendly ")
public abstract TabularData getNextScheduleJobs() throws Exception;

/**
* Get all the jobs scheduled to run next.
*
* @param includeDestinationName
* include the destination name with the job metadata.
*
* @return a list of jobs that will be scheduled next
*
* @throws Exception if an error occurs while reading the scheduler store.
*/
@MBeanInfo("get the next job(s) to be scheduled including the destination name. Not HTML friendly ")
public abstract TabularData getNextScheduleJobs(boolean includeDestinationName) throws Exception;

/**
* Get all the outstanding Jobs that are scheduled in this scheduler store.
*
Expand All @@ -108,6 +121,19 @@ public interface JobSchedulerViewMBean {
@MBeanInfo("get the scheduled Jobs in the Store. Not HTML friendly ")
public abstract TabularData getAllJobs() throws Exception;

/**
* Get all the outstanding Jobs that are scheduled in this scheduler store.
*
* @param includeDestinationName
* include the destination name with the job metadata.
*
* @return a table of all jobs in this scheduler store.
*
* @throws Exception if an error occurs while reading the store.
*/
@MBeanInfo("get the scheduled Jobs in the Store including the destination name. Not HTML friendly ")
public abstract TabularData getAllJobs(boolean includeDestinationName) throws Exception;

/**
* Get all outstanding jobs due to run between start and finish time range.
*
Expand All @@ -123,6 +149,22 @@ public interface JobSchedulerViewMBean {
@MBeanInfo("get the scheduled Jobs in the Store within the time range. Not HTML friendly ")
public abstract TabularData getAllJobs(@MBeanInfo("start: yyyy-MM-dd hh:mm:ss")String start,@MBeanInfo("finish: yyyy-MM-dd hh:mm:ss")String finish)throws Exception;

/**
* Get all outstanding jobs due to run between start and finish time range.
*
* @param start
* the starting time range to query the store for jobs.
* @param finish
* the ending time of this query for scheduled jobs.
* @param includeDestinationName
* include the destination name with the job metadata.
*
* @return a table of jobs in the range given.
*
* @throws Exception if an error occurs while querying the scheduler store.
*/
@MBeanInfo("get the scheduled Jobs in the Store within the time range including the destination name. Not HTML friendly ")
public abstract TabularData getAllJobs(@MBeanInfo("start: yyyy-MM-dd hh:mm:ss")String startTime, @MBeanInfo("finish: yyyy-MM-dd hh:mm:ss")String finishTime, boolean includeDestinationName) throws Exception;
/**
* Get the number of messages in the scheduler.
*
Expand Down

0 comments on commit 81e6b90

Please sign in to comment.