|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| package net.sf.crispy.proxy; |
|
6 |
| |
|
7 |
| import java.util.Properties; |
|
8 |
| |
|
9 |
| import net.sf.crispy.InvocationStrategy; |
|
10 |
| import net.sf.crispy.Property; |
|
11 |
| import net.sf.crispy.util.Util; |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
| |
|
19 |
| |
|
20 |
| public abstract class StaticProxy extends Proxy { |
|
21 |
| |
|
22 |
| public static final String PROPERTY_CURRENT_INTERFACE_CLASS = "crispy.temp.property.current.interface.class"; |
|
23 |
| |
|
24 |
| |
|
25 |
| private Object invocationStrategy = null; |
|
26 |
| |
|
27 |
376
| public StaticProxy () {}
|
|
28 |
32
| public StaticProxy (Properties pvProperties) { setProperties(pvProperties); }
|
|
29 |
| |
|
30 |
144
| public String getUrlAndPort() {
|
|
31 |
144
| String lvUrlAndPort = getProperties().getProperty(Property.REMOTE_URL_AND_PORT, getDefaultUrlAndPort());
|
|
32 |
144
| return Util.cutString(lvUrlAndPort, "/");
|
|
33 |
| } |
|
34 |
| |
|
35 |
| |
|
36 |
| |
|
37 |
| |
|
38 |
| |
|
39 |
| |
|
40 |
| public abstract String getDefaultUrlAndPort(); |
|
41 |
| |
|
42 |
| |
|
43 |
| |
|
44 |
| |
|
45 |
| |
|
46 |
| |
|
47 |
47
| public InvocationStrategy getDefaultInvocationStrategy(Properties pvProperties){
|
|
48 |
47
| return null;
|
|
49 |
| } |
|
50 |
| |
|
51 |
380
| public void setInvocationStrategy (Object pvInvocationStrategy) { invocationStrategy = pvInvocationStrategy; }
|
|
52 |
145
| public Object getInvocationStrategy () { return invocationStrategy; }
|
|
53 |
| |
|
54 |
| } |