/**
* Licensed to niosmtp developers ('niosmtp') under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* niosmtp licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.normanmaurer.niosmtp.delivery.impl;

import me.normanmaurer.niosmtp.delivery.Authentication;
import me.normanmaurer.niosmtp.delivery.SMTPDeliveryAgentConfig;
import me.normanmaurer.niosmtp.transport.impl.SMTPClientConfigImpl;

/**
 * 
 * @author Norman Maurer
 *
 */
public class SMTPDeliveryAgentConfigImpl extends SMTPClientConfigImpl implements SMTPDeliveryAgentConfig {

    private String heloName = DEFAULT_HELO_NAME;

    private PipeliningMode pipeliningMode = PipeliningMode.TRY;;

    private Authentication auth;

    /**
     * 
     * Set the name which will be used for EHLO/HELO. Default is
     * {@link #DEFAULT_HELO_NAME}
     * 
     * - *
     * 
     * @param heloName
     */
    public void setHeloName(String heloName) {
        this.heloName = heloName;
    }

    @Override
    public String getHeloName() {
        return heloName;
    }

    @Override
    public PipeliningMode getPipeliningMode() {
        return pipeliningMode;
    }

    /**
     * 
     * Specify if <code>PIPELINING</code> should get used if possible. Default
     * is {@link PipeliningMode#TRY}
     * 
     * 
     * 
     * @param pipeliningMode
     */
    public void setPipeliningMode(PipeliningMode pipeliningMode) {
        this.pipeliningMode = pipeliningMode;
    }

    @Override
    public Authentication getAuthentication() {
        return auth;
    }

    /**
     * 
     * Set the {@link Authentication} to use. If you don't want to use AUTH just
     * use <code>null</code> as parameter.
     * 
     * Default is <code>null</code>
     * 
     * 
     * 
     * @param auth
     */
    public void setAuthentication(Authentication auth) {
        this.auth = auth;
    }

}
@@ -835,16 +835,54 @@
 mpl;%0D%0A%0D%0A
+import java.net.InetSocketAddress;%0D%0A%0D%0A
 import m
@@ -2600,12 +2600,1344 @@
 %0D%0A    %7D%0D
+%0A    %0D%0A    /**%0D%0A     * Return a immutable copy of this %7B@link SMTPDeliveryAgentConfigImpl%7D%0D%0A     * %0D%0A     * @return immutable%0D%0A     */%0D%0A    public SMTPDeliveryAgentConfig immutable() %7B%0D%0A        return new ImmutableSMTPDeliveryAgentConfig(this);%0D%0A    %7D%0D%0A    %0D%0A    private final static class ImmutableSMTPDeliveryAgentConfig implements SMTPDeliveryAgentConfig %7B%0D%0A        private final SMTPDeliveryAgentConfig config;%0D%0A        %0D%0A        public ImmutableSMTPDeliveryAgentConfig(SMTPDeliveryAgentConfig config) %7B%0D%0A            this.config = config;%0D%0A        %7D%0D%0A        @Override%0D%0A        public int getConnectionTimeout() %7B%0D%0A            return config.getConnectionTimeout();%0D%0A        %7D%0D%0A%0D%0A        @Override%0D%0A        public int getResponseTimeout() %7B%0D%0A            return config.getResponseTimeout();%0D%0A        %7D%0D%0A%0D%0A        @Override%0D%0A        public InetSocketAddress getLocalAddress() %7B%0D%0A            return config.getLocalAddress();%0D%0A        %7D%0D%0A%0D%0A        @Override%0D%0A        public String getHeloName() %7B%0D%0A            return config.getHeloName();%0D%0A        %7D%0D%0A%0D%0A        @Override%0D%0A        public PipeliningMode getPipeliningMode() %7B%0D%0A            return config.getPipeliningMode();%0D%0A        %7D%0D%0A%0D%0A        @Override%0D%0A        public Authentication getAuthentication() %7B%0D%0A            return config.getAuthentication();%0D%0A        %7D%0D%0A        %0D%0A    %7D%0D
 %0A%0D%0A%7D

Add helper method for immutable copy of the config