Coverage Report - org.kuali.rice.ksb.messaging.service.MessageQueueService
 
Classes in this File Line Coverage Branch Coverage Complexity
MessageQueueService
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2005-2008 The Kuali Foundation
 3  
  * 
 4  
  * 
 5  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 6  
  * you may not use this file except in compliance with the License.
 7  
  * You may obtain a copy of the License at
 8  
  * 
 9  
  * http://www.opensource.org/licenses/ecl2.php
 10  
  * 
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.kuali.rice.ksb.messaging.service;
 18  
 
 19  
 import java.util.List;
 20  
 import java.util.Map;
 21  
 
 22  
 import javax.xml.namespace.QName;
 23  
 
 24  
 import org.kuali.rice.ksb.api.bus.ServiceConfiguration;
 25  
 import org.kuali.rice.ksb.api.messaging.AsynchronousCall;
 26  
 import org.kuali.rice.ksb.messaging.PersistedMessageBO;
 27  
 import org.kuali.rice.ksb.messaging.PersistedMessagePayload;
 28  
 
 29  
 /**
 30  
  * Service for interfacing with the queue of asynchronous messages.
 31  
  * 
 32  
  * @see org.kuali.rice.ksb.messaging.PersistedMessageBO
 33  
  *
 34  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 35  
  */
 36  
 public interface MessageQueueService {
 37  
 
 38  
     public List<PersistedMessageBO> findByServiceName(QName serviceName, String methodName);
 39  
 
 40  
     public void delete(PersistedMessageBO routeQueue);
 41  
 
 42  
     public void save(PersistedMessageBO routeQueue);
 43  
 
 44  
     public List<PersistedMessageBO> findAll();
 45  
 
 46  
     public List<PersistedMessageBO> findAll(int maxRows);
 47  
 
 48  
     /**
 49  
      * Finds the PersistedMessageBO identified by the passed-in primary key, if one is
 50  
      * available, otherwise returns a null object.
 51  
      * 
 52  
      * @param routeQueueId The primary key routeQueueId of the message desired.
 53  
      * @return A populated PersistedMessageBO instance, if the routeQueueId exists, otherwise
 54  
      *         a null object.
 55  
      */
 56  
     public PersistedMessageBO findByRouteQueueId(Long routeQueueId);
 57  
 
 58  
 //    public List getNextDocuments();
 59  
 
 60  
     /**
 61  
      * Returns a List of RouteQueue documents which are queued for routing.  Will not
 62  
      * return more RouteQueues than the value of maxDocuments.
 63  
      */
 64  
     public List<PersistedMessageBO> getNextDocuments(Integer maxDocuments);
 65  
 
 66  
     public PersistedMessagePayload findByPersistedMessageByRouteQueueId(Long routeQueueId);
 67  
     
 68  
     /**
 69  
      * Finds the persisted messages that match the values passed into the 
 70  
      * criteriaValues Map, with an auto-wildcard function, if no wildcard 
 71  
      * is passed in.
 72  
      * 
 73  
      * @param criteriaValues A Map of Key/Value pairs, where the Key is a string holding the field 
 74  
      *                       name, and the Value is a string holding the value to match.
 75  
      * @param maxRows the maximum number of rows to return from the query.  If -1, then all rows will be returned.
 76  
      * @return A populated (or empty) list containing the results of the search.  If no matches are made, 
 77  
      *         an empty list will be returned.
 78  
      */
 79  
     public List<PersistedMessageBO> findByValues(Map<String, String> criteriaValues, int maxRows);
 80  
 
 81  
     /**
 82  
      * Used to determine the maximum number of retries allowed by the system before the 
 83  
      * message goes into Exception.
 84  
      * 
 85  
      * @return The max retry attempts set in the system.
 86  
      */
 87  
     public Integer getMaxRetryAttempts();
 88  
 
 89  
     public PersistedMessageBO getMessage(ServiceConfiguration serviceConfiguration, AsynchronousCall methodCall);
 90  
 }