KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > server > syncbean > SyncLocal


1 /**
2  * Copyright (C) 2003-2005 Funambol
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18
19
20 package sync4j.server.syncbean;
21
22 import java.util.Map JavaDoc;
23
24 import javax.ejb.*;
25
26 import sync4j.framework.server.SyncResponse;
27 import sync4j.framework.server.error.ServerException;
28
29 /**
30   *
31   * @author Stefano Fornari
32   * @version $Id: SyncLocal.java,v 1.10 2005/03/02 20:57:39 harrie Exp $
33   */

34 public interface SyncLocal extends EJBLocalObject {
35     
36     /** Processes an incoming XML message.
37      *
38      * @param requestData the SyncML request as stream of bytes
39      * @param parameters SyncML request parameters
40      * @param headers SyncML request headers
41      *
42      * @return the SyncML response as a <i>ISyncResponse</i> object
43      *
44      * @throws ServerException in case of a server error
45      *
46      */

47     public SyncResponse processXMLMessage(final byte[] requestData,
48                                           final Map JavaDoc parameters ,
49                                           final Map JavaDoc headers ) throws ServerException;
50     
51     /** Processes an incoming WBXML message.
52      *
53      * @param requestData the SyncML request as stream of bytes
54      * @param parameters SyncML request parameters
55      * @param headers SyncML request headers
56      *
57      * @return the SyncML response as a <i>ISyncResponse</i> object
58      *
59      * @throws ServerException in case of a server error
60      *
61      */

62     public SyncResponse processWBXMLMessage(final byte[] requestData,
63                                             final Map JavaDoc parameters ,
64                                             final Map JavaDoc headers ) throws ServerException;
65     
66     
67     
68     /**
69      * Used to process a status information as needed by the client object (i.e.
70      * errors or success).
71      *
72      * @param statusCode the status code
73      * @param info additional informational message
74      *
75      * @return the response message
76      *
77      * @see sync4j.framework.core.StatusCode for valid status codes.
78      */

79     public SyncResponse processStatusCode(int statusCode, String JavaDoc info);
80 }
81
82
Popular Tags