@@ -0,0 +1,3608 @@
+/****************************************************************%0A * Licensed to the Apache Software Foundation (ASF) under one   *%0A * or more contributor license agreements.  See the NOTICE file *%0A * distributed with this work for additional information        *%0A * regarding copyright ownership.  The ASF licenses this file   *%0A * to you under the Apache License, Version 2.0 (the            *%0A * %22License%22); you may not use this file except in compliance   *%0A * with the License.  You may obtain a copy of the License at   *%0A *                                                              *%0A *   http://www.apache.org/licenses/LICENSE-2.0                 *%0A *                                                              *%0A * Unless required by applicable law or agreed to in writing,   *%0A * software distributed under the License is distributed on an  *%0A * %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *%0A * KIND, either express or implied.  See the License for the    *%0A * specific language governing permissions and limitations      *%0A * under the License.                                           *%0A ****************************************************************/%0A%0A%0A%0Apackage org.apache.james.pop3server;%0A%0A%0Aimport java.util.List;%0A%0Aimport org.apache.james.protocols.api.TLSSupportedSession;%0Aimport org.apache.james.services.MailRepository;%0Aimport org.apache.mailet.Mail;%0A%0A/**%0A * All the handlers access this interface to communicate with%0A * POP3Handler object%0A */%0A%0Apublic interface POP3Session extends TLSSupportedSession %7B%0A%0A    /**%0A     * A placeholder for emails deleted during the course of the POP3 transaction.  %0A     * This Mail instance is used to enable fast checks as to whether an email has been%0A     * deleted from the inbox.%0A     */%0A    public final static String DELETED =%22DELETED_MAIL%22;%0A   %0A    // Authentication states for the POP3 interaction%0A    /** Waiting for user id */%0A    public final static int AUTHENTICATION_READY = 0;%0A    /** User id provided, waiting for password */%0A    public final static int AUTHENTICATION_USERSET = 1;  %0A    /**%0A     * A valid user id/password combination has been provided.%0A     * In this state the client can access the mailbox%0A     * of the specified user.%0A     */%0A    public final static int TRANSACTION = 2;              %0A%0A    /**%0A     * Returns POP3Handler service wide configuration%0A     *%0A     * @return POP3HandlerConfigurationData%0A     */%0A    POP3HandlerConfigurationData getConfigurationData();%0A    %0A    /**%0A     * Returns the current handler state%0A     *%0A     * @return handler state%0A     */%0A    int getHandlerState();%0A%0A    /**%0A     * Sets the new handler state%0A     * %0A     * @param handlerState state%0A     */%0A    void setHandlerState(int handlerState);%0A%0A    /**%0A     * Returns the current user inbox%0A     *%0A     * @return MailRepository%0A     */%0A    MailRepository getUserInbox();%0A%0A    /**%0A     * Sets the user's mail repository%0A     * %0A     * @param userInbox userInbox%0A     */%0A    void setUserInbox(MailRepository userInbox);%0A%0A    /**%0A     * Returns the mail list contained in the mailbox%0A     * %0A     * @return mailbox content%0A     */%0A    List%3CMail%3E getUserMailbox();%0A%0A    /**%0A     * Sets a new mailbox content%0A     * %0A     * @param userMailbox mailbox%0A     */%0A    void setUserMailbox(List%3CMail%3E userMailbox);%0A    %0A    /**%0A     * Returns the backup mailbox%0A     * %0A     * @return list backup%0A     */%0A    List%3CMail%3E getBackupUserMailbox();%0A%0A%0A    /**%0A     * Sets a new backup mailbox content%0A     * %0A     * @param backupUserMailbox the mailbox backup%0A     */%0A    void setBackupUserMailbox(List%3CMail%3E backupUserMailbox);%0A%7D%0A%0A

copy pop3 stuff