Github user vanzin commented on a diff in the pull request:
    --- Diff: 
    @@ -120,6 +130,38 @@ public synchronized void dispose() {
    +   * Negotiate extra encryption options for SASL
    +   * @param client is transport client used to connect to peer.
    +   * @param conf contain client transport configuration.
    +   * @throws IOException
    +   * @return The object represent the result of negotiate.
    +   */
    +  public Object negotiate(TransportClient client, TransportConf conf) 
throws IOException {
    --- End diff --
    Since this is now AES-specific, how about changing the name to 
`negotiateSessionKey` or something, and returning `AesCipher`? Then you 
wouldn't need the `instanceof` checks in the callers, which are kinda weird.
    Another alternative would be to have this method return some new interface 
with a `addToChannel` method, and have different implementations for the 
SASL-based encryption and AES. But that feels like overkill right now.

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.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to