Interface ServiceFactory<T extends Service>

  • Type Parameters:
    T - the type parameter
    All Superinterfaces:
    org.springframework.core.Ordered

    public interface ServiceFactory<T extends Service>
    extends org.springframework.core.Ordered
    The ServiceFactory is responsible for creating service objects.
    Since:
    4.2
    • Field Summary

      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T createService​(java.lang.String id)
      Create service based on an identifier.
      <T extends Service>
      T
      createService​(java.lang.String id, java.lang.Class<T> clazz)
      Create the service object based on an identifier.
      T createService​(javax.servlet.http.HttpServletRequest request)
      Create service object based on the parameters of the request.
      <T extends Service>
      T
      createService​(javax.servlet.http.HttpServletRequest request, java.lang.Class<T> clazz)
      Create service based on the given parameters provided by the http request.
      • Methods inherited from interface org.springframework.core.Ordered

        getOrder
    • Method Detail

      • createService

        T createService​(javax.servlet.http.HttpServletRequest request)
        Create service object based on the parameters of the request.
        Parameters:
        request - the request
        Returns:
        the service
      • createService

        T createService​(java.lang.String id)
        Create service based on an identifier.
        Parameters:
        id - the id
        Returns:
        the service object
      • createService

        <T extends Service> T createService​(java.lang.String id,
                                            java.lang.Class<T> clazz)
        Create the service object based on an identifier. Allows the final service object to be casted to the desired service class that may not immediately inherit from Service itself.
        Type Parameters:
        T - the type parameter
        Parameters:
        id - the id
        clazz - the clazz
        Returns:
        the t
      • createService

        <T extends Service> T createService​(javax.servlet.http.HttpServletRequest request,
                                            java.lang.Class<T> clazz)
        Create service based on the given parameters provided by the http request. Allows the final service object to be casted to the desired service class that may not immediately inherit from Service itself.
        Type Parameters:
        T - the type parameter
        Parameters:
        request - the request
        clazz - the clazz
        Returns:
        the t