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

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


    private void handleResponseException(final ImapProcessor.Responder responder, MailboxException e, final HumanReadableText message, ImapSession session) {
        session.getLog().info(message.toString());
        session.getLog().debug(message.toString(), e);
        // TODO: consider whether error message should be passed to the user
        final StatusResponse response = factory.untaggedNo(message);
        responder.respond(response);
    }
View Full Code Here


        final StatusResponse response = factory.untaggedNo(message);
        responder.respond(response);
    }

    protected void okComplete(final ImapCommand command, final String tag, final ImapProcessor.Responder responder) {
        final StatusResponse response = factory.taggedOk(tag, command, HumanReadableText.COMPLETED);
        responder.respond(response);
    }
View Full Code Here

        final StatusResponse response = factory.taggedOk(tag, command, HumanReadableText.COMPLETED);
        responder.respond(response);
    }

    protected void okComplete(final ImapCommand command, final String tag, final ResponseCode code, final ImapProcessor.Responder responder) {
        final StatusResponse response = factory.taggedOk(tag, command, HumanReadableText.COMPLETED, code);
        responder.respond(response);
    }
View Full Code Here

        final StatusResponse response = factory.taggedOk(tag, command, HumanReadableText.COMPLETED, code);
        responder.respond(response);
    }

    protected void no(final ImapCommand command, final String tag, final ImapProcessor.Responder responder, final HumanReadableText displayTextKey) {
        final StatusResponse response = factory.taggedNo(tag, command, displayTextKey);
        responder.respond(response);
    }
View Full Code Here

        final StatusResponse response = factory.taggedNo(tag, command, displayTextKey);
        responder.respond(response);
    }

    protected void no(final ImapCommand command, final String tag, final ImapProcessor.Responder responder, final HumanReadableText displayTextKey, final StatusResponse.ResponseCode responseCode) {
        final StatusResponse response = factory.taggedNo(tag, command, displayTextKey, responseCode);
        responder.respond(response);
    }
View Full Code Here

        final StatusResponse response = factory.taggedNo(tag, command, displayTextKey, responseCode);
        responder.respond(response);
    }

    protected void taggedBad(final ImapCommand command, final String tag, final ImapProcessor.Responder responder, final HumanReadableText e) {
        StatusResponse response = factory.taggedBad(tag, command, e);

        responder.respond(response);
    }
View Full Code Here

        responder.respond(response);
    }

    protected void bye(final ImapProcessor.Responder responder) {
        final StatusResponse response = factory.bye(HumanReadableText.BYE);
        responder.respond(response);
    }
View Full Code Here

        final StatusResponse response = factory.bye(HumanReadableText.BYE);
        responder.respond(response);
    }

    protected void bye(final ImapProcessor.Responder responder, final HumanReadableText key) {
        final StatusResponse response = factory.bye(key);
        responder.respond(response);
    }
View Full Code Here

                            }
                        }
                    }
                    session.popLineHandler();
                    if (!DONE.equals(line.toUpperCase(Locale.US))) {
                        StatusResponse response = getStatusResponseFactory().taggedBad(tag, command, HumanReadableText.INVALID_COMMAND);
                        responder.respond(response);
                    } else {
                        okComplete(command, tag, responder);

                    }
                    idleActive.set(false);
                }
            });

            // Check if we should send heartbeats
            if (heartbeatInterval > 0) {
                heartbeatExecutor.schedule(new Runnable() {

                    public void run() {
                        // check if we need to cancel the Runnable
                        // See IMAP-275
                        if (session.getState() != ImapSessionState.LOGOUT && idleActive.get()) {
                            // Send a heartbeat to the client to make sure we
                            // reset the idle timeout. This is kind of the same
                            // workaround as dovecot use.
                            //
                            // This is mostly needed because of the broken
                            // outlook client, but can't harm for other clients
                            // too.
                            // See IMAP-272
                            StatusResponse response = getStatusResponseFactory().untaggedOk(HumanReadableText.HEARTBEAT);
                            responder.respond(response);
                           
                            // schedule the heartbeat again for the next interval
                            heartbeatExecutor.schedule(this, heartbeatInterval, heartbeatIntervalUnit);
                        }
View Full Code Here

    /**
     * @see org.hamcrest.Matcher#matches(java.lang.Object)
     */
    public boolean matches(Object o) {
        if (o instanceof StatusResponse) {
            StatusResponse sr = (StatusResponse) o;
            return this.serverResponseType.equals(sr.getServerResponseType());
        }
        return false;
    }
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.