Package org.apache.james.imap.api

Examples of org.apache.james.imap.api.ImapMessage


        this.processor = processor;
        this.encoder = encoder;
    }

    protected boolean doProcessRequest(ImapRequestLineReader request, ImapResponseComposer response, ImapSession session) {
        ImapMessage message = decoder.decode(request, session);
        final ResponseEncoder responseEncoder = new ResponseEncoder(encoder, response, session);
        processor.process(message, responseEncoder, session);

        final boolean result;
        final IOException failure = responseEncoder.getFailure();
View Full Code Here


     * org.apache.james.imap.decode.ImapRequestLineReader, java.lang.String,
     * org.apache.james.imap.api.process.ImapSession)
     */
    protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
        request.eol();
        final ImapMessage result = new NoopRequest(command, tag);
        return result;
    }
View Full Code Here

     */
    protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
        final String existingName = request.mailbox();
        final String newName = request.mailbox();
        request.eol();
        final ImapMessage result = new RenameRequest(command, existingName, newName, tag);
        return result;
    }
View Full Code Here

     * org.apache.james.imap.api.process.ImapSession)
     */
    protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
        final String mailboxName = request.mailbox();
        request.eol();
        final ImapMessage result = new ExamineRequest(command, mailboxName, tag);
        return result;
    }
View Full Code Here

                                                                                               // comment
                mailboxName = mailboxName.substring(0, mailboxName.length() - 1);
            }
        }
        request.eol();
        final ImapMessage result = new CreateRequest(command, mailboxName, tag);
        return result;
    }
View Full Code Here

     * org.apache.james.imap.decode.ImapRequestLineReader, java.lang.String,
     * org.apache.james.imap.api.process.ImapSession)
     */
    protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
        request.eol();
        final ImapMessage result = new UnselectRequest(tag, command);
        return result;
    }
View Full Code Here

    @Override
    public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
       
        ImapSession session = (ImapSession) attributes.get(ctx.getChannel());
        ImapResponseComposer response = (ImapResponseComposer) ctx.getAttachment();
        ImapMessage message = (ImapMessage) e.getMessage();
        ChannelPipeline cp = ctx.getPipeline();

        try {
            if (cp.get(NettyConstants.EXECUTION_HANDLER) != null) {
                cp.addBefore(NettyConstants.EXECUTION_HANDLER, NettyConstants.HEARTBEAT_HANDLER, heartbeatHandler);
View Full Code Here

        // check if the session was removed before to prevent a harmless NPE. See JAMES-1312
        // Also check if the session was logged out if so there is not need to try to decode it. See JAMES-1341
        if (session != null && session.getState() != ImapSessionState.LOGOUT) {
            try {

                ImapMessage message = decoder.decode(reader, session);

                // if size is != -1 the case was a literal. if thats the case we
                // should not consume the line
                // See JAMES-1199
                if (size == -1) {
View Full Code Here

TOP

Related Classes of org.apache.james.imap.api.ImapMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.