Package org.apache.james.imap.api.message.response.StatusResponse

Examples of org.apache.james.imap.api.message.response.StatusResponse.ResponseCode


        responder.respond(untaggedOk);
    }

    private void taggedOk(final Responder responder, final String tag, final ImapCommand command, final MetaData metaData, HumanReadableText text) {
        final boolean writeable = metaData.isWriteable() && !openReadOnly;
        final ResponseCode code;
        if (writeable) {
            code = ResponseCode.readWrite();
        } else {
            code = ResponseCode.readOnly();
        }
View Full Code Here


    protected void doEncode(ImapMessage acceptableMessage, ImapResponseComposer composer, ImapSession session) throws IOException {
        StatusResponse response = (StatusResponse) acceptableMessage;
        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();
View Full Code Here

        return result;
    }

    private ImapMessage unsupportedCharset(final String tag, final ImapCommand command) {
        final StatusResponseFactory factory = getStatusResponseFactory();
        final ResponseCode badCharset = StatusResponse.ResponseCode.badCharset(CharsetUtil.getAvailableCharsetNames());
        final StatusResponse result = factory.taggedNo(tag, command, HumanReadableText.BAD_CHARSET, badCharset);
        return result;
    }
View Full Code Here

        responder.respond(untaggedOk);
    }

    private void taggedOk(final Responder responder, final String tag, final ImapCommand command, final MetaData metaData) {
        final boolean writeable = metaData.isWriteable() && !openReadOnly;
        final ResponseCode code;
        if (writeable) {
            code = ResponseCode.readWrite();
        } else {
            code = ResponseCode.readOnly();
        }
View Full Code Here

        return result;
    }

    private ImapMessage unsupportedCharset(final String tag, final ImapCommand command) {
        final StatusResponseFactory factory = getStatusResponseFactory();
        final ResponseCode badCharset = StatusResponse.ResponseCode.badCharset(CharsetUtil.getAvailableCharsetNames());
        final StatusResponse result = factory.taggedNo(tag, command, HumanReadableText.BAD_CHARSET, badCharset);
        return result;
    }
View Full Code Here

    protected void doEncode(ImapMessage acceptableMessage, ImapResponseComposer composer, ImapSession session) throws IOException {
        StatusResponse response = (StatusResponse) acceptableMessage;
        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 = 0;
            useParens = false;
        } else {
            parameters = responseCode.getParameters();
            number = responseCode.getNumber();
            useParens = responseCode.useParens();
        }
        composer.statusResponse(tag, command, type, code, parameters, useParens, number, text);
    }
View Full Code Here

TOP

Related Classes of org.apache.james.imap.api.message.response.StatusResponse.ResponseCode

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.