1 /**********************************************************************
2 * EJAsyncCallback.java
3 * created on 12.11.2006 by netseeker
4 * $Id: EJAsyncCallback.java,v 1.2 2006/11/20 22:25:04 netseeker Exp $
5 * $Log: EJAsyncCallback.java,v $
6 * Revision 1.2 2006/11/20 22:25:04 netseeker
7 * *** empty log message ***
8 *
9 * Revision 1.1 2006/11/12 20:34:43 netseeker
10 * *** empty log message ***
11 *
12 *
13 * ====================================================================
14 *
15 * Copyright 2005-2006 netseeker aka Michael Manske
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 * ====================================================================
29 *
30 * This file is part of the EJOE framework.
31 * For more information on the author, please see
32 * <http://www.manskes.de/>.
33 *
34 *********************************************************************/
35 package de.netseeker.ejoe;
36
37 import java.io.IOException;
38
39 /***
40 * A callback interface, which is able to process events of
41 * asynchronous client requests.
42 * @author netseeker
43 *
44 * @since 0.3.9.1
45 */
46 public interface EJAsyncCallback
47 {
48 /***
49 * This method will be called by EJClient whenever the related asynchronous
50 * client request was successfully processed.
51 * @param ident the unique identification number of the related asynchronous request
52 * @param response the server response, can be null if no response was received
53 */
54 public void onRequestProcessed( long ident, Object response );
55
56 /***
57 * This method will be called by EJClient whenever an error occured
58 * while processing the related asynchronous client request.
59 * @param ident the unique identification number of the related asynchronous request
60 * @param e the exception, which either has occured either in EJClient or was
61 * received by EJClient from EJServer
62 */
63 public void onErrorOccured( long ident, IOException e);
64 }