JBehave
  1. JBehave
  2. JBEHAVE-757

Allow non-programmatic configuration of ExecutorService

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6
    • Fix Version/s: 3.6.1, 3.7
    • Component/s: Ant Tasks, Core, Maven Plugin
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Currently the ExecutorService can be specified programmatically via the Embedder.

      To allow a non-programmatic configuration, we can introduce an interface

      public interface ExecutorServiceFactory {
      
          ExecutorService create(EmbedderControls controls);
          
      }
      

      and provide multiple implementations, e.g. FixedThreadExecutors and SameThreadExecutors.

      The implementation class must support a default constructor so it can be instantiated from its class name, configured via Maven or Ant.

      Each implementation may require different parameters from the EmbedderControls.

        Activity

        Mauro Talevi made changes -
        Field Original Value New Value
        Component/s Ant Tasks [ 11081 ]
        Component/s Core [ 11086 ]
        Component/s Maven Plugin [ 12482 ]
        Mauro Talevi made changes -
        Description Currently the ExecutorService can be specified programmatically via the Embedder.

        To allow a non-programmatic configuration, we can introduce an interface

        {code}
        public interface ExecutorServiceFactory {

            ExecutorService create(Map<String,Object> parameters);
            
        }
        {code}

        and provide multiple implementations, e.g. FixedThreadExecutors and SameThreadExecutors.

        The implementation class must support a default constructor so it can be instantiated from its class name, configured via Maven or Ant.

        Each implementation may require different parameters.
        Currently the ExecutorService can be specified programmatically via the Embedder.

        To allow a non-programmatic configuration, we can introduce an interface

        {code}
        public interface ExecutorServiceFactory {

            ExecutorService create(EmbedderControls controls);
            
        }
        {code}

        and provide multiple implementations, e.g. FixedThreadExecutors and SameThreadExecutors.

        The implementation class must support a default constructor so it can be instantiated from its class name, configured via Maven or Ant.

        Each implementation may require different parameters from the EmbedderControls.
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mauro Talevi made changes -
        Fix Version/s 3.7 [ 18390 ]

          People

          • Assignee:
            Mauro Talevi
            Reporter:
            Mauro Talevi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: