brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] incubator-brooklyn pull request: Don't spin BrooklynEntityMirror f...
Date Thu, 04 Jun 2015 12:37:17 GMT
Github user aledsage commented on a diff in the pull request:
    --- Diff: software/base/src/main/java/brooklyn/entity/brooklynnode/
    @@ -23,10 +23,29 @@
     import brooklyn.util.http.HttpTool;
     import brooklyn.util.http.HttpToolResponse;
      * Helpful methods for making HTTP requests to {@link BrooklynNode} entities.
     public interface EntityHttpClient {
    +    interface ResponseCodePredicates {
    +        static class ResponseCodeHealthyPredicate implements Predicate<Integer>
    +            @Override
    +            public boolean apply(Integer input) {
    +                return HttpTool.isStatusCodeHealthy(input);
    +            }
    +        }
    +        Predicate<Integer> INFORMATIONAL = Range.closed(100, 199);
    --- End diff --
    I have a personal preference for methods rather than static constants, which gives us
future flexibility. That follows the guava convention, such as the method `Predicates.alwaysTrue()`.
In this case I can't see why we'd ever change it, but I'd prefer us sticking to the general
guava pattern.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message