1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.rice.ksb.messaging.serviceconnectors;
18
19 import java.net.URL;
20
21 import org.kuali.rice.ksb.api.bus.support.RestServiceConfiguration;
22
23
24
25
26
27
28
29 public class RESTConnector extends AbstractServiceConnector {
30
31 public RESTConnector(final RestServiceConfiguration serviceConfiguration, final URL alternateEndpointUrl) {
32 super(serviceConfiguration, alternateEndpointUrl);
33 }
34
35 @Override
36 public RestServiceConfiguration getServiceConfiguration() {
37 return (RestServiceConfiguration)super.getServiceConfiguration();
38 }
39
40
41
42
43
44 public Object getService() {
45 ResourceFacadeImpl resourceFacade = new ResourceFacadeImpl(getServiceConfiguration(), getActualEndpointUrl());
46 resourceFacade.setCredentialsSource(getCredentialsSource());
47
48 if (resourceFacade.isSingleResourceService())
49 return resourceFacade.getResource((String)null);
50
51 return resourceFacade;
52 }
53
54 }