1 package org.kuali.rice.ksb.api.bus;
2
3 /**
4 * An {@code Endpoint} contains a reference to the {@link ServiceConfiguration}
5 * for a service as well as a proxy to the service endpoint that can be invoked.
6 *
7 * <p>This service can be cast to the appropriate service interface in order to
8 * invoke the desired operations.
9 */
10 public interface Endpoint {
11
12 /**
13 * Returns the service configuration information for this endpoint.
14 *
15 * @return the service configuration for this endpoint, should never return null
16 */
17 ServiceConfiguration getServiceConfiguration();
18
19 /**
20 * Returns a reference to the service that can be invoked through this
21 * endpoint. This could potentially be a proxy to the service (in the case
22 * that the endpoint is pointing to a remote service) so calling code
23 * should cast this object to the appropriate service interface before
24 * using.
25 *
26 * <p>It is the client's responsibility to ensure that they are casting the
27 * service to the correct interface(s) based on their knowledge of what
28 * interface the service should implement.
29 *
30 * @return a reference to the service object which can be used to invoke
31 * operations against the endpoint, should never return null
32 */
33 Object getService();
34
35 }