001/**
002 * Copyright 2005-2015 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.ksb.messaging;
017
018import org.kuali.rice.ksb.api.messaging.AsynchronousCallback;
019
020import java.util.ArrayList;
021import java.util.List;
022
023/**
024 * Can be used to register an {@link AsynchronousCallback} to recieve callback
025 * notifications.
026 * 
027 * @see AsynchronousCallback
028 *
029 * @author Kuali Rice Team (rice.collab@kuali.org)
030 */
031public class GlobalCallbackRegistry {
032
033        private static List<AsynchronousCallback> callbacks = new ArrayList<AsynchronousCallback>();
034
035        public static List<AsynchronousCallback> getCallbacks() {
036                return callbacks;
037        }
038
039        public static void setCallbacks(List<AsynchronousCallback> callbacks) {
040                GlobalCallbackRegistry.callbacks = callbacks;
041        }
042}