KickJava   Java API By Example, From Geeks To Geeks.

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


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: SyncRemote.java,v 1.10 2005/03/02 20:57:39 harrie Exp $
33   */

34 public interface SyncRemote extends javax.ejb.EJBObject JavaDoc
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 )
50     throws java.rmi.RemoteException JavaDoc, ServerException;
51     
52     /** Processes an incoming WBXML message.
53      *
54      * @param requestData the SyncML request as stream of bytes
55      * @param parameters SyncML request parameters
56      * @param headers SyncML request headers
57      *
58      * @return the SyncML response as a <i>ISyncResponse</i> object
59      *
60      * @throws ServerException in case of a server error
61      *
62      */

63     public SyncResponse processWBXMLMessage(final byte[] requestData,
64                                             final Map JavaDoc parameters ,
65                                             final Map JavaDoc headers )
66     throws java.rmi.RemoteException JavaDoc, ServerException;
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 information message
74      *
75      * @return the response message
76      *
77      * @throws java.rmi.RemoteException
78      *
79      * @see sync4j.framework.core.StatusCode for valid status codes.
80      *
81      */

82     public SyncResponse processStatusCode(int statusCode, String JavaDoc info)
83     throws java.rmi.RemoteException JavaDoc;
84 }
85
86
Popular Tags