Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Endpoint |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2005-2011 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl2.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | package org.kuali.rice.ksb.api.bus; | |
17 | ||
18 | /** | |
19 | * An {@code Endpoint} contains a reference to the {@link ServiceConfiguration} | |
20 | * for a service as well as a proxy to the service endpoint that can be invoked. | |
21 | * | |
22 | * <p>This service can be cast to the appropriate service interface in order to | |
23 | * invoke the desired operations. | |
24 | */ | |
25 | public interface Endpoint { | |
26 | ||
27 | /** | |
28 | * Returns the service configuration information for this endpoint. | |
29 | * | |
30 | * @return the service configuration for this endpoint, should never return null | |
31 | */ | |
32 | ServiceConfiguration getServiceConfiguration(); | |
33 | ||
34 | /** | |
35 | * Returns a reference to the service that can be invoked through this | |
36 | * endpoint. This could potentially be a proxy to the service (in the case | |
37 | * that the endpoint is pointing to a remote service) so calling code | |
38 | * should cast this object to the appropriate service interface before | |
39 | * using. | |
40 | * | |
41 | * <p>It is the client's responsibility to ensure that they are casting the | |
42 | * service to the correct interface(s) based on their knowledge of what | |
43 | * interface the service should implement. | |
44 | * | |
45 | * @return a reference to the service object which can be used to invoke | |
46 | * operations against the endpoint, should never return null | |
47 | */ | |
48 | Object getService(); | |
49 | ||
50 | } |