Class CustomerJaxRSClientImpl

  • All Implemented Interfaces:
    CustomerClient

    public class CustomerJaxRSClientImpl
    extends Object
    implements CustomerClient
    This class implements a JAX-RS Client interface to the customer web application. All commands are through HTTP POST, GET, PUT, and DELETE methods to specific resource URIs for customers.
    • Field Detail

      • logger

        private static final org.slf4j.Logger logger
      • client

        private javax.ws.rs.client.Client client
      • baseUrl

        private URI baseUrl
        Defines the HTTP URL for the WAR that hosts the JAX-RS resources.
      • mediaType

        private javax.ws.rs.core.MediaType mediaType
        Defines the protocol between the client and server.
    • Constructor Detail

      • CustomerJaxRSClientImpl

        public CustomerJaxRSClientImpl()
    • Method Detail

      • setClient

        public void setClient​(javax.ws.rs.client.Client client)
      • setBaseUrl

        public void setBaseUrl​(URI baseUrl)
      • setMediaType

        public void setMediaType​(String mediaType)
      • getBaseUri

        private javax.ws.rs.core.UriBuilder getBaseUri​(String... resourcePath)
        Helper class to build the base URI for a client call.
        Parameters:
        resourcePath -
        Returns:
        uri builder ready to accept path parameter values