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

org.apache.activemq.web.BrokerFacade Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
/**
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.activemq.web;

import java.util.Collection;

import org.apache.activemq.broker.jmx.*;
import org.apache.activemq.command.ActiveMQDestination;

/**
 * A facade for either a local in JVM broker or a remote broker over JMX
 *
 * 
 * 
 */
public interface BrokerFacade {

	/**
	 * The name of the active broker (f.e. 'localhost' or 'my broker').
	 * 
	 * @return not null
	 * @throws Exception
	 */
	String getBrokerName() throws Exception;

	/**
	 * Admin view of the broker.
	 * 
	 * @return not null
	 * @throws Exception
	 */
	BrokerViewMBean getBrokerAdmin() throws Exception;

	/**
	 * All queues known to the broker.
	 * 
	 * @return not null
	 * @throws Exception
	 */
	Collection getQueues() throws Exception;

	/**
	 * All topics known to the broker.
	 * 
	 * @return not null
	 * @throws Exception
	 */
	Collection getTopics() throws Exception;

	/**
	 * All active consumers of a queue.
	 * 
	 * @param queueName
	 *            the name of the queue, not null
	 * @return not null
	 * @throws Exception
	 */
	Collection getQueueConsumers(String queueName)
			throws Exception;

	/**
	 * All active producers to a queue.
	 * 
	 * @param queueName
	 *            the name of the queue, not null
	 * @return not null
	 * @throws Exception
	 */
	Collection getQueueProducers(String queueName)
			throws Exception;

	/**
	 * All active producers to a topic.
	 * 
	 * @param queueName
	 *            the name of the topic, not null
	 * @return not null
	 * @throws Exception
	 */
	Collection getTopicProducers(String queueName)
			throws Exception;

	/**
	 * All active non-durable subscribers to a topic.
	 * 
	 * @param topicName
	 *            the name of the topic, not null
	 * @return not null
	 * @throws Exception
	 */
	public Collection getTopicSubscribers(String topicName)
			throws Exception;

	/**
	 * All active non-durable subscribers to a topic.
	 * 
	 * @return not null
	 * @throws Exception
	 */
	public Collection getNonDurableTopicSubscribers()
			throws Exception;

	/**
	 * Active durable subscribers to topics of the broker.
	 * 
	 * @return not null
	 * @throws Exception
	 */
	Collection getDurableTopicSubscribers()
			throws Exception;


	/**
	 * Inactive durable subscribers to topics of the broker.
	 *
	 * @return not null
	 * @throws Exception
	 */
	Collection getInactiveDurableTopicSubscribers()
			throws Exception;

	/**
	 * The names of all transport connectors of the broker (f.e. openwire, ssl)
	 * 
	 * @return not null
	 * @throws Exception
	 */
	Collection getConnectors() throws Exception;

	/**
	 * A transport connectors.
	 * 
	 * @param name
	 *            name of the connector (f.e. openwire)
	 * @return null if not found
	 * @throws Exception
	 */
	ConnectorViewMBean getConnector(String name) throws Exception;

	/**
	 * All connections to all transport connectors of the broker.
	 * 
	 * @return not null
	 * @throws Exception
	 */
	Collection getConnections() throws Exception;

	/**
	 * The names of all connections to a specific transport connectors of the
	 * broker.
	 * 
	 * @see #getConnection(String)
	 * @param connectorName
	 *            not null
	 * @return not null
	 * @throws Exception
	 */
	Collection getConnections(String connectorName) throws Exception;

	/**
	 * A specific connection to the broker.
	 * 
	 * @param connectionName
	 *            the name of the connection, not null
	 * @return not null
	 * @throws Exception
	 */
	ConnectionViewMBean getConnection(String connectionName) throws Exception;
	/**
	 * Returns all consumers of a connection.
	 * 
	 * @param connectionName
	 *            the name of the connection, not null
	 * @return not null
	 * @throws Exception
	 */
	Collection getConsumersOnConnection(
			String connectionName) throws Exception;
	/**
	 * The brokers network connectors.
	 * 
	 * @return not null
	 * @throws Exception
	 */
	Collection getNetworkConnectors()
			throws Exception;


	/**
	 * The brokers network bridges.
	 *
	 * @return not null
	 * @throws Exception
	 */
    Collection getNetworkBridges()
            throws Exception;

    /**
	 * Purges the given destination
	 * 
	 * @param destination
	 * @throws Exception
	 */
	void purgeQueue(ActiveMQDestination destination) throws Exception;
	/**
	 * Get the view of the queue with the specified name.
	 * 
	 * @param name
	 *            not null
	 * @return null if no queue with this name exists
	 * @throws Exception
	 */
	QueueViewMBean getQueue(String name) throws Exception;
	/**
	 * Get the view of the topic with the specified name.
	 * 
	 * @param name
	 *            not null
	 * @return null if no topic with this name exists
	 * @throws Exception
	 */
	TopicViewMBean getTopic(String name) throws Exception;
	
	/**
	 * Get the JobScheduler MBean
	 * @return the jobScheduler or null if not configured
	 * @throws Exception
	 */
	JobSchedulerViewMBean getJobScheduler() throws Exception;
	
	/**
     * Get the JobScheduler MBean
     * @return the jobScheduler or null if not configured
     * @throws Exception
     */
    Collection getScheduledJobs() throws Exception;

    boolean isJobSchedulerStarted();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy