1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 package com.mjh.switchrmi;
27
28 import java.lang.reflect.Method;
29
30 public interface RmiProtocol
31 {
32 public final static String SOAP = "soap";
33 public final static String XMLRPC = "xmlrpc";
34 public final static String RAWRPC = "raw";
35 public final static String HTML = "html";
36 public final static String SOAP_CONTENT_TYPE = "text/xml";
37 public final static String XMLRPC_CONTENT_TYPE = "text/xmls";
38 public final static String RAWRPC_CONTENT_TYPE = "application/x-raw";
39 public final static String HTML_CONTENT_TYPE = "text/html";
40
41 public String getName();
42
43 public String getMimeType();
44
45 public void writeRequest(RmiRequest request, RmiContext context)
46 throws Exception;
47
48 public RmiResponse readResponse(RmiContext context)
49 throws Exception;
50
51 public RmiRequest readRequest(RmiContext context)
52 throws Exception;
53
54 public void writeResponse(RmiResponse response, RmiContext context)
55 throws Exception;
56
57 public RmiRequest createRequest(Method method, Object[] args,
58 RmiContext context);
59
60 public RmiResponse createResponse(RmiRequest request, Object result,
61 RmiContext context);
62 }