1 | // Copyright 2004-2007 Jean-Francois Poilpret |
2 | // |
3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | // you may not use this file except in compliance with the License. |
5 | // You may obtain a copy of the License at |
6 | // |
7 | // http://www.apache.org/licenses/LICENSE-2.0 |
8 | // |
9 | // Unless required by applicable law or agreed to in writing, software |
10 | // distributed under the License is distributed on an "AS IS" BASIS, |
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | // See the License for the specific language governing permissions and |
13 | // limitations under the License. |
14 | |
15 | package net.sourceforge.hiveremoting.caucho; |
16 | |
17 | import org.apache.hivemind.impl.BaseLocatable; |
18 | import org.apache.hivemind.internal.ServicePoint; |
19 | import org.apache.hivemind.util.ToStringBuilder; |
20 | |
21 | /** |
22 | * Contribution class for <code>RemoteServices</code> configuration-point. |
23 | * @author Jean-Francois Poilpret |
24 | */ |
25 | public class PublishServiceContribution extends BaseLocatable |
26 | { |
27 | public void setServiceId(ServicePoint serviceId) |
28 | { |
29 | _serviceId = serviceId; |
30 | } |
31 | |
32 | public ServicePoint getServiceId() |
33 | { |
34 | return _serviceId; |
35 | } |
36 | |
37 | public void setUrlPath(String urlPath) |
38 | { |
39 | _urlPath = urlPath; |
40 | } |
41 | |
42 | public String getUrlPath() |
43 | { |
44 | return _urlPath; |
45 | } |
46 | |
47 | public void setProtocol(Protocol protocol) |
48 | { |
49 | _protocol = protocol; |
50 | } |
51 | |
52 | public Protocol getProtocol() |
53 | { |
54 | return _protocol; |
55 | } |
56 | |
57 | public void setSecure(boolean secure) |
58 | { |
59 | _secure = secure; |
60 | } |
61 | |
62 | public boolean isSecure() |
63 | { |
64 | return _secure; |
65 | } |
66 | |
67 | public void setContextHandler(RemoteContextHandler handler) |
68 | { |
69 | _handler = handler; |
70 | } |
71 | |
72 | public RemoteContextHandler getContextHandler() |
73 | { |
74 | return _handler; |
75 | } |
76 | |
77 | @Override public String toString() |
78 | { |
79 | ToStringBuilder builder = new ToStringBuilder(this); |
80 | builder.append("serviceId", _serviceId); |
81 | builder.append("urlPath", _urlPath); |
82 | builder.append("protocol", _protocol); |
83 | return builder.toString(); |
84 | } |
85 | |
86 | private ServicePoint _serviceId; |
87 | private String _urlPath; |
88 | private Protocol _protocol; |
89 | private boolean _secure; |
90 | private RemoteContextHandler _handler; |
91 | } |