001
014
015 package com.liferay.portal.messaging.async;
016
017 import java.util.Map;
018
019
022 public class AsyncAdviceConfigurator {
023
024 public void afterPropertiesSet() {
025 if (_asyncAdvice == null) {
026 throw new IllegalArgumentException("Async advice is null");
027 }
028
029 if (_defaultDestinationName == null) {
030 throw new IllegalArgumentException(
031 "Default destination name is null");
032 }
033
034 _asyncAdvice.setDefaultDestinationName(_defaultDestinationName);
035
036 if (_destinationNames != null) {
037 _asyncAdvice.setDestinationNames(_destinationNames);
038 }
039 }
040
041 public void setAsyncAdvice(AsyncAdvice asyncAdvice) {
042 _asyncAdvice = asyncAdvice;
043 }
044
045 public void setDefaultDestinationName(String defaultDestinationName) {
046 _defaultDestinationName = defaultDestinationName;
047 }
048
049 public void setDestinationNames(Map<Class<?>, String> destinationNames) {
050 _destinationNames = destinationNames;
051 }
052
053 private AsyncAdvice _asyncAdvice;
054 private String _defaultDestinationName;
055 private Map<Class<?>, String> _destinationNames;
056
057 }