1 /* 2 * Copyright (C) 2007 ETH Zurich 3 * 4 * This file is part of Fosstrak (www.fosstrak.org). 5 * 6 * Fosstrak is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License version 2.1, as published by the Free Software Foundation. 9 * 10 * Fosstrak is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with Fosstrak; if not, write to the Free 17 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * Boston, MA 02110-1301 USA 19 */ 20 21 package org.fosstrak.epcis.queryclient; 22 23 import org.fosstrak.epcis.model.ImplementationException; 24 import org.fosstrak.epcis.model.QueryResults; 25 import org.fosstrak.epcis.model.QueryTooLargeException; 26 27 /** 28 * @author Marco Steybe 29 */ 30 public interface QueryCallbackInterface { 31 32 /** 33 * Performs a callback for a standing query. When the callback returns, the 34 * given QueryResults object will be populated with a result of a standing 35 * query. 36 * 37 * @param resultData 38 * The QueryResults object to be populated. 39 */ 40 void callbackResults(QueryResults resultData); 41 42 /** 43 * Performs a callback for a standing query when the query threw a 44 * QueryTooLargeException. When the callback returns, the given 45 * QueryTooLargeException object will be populated with the corresponding 46 * exception. 47 * 48 * @param e 49 * The QueryTooLargeException to be populated 50 */ 51 void callbackQueryTooLargeException(QueryTooLargeException e); 52 53 /** 54 * Performs a callback for a standing query when the query threw a 55 * ImplementationException. When the callback returns, the given 56 * ImplementationException object will be populated with the corresponding 57 * exception. 58 * 59 * @param e 60 * The ImplementationException to be populated 61 */ 62 void callbackImplementationException(ImplementationException e); 63 }