Package org.apache.james.imap.api

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


     */
    protected void doProcess(StoreRequest request, ImapSession session, String tag, ImapCommand command, Responder responder) {
        final IdRange[] idSet = request.getIdSet();
        final boolean useUids = request.isUseUids();
        final long unchangedSince = request.getUnchangedSince();
        ImapCommand imapCommand = command;
       
        try {
            final MessageManager mailbox = getSelectedMailbox(session);
            final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
            final Flags flags = request.getFlags();
View Full Code Here


        final ImapMessage result = decode(command, request, tag, false, session);
        return result;
    }

    public ImapMessage decode(ImapRequestLineReader request, String tag, boolean useUids, ImapSession session) throws DecodingException {
        final ImapCommand command = getCommand();
        final ImapMessage result = decode(command, request, tag, useUids, session);
        return result;
    }
View Full Code Here

        final Type serverResponseType = response.getServerResponseType();
        final String type = asString(serverResponseType);
        final ResponseCode responseCode = response.getResponseCode();
        final String code = asString(responseCode);
        final String tag = response.getTag();
        final ImapCommand command = response.getCommand();
        final HumanReadableText textKey = response.getTextKey();
        final String text = asString(textKey, session);
        final Collection<String> parameters;
        final long number;
        final boolean useParens;
        if (responseCode == null) {
            parameters = null;
            number = -1;
            useParens = false;
        } else {
            parameters = responseCode.getParameters();
            number = responseCode.getNumber();
            useParens = responseCode.useParens();
        }
        //composer.statusResponse(tag, command, type, code, parameters, useParens, number, text);
       
        if (tag == null) {
          composer.untagged();
        } else {
          composer.tag(tag);
        }
        composer.message(type);
        if (responseCode != null) {
          composer.openSquareBracket();
          composer.message(code);
            if (number > -1) {
              composer.message(number);
            }
            if (parameters != null && !parameters.isEmpty()) {
                if (useParens)
                  composer.openParen();
                for (Iterator<String> it = parameters.iterator(); it.hasNext();) {
                    final String parameter = it.next();
                    composer.message(parameter);
                }
                if (useParens)
                  composer.closeParen();
            }
            composer.closeSquareBracket();
        }
        if (command != null) {
          composer.commandName(command.getName());
        }
        if (text != null && !"".equals(text)) {
          composer.message(text);
        }
        composer.end();
View Full Code Here

        final M request = acceptableMessage;
        process(request, responder, session);
    }

    protected final void process(final M message, final Responder responder, final ImapSession session) {
        final ImapCommand command = message.getCommand();
        final String tag = message.getTag();
        doProcess(message, command, tag, responder, session);
    }
View Full Code Here

        final M request = acceptableMessage;
        process(request, responder, session);
    }

    protected final void process(final M message, final Responder responder, final ImapSession session) {
        final ImapCommand command = message.getCommand();
        final String tag = message.getTag();
        doProcess(message, command, tag, responder, session);
    }
View Full Code Here

        }
        final ImapResponseMessage result;
        if (message instanceof ImapRequest) {
            ImapRequest request = (ImapRequest) message;
            final String tag = request.getTag();
            final ImapCommand command = request.getCommand();
            result = factory.taggedBad(tag, command, HumanReadableText.UNKNOWN_COMMAND);
        } else {
            result = factory.untaggedBad(HumanReadableText.UNKNOWN_COMMAND);
        }
        return result;
View Full Code Here

        final Type serverResponseType = response.getServerResponseType();
        final String type = asString(serverResponseType);
        final ResponseCode responseCode = response.getResponseCode();
        final String code = asString(responseCode);
        final String tag = response.getTag();
        final ImapCommand command = response.getCommand();
        final HumanReadableText textKey = response.getTextKey();
        final String text = asString(textKey, session);
        final Collection<String> parameters;
        final long number;
        final boolean useParens;
View Full Code Here

        final ImapMessage result = decode(command, request, tag, false, session);
        return result;
    }

    public ImapMessage decode(ImapRequestLineReader request, String tag, boolean useUids, ImapSession session) throws DecodingException {
        final ImapCommand command = getCommand();
        final ImapMessage result = decode(command, request, tag, useUids, session);
        return result;
    }
View Full Code Here

TOP

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

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.