001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.messaging.config;
016    
017    import com.liferay.portal.kernel.messaging.Destination;
018    import com.liferay.portal.kernel.messaging.DestinationConfiguration;
019    import com.liferay.portal.kernel.messaging.DestinationEventListener;
020    import com.liferay.portal.kernel.messaging.MessageBusEventListener;
021    import com.liferay.portal.kernel.messaging.MessageListener;
022    
023    import java.util.List;
024    import java.util.Map;
025    import java.util.Set;
026    
027    /**
028     * @author Michael C. Han
029     */
030    public interface MessagingConfigurator {
031    
032            public void connect();
033    
034            public void destroy();
035    
036            public void disconnect();
037    
038            public void setDestinationConfigurations(
039                    Set<DestinationConfiguration> destinationConfigurations);
040    
041            public void setDestinationEventListeners(
042                    Map<String, List<DestinationEventListener>> destinationEventListeners);
043    
044            public void setDestinations(List<Destination> destinations);
045    
046            public void setMessageBusEventListeners(
047                    List<MessageBusEventListener> messageBusEventListeners);
048    
049            public void setMessageListeners(
050                    Map<String, List<MessageListener>> messageListeners);
051    
052            /**
053             * @param      replacementDestinations
054             * @deprecated As of 7.0.0, replaced by {@link #setDestinations(List)}
055             */
056            @Deprecated
057            public void setReplacementDestinations(
058                    List<Destination> replacementDestinations);
059    
060    }