KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > rmitest > ServerFunctions


1 /*
2 * Copyright 1999-2004 The Apache Software Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */

16 package rmitest;
17
18 // import necessary packages from java.rmi
19
import java.rmi.Remote;
20 import java.rmi.RemoteException;
21
22
23 /**
24  *
25  * <p>
26  * The <code>ServerFunctions</code> extends the <code>Remote</code>
27  * interface and defines the methods that need to be implemented by
28  * a RMI server application that wants to cooperate with the
29  * <code>RMIGenerator</code> of this package.
30  *
31  * @author <a HREF="mailto:Erwin.Hermans@cs.kuleuven.ac.be">Erwin Hermans</a>
32  * (Student Computer Science Department KULeuven, 2001-2002)
33  * @version CVS $Id: ServerFunctions.java 30932 2004-07-29 17:35:38Z vgritsenko $
34  */

35 public interface ServerFunctions extends Remote {
36
37     // meant to be able to query the server about its name
38
/**
39      * This method returns a String, containing a well-formed XML fragment/document.
40      * This String should contain information about the application implementing
41      * this interface. Choosing what information exactly is put into this String is
42      * left to the application designer.
43      */

44     String sayHello() throws RemoteException;
45
46     /**
47      * This method returns a String, containing a well-formed XML fragment/document.
48      * To determine the information that should be returned, a String is passed to
49      * this method. This <code>src</code> attribuut of the <code>map:generate</code>
50      * element will be used to give this String a value.
51      *
52      * <b>Note:</b> This String can <strong>possibly</strong> be the <strong>empty
53      * string</strong>. The application designer should keep this in mind.
54      *
55      */

56     String getResource(String file) throws RemoteException;
57
58 }
59
Popular Tags