Github user violetagg commented on a diff in the pull request:

    https://github.com/apache/tomcat/pull/56#discussion_r119539287
  
    --- Diff: java/org/apache/catalina/tribes/Channel.java ---
    @@ -369,4 +369,58 @@
          */
         public void setName(String name);
     
    +    /**
    +     * Translates the name of an option to its integer value
    +     * @param opt The name of the option
    +     * @return
    +     */
    +    public static int getOptionValue(String opt){
    +
    +        if ("asynchronous".equals(opt) || "async".equals(opt))
    +            return SEND_OPTIONS_ASYNCHRONOUS;
    +
    +        if ("byte_message".equals(opt) || "byte".equals(opt))
    +            return SEND_OPTIONS_BYTE_MESSAGE;
    +
    +        if ("multicast".equals(opt))
    +            return SEND_OPTIONS_MULTICAST;
    +
    +        if ("secure".equals(opt))
    +            return SEND_OPTIONS_SECURE;
    +
    +        if ("synchronized_ack".equals(opt) || "sync".equals(opt))
    +            return SEND_OPTIONS_SYNCHRONIZED_ACK;
    +
    +        if ("udp".equals(opt))
    +            return SEND_OPTIONS_UDP;
    +
    +        if ("use_ack".equals(opt))
    +            return SEND_OPTIONS_USE_ACK;
    +
    +        return 0;
    +    }
    +
    +    /**
    +     * Translates a comma separated list of option names to their 
bitwise-ORd value
    +     * @param input A comma separated list of options, e.g. 
"async,multicast"
    +     * @return
    +     */
    +    public static int parseChannelSendOptions(String input){
    +
    +        try {
    +
    +            return Integer.parseInt(input);
    +        }
    +        catch (NumberFormatException nfe){}
    +
    --- End diff --
    
    Hi,
    
    From code format point of view: Keep the closing curly brace with "catch" 
on the same line.
    
    Regards,
    Violeta


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to