001    package org.apache.archiva.consumers;
002    
003    /*
004     * Licensed to the Apache Software Foundation (ASF) under one
005     * or more contributor license agreements.  See the NOTICE file
006     * distributed with this work for additional information
007     * regarding copyright ownership.  The ASF licenses this file
008     * to you under the Apache License, Version 2.0 (the
009     * "License"); you may not use this file except in compliance
010     * with the License.  You may obtain a copy of the License at
011     *
012     *  http://www.apache.org/licenses/LICENSE-2.0
013     *
014     * Unless required by applicable law or agreed to in writing,
015     * software distributed under the License is distributed on an
016     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017     * KIND, either express or implied.  See the License for the
018     * specific language governing permissions and limitations
019     * under the License.
020     */
021    
022    /**
023     * Consumer - the base set of methods for a consumer.
024     *
025     *
026     */
027    public abstract interface Consumer
028    {
029        /**
030         * This is the id for the consumer.
031         * 
032         * @return the consumer id.
033         */
034        String getId();
035        
036        /**
037         * The human readable description for this consumer.
038         * 
039         * @return the human readable description for this consumer.
040         */
041        String getDescription();
042        
043        /**
044         * Flag indicating permanance of consumer. (if it can be disabled or not)
045         * 
046         * @return true indicating that consumer is permanent and cannot be disabled. 
047         */
048        boolean isPermanent();
049    
050        /**
051         * Add a consumer monitor to the consumer.
052         * 
053         * @param monitor the monitor to add.
054         */
055        void addConsumerMonitor( ConsumerMonitor monitor );
056        
057        /**
058         * Remove a consumer monitor.
059         * 
060         * @param monitor the monitor to remove.
061         */
062        void removeConsumerMonitor( ConsumerMonitor monitor );
063    }