Examples of ResponseCode


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

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

    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

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

        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

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) {
        final boolean writeable = metaData.isWriteable() && !openReadOnly;
        final ResponseCode code;
        if (writeable) {
            code = ResponseCode.readWrite();
        } else {
            code = ResponseCode.readOnly();
        }
View Full Code Here

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

        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

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

    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

Examples of org.cipango.dns.section.HeaderSection.ResponseCode

   
      DnsMessage query = new DnsMessage(record);
      DnsMessage answer = _dnsClient.resolve(query);
      incrementIteration();
     
      ResponseCode responseCode = answer.getHeaderSection().getResponseCode();
      if (responseCode == ResponseCode.NAME_ERROR)
      {
        _dnsClient.getCache().addNegativeRecord(query, answer);
        throw new UnknownHostException(_record.getName().toString());
      }
View Full Code Here

Examples of org.jscsi.scsi.protocol.sense.exceptions.SenseException.ResponseCode

   public SenseData decode(ByteBuffer buffer) throws IOException
   {
      DataInputStream in = new DataInputStream(new ByteBufferInputStream(buffer));

      int b1 = in.readUnsignedByte();
      ResponseCode code = ResponseCode.valueOf((byte) (b1 & 0x7F)); // throws IOException

      SenseData sense = null;

      switch (code)
      {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.