All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nervousync.mail.operator.ReceiveOperator Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
/*
 * Licensed to the Nervousync Studio (NSYC) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF 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 org.nervousync.mail.operator;

import jakarta.mail.Folder;
import jakarta.mail.Message;
import jakarta.mail.MessagingException;
import org.nervousync.mail.config.MailConfig;

import java.util.List;
import java.util.Properties;

/**
 * 

Interface class for e-mail receive operator

*

电子邮件接收器的接口

* * @author Steven Wee [email protected] * @version $Revision: 1.0.0 $ $Date: Dec 10, 2019 15:47:26 $ */ public interface ReceiveOperator { /** *

Read UID string by given folder and message instance

*

根据给定的电子邮件目录实例对象和邮件信息实例对象读取唯一识别ID字符串

* * @param folder E-mail folder instance * 电子邮件目录实例对象 * @param message E-mail message instance * 电子邮件信息实例对象 * * @return Read UID string * 读取的唯一识别ID字符串 * * @throws MessagingException * If an error occurs when read UID string * 当读取唯一识别ID字符串时出现异常 */ String readUID(final Folder folder, final Message message) throws MessagingException; /** *

Read E-mail message by given folder and message UID string

*

从给定的电子邮件目录中读取唯一识别ID字符串标识的电子邮件信息

* * @param folder E-mail folder instance * 电子邮件目录实例对象 * @param uid UID string * 唯一标识ID字符串 * * @return Read e-mail message instance * 读取的电子邮件信息实例对象 * * @throws MessagingException * If an error occurs when read UID string * 当读取唯一识别ID字符串时出现异常 */ Message readMessage(final Folder folder, final String uid) throws MessagingException; /** *

Read E-mail message list by given folder and message UID string array

*

从给定的电子邮件目录中读取唯一识别ID字符串数组标识的电子邮件信息列表

* * @param folder E-mail folder instance * 电子邮件目录实例对象 * @param uidArrays UID string * 唯一标识ID字符串 * * @return Read e-mail message instance list * 读取的电子邮件信息实例对象列表 * * @throws MessagingException * If an error occurs when read UID string * 当读取唯一识别ID字符串时出现异常 */ List readMessages(final Folder folder, final String... uidArrays) throws MessagingException; /** *

Convert given e-mail server configure instance to Properties instance

*

Generated Properties instance is using for connect to E-mail server

*

转换给定的电子邮件配置实例对象为Properties实例对象

*

生成的Properties实例对象用于连接到电子邮件服务器

* * @param serverConfig Server configure information * 服务器配置 * * @return Generated Properties instance * 生成的Properties实例对象 */ Properties readConfig(final MailConfig.ServerConfig serverConfig); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy