/** * Gets the name of the given authentication method suitable for the server. * @param method The authentication method to get the name for. * @return The name of the given authentication method suitable for the server. */ public static final String getAuthName(AUTH_METHOD method) { if (method.equals(AUTH_METHOD.PLAIN)) { return "PLAIN"; } else if (method.equals(AUTH_METHOD.CRAM_MD5)) { return "CRAM-MD5"; } else if (method.equals(AUTH_METHOD.LOGIN)) { return "LOGIN"; } else if (method.equals(AUTH_METHOD.XOAUTH)) { return "XOAUTH"; } else { return null; } } }