本文整理汇总了Java中com.fsck.k9.mail.transport.SmtpTransport.createUri方法的典型用法代码示例。如果您正苦于以下问题:Java SmtpTransport.createUri方法的具体用法?Java SmtpTransport.createUri怎么用?Java SmtpTransport.createUri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.fsck.k9.mail.transport.SmtpTransport
的用法示例。
在下文中一共展示了SmtpTransport.createUri方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTransportUri
import com.fsck.k9.mail.transport.SmtpTransport; //导入方法依赖的package包/类
/**
* Creates a transport URI from the information supplied in the {@link ServerSettings} object.
*
* @param server
* The {@link ServerSettings} object that holds the server settings.
*
* @return A transport URI that holds the same information as the {@code server} parameter.
*
* @see SmtpTransport#createUri(ServerSettings)
* @see WebDavTransport#createUri(ServerSettings)
*/
public static String createTransportUri(ServerSettings server) {
if (Type.SMTP == server.type) {
return SmtpTransport.createUri(server);
} else if (Type.WebDAV == server.type) {
return WebDavTransport.createUri(server);
} else {
throw new IllegalArgumentException("Not a valid transport URI");
}
}
示例2: createTransportUri
import com.fsck.k9.mail.transport.SmtpTransport; //导入方法依赖的package包/类
/**
* Creates a transport URI from the information supplied in the {@link ServerSettings} object.
*
* @param server
* The {@link ServerSettings} object that holds the server settings.
*
* @return A transport URI that holds the same information as the {@code server} parameter.
*
* @see SmtpTransport#createUri(ServerSettings)
* @see WebDavTransport#createUri(ServerSettings)
*/
public static String createTransportUri(ServerSettings server) {
if (SmtpTransport.TRANSPORT_TYPE.equals(server.type)) {
return SmtpTransport.createUri(server);
} else if (WebDavTransport.TRANSPORT_TYPE.equals(server.type)) {
return WebDavTransport.createUri(server);
} else {
throw new IllegalArgumentException("Not a valid transport URI");
}
}