Class BasicEndpoint
java.lang.Object
org.kuali.rice.ksb.api.bus.support.BasicEndpoint
- All Implemented Interfaces:
Endpoint
A simple immutable implementation of an
Endpoint which simply
wraps a ServiceConfiguration and it's associated service implementation.- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptionReturns a reference to the service that can be invoked through this endpoint.Returns the service configuration information for this endpoint.static BasicEndpointnewEndpoint(ServiceConfiguration serviceConfiguration, Object service) Constructs a new basic endpoint from the given service configuration and service instance.
-
Method Details
-
newEndpoint
Constructs a new basic endpoint from the given service configuration and service instance.- Parameters:
serviceConfiguration- the service configuration to include in this endpointservice- the service implementation instance to include in this endpoint- Returns:
- the constructed
BasicEndpointwhich contains the given configuration and service, will never return null - Throws:
IllegalArgumentException- if either serviceConfiguration or service are null
-
getServiceConfiguration
Description copied from interface:EndpointReturns the service configuration information for this endpoint.- Specified by:
getServiceConfigurationin interfaceEndpoint- Returns:
- the service configuration for this endpoint, should never return null
-
getService
Description copied from interface:EndpointReturns a reference to the service that can be invoked through this endpoint. This could potentially be a proxy to the service (in the case that the endpoint is pointing to a remote service) so calling code should cast this object to the appropriate service interface before using.It is the client's responsibility to ensure that they are casting the service to the correct interface(s) based on their knowledge of what interface the service should implement.
- Specified by:
getServicein interfaceEndpoint- Returns:
- a reference to the service object which can be used to invoke operations against the endpoint, should never return null
-