Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-5175

Add lamba support for CommandDispatcher commands.

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 10.0.0.Beta1
    • Clustering
    • None

      Currently, one needs to create a Command object for each command to be executed via a CommandDispatcher. Now that WF is on Java 8, we should add support for specifying simple commands as lambdas.

      e.g.
      dispatcher.executeOnCluster(context -> context.doSomething());

      Of course, there is the matter of serializability. I'm hoping this is a simple as making the Command interface (or some sub-interface) a @FunctionalInterface - and given that this already extends Serializable, we should be ok. This should just be a matter of experimentation.

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: