001/*
002 * Copyright 2009 Red Hat, Inc.
003 * Red Hat licenses this file to you under the Apache License, version
004 * 2.0 (the "License"); you may not use this file except in compliance
005 * with the License.  You may obtain a copy of the License at
006 *    http://www.apache.org/licenses/LICENSE-2.0
007 * Unless required by applicable law or agreed to in writing, software
008 * distributed under the License is distributed on an "AS IS" BASIS,
009 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
010 * implied.  See the License for the specific language governing
011 * permissions and limitations under the License.
012 */
013
014package org.hornetq.api.core.management;
015
016/**
017 * A HornetQComponentControl is used to manage the life cycle of a HornetQ component.
018 *
019 * @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
020 */
021public interface HornetQComponentControl
022{
023   /**
024    * Returns {@code true} if this component is started, {@code false} else.
025    */
026   boolean isStarted();
027
028   /**
029    * Starts this component.
030    */
031   void start() throws Exception;
032
033   /**
034    * Stops this component.
035    */
036   void stop() throws Exception;
037}