Example usage for org.apache.commons.net.pop3 POP3SClient setEnabledProtocols

List of usage examples for org.apache.commons.net.pop3 POP3SClient setEnabledProtocols

Introduction

In this page you can find the example usage for org.apache.commons.net.pop3 POP3SClient setEnabledProtocols.

Prototype

public void setEnabledProtocols(String[] protocolVersions) 

Source Link

Document

Controls which particular protocol versions are enabled for use on this connection.

Usage

From source file:com.adaptris.mail.Pop3sReceiverFactory.java

@Override
POP3SClient preConnectConfigure(POP3Client client) throws MailException {
    POP3SClient pop3s = (POP3SClient) super.preConnectConfigure(client);
    if (alwaysTrust()) {
        pop3s.setTrustManager(new AlwaysTrustManager());
    }/*from   w w  w .  j  a  v  a2 s .c om*/
    if (getCipherSuites() != null) {
        pop3s.setEnabledCipherSuites(asArray(getCipherSuites()));
    }
    if (getProtocols() != null) {
        pop3s.setEnabledProtocols(asArray(getProtocols()));
    }
    return pop3s;
}