| 1 |
package org.astrogrid.samp.xmlrpc; |
| 2 |
|
| 3 |
import java.net.URL; |
| 4 |
|
| 5 |
/** |
| 6 |
* Interface for a server which can respond to XML-RPC calls for SAMP. |
| 7 |
* The method parameters and return values must be of SAMP-compatible types, |
| 8 |
* that is only Strings, Lists, and String-keyed Maps are allowed in |
| 9 |
* the data structures. |
| 10 |
* |
| 11 |
* @author Mark Taylor |
| 12 |
* @since 22 Aug 2008 |
| 13 |
*/ |
| 14 |
public interface SampXmlRpcServer { |
| 15 |
|
| 16 |
/** |
| 17 |
* Returns the server's endpoint. |
| 18 |
* |
| 19 |
* @return URL to which XML-RPC requests are POSTed |
| 20 |
*/ |
| 21 |
URL getEndpoint(); |
| 22 |
|
| 23 |
/** |
| 24 |
* Adds a handler which can service certain XML-RPC methods. |
| 25 |
* |
| 26 |
* @param handler handler to add |
| 27 |
*/ |
| 28 |
void addHandler( SampXmlRpcHandler handler ); |
| 29 |
|
| 30 |
/** |
| 31 |
* Removes a previously-added handler. |
| 32 |
* |
| 33 |
* @param handler handler to remove |
| 34 |
*/ |
| 35 |
void removeHandler( SampXmlRpcHandler handler ); |
| 36 |
} |