[jboss-jira] [JBoss JIRA] (WFLY-5175) Add lamba support for CommandDispatcher commands.

Paul Ferraro (JIRA) issues at jboss.org
Sat Aug 22 12:36:26 EDT 2015


Paul Ferraro created WFLY-5175:
----------------------------------

             Summary: Add lamba support for CommandDispatcher commands.
                 Key: WFLY-5175
                 URL: https://issues.jboss.org/browse/WFLY-5175
             Project: WildFly
          Issue Type: Feature Request
          Components: Clustering
    Affects Versions: 10.0.0.Beta1
            Reporter: Paul Ferraro
            Assignee: Paul Ferraro


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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list