⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 capabilitycommand.java

📁 java 开发的邮件服务器平台。支持以下协议。 协议可以修改为自己的专门标识
💻 JAVA
字号:
/*********************************************************************** * Copyright (c) 2000-2004 The Apache Software Foundation.             * * All rights reserved.                                                * * ------------------------------------------------------------------- * * Licensed under the Apache License, Version 2.0 (the "License"); you * * may not use this file except in compliance with the License. You    * * may obtain a copy of the License at:                                * *                                                                     * *     http://www.apache.org/licenses/LICENSE-2.0                      * *                                                                     * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS,   * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or     * * implied.  See the License for the specific language governing       * * permissions and limitations under the License.                      * ***********************************************************************/package org.apache.james.imapserver.commands;import org.apache.james.imapserver.ImapRequestLineReader;import org.apache.james.imapserver.ImapResponse;import org.apache.james.imapserver.ImapSession;import org.apache.james.imapserver.ProtocolException;/** * Handles processeing for the CAPABILITY imap command. * * * @version $Revision: 1.3.2.3 $ */class CapabilityCommand extends CommandTemplate{    public static final String NAME = "CAPABILITY";    public static final String ARGS = null;    public static final String CAPABILITY_RESPONSE = NAME + SP + VERSION + SP + CAPABILITIES;    /** @see CommandTemplate#doProcess */    protected void doProcess( ImapRequestLineReader request,                              ImapResponse response,                              ImapSession session )            throws ProtocolException    {        parser.endLine( request );        response.untaggedResponse( CAPABILITY_RESPONSE );        session.unsolicitedResponses( response );        response.commandComplete( this );    }    /** @see ImapCommand#getName */    public String getName()    {        return NAME;    }    /** @see CommandTemplate#getArgSyntax */    public String getArgSyntax()    {        return ARGS;    }}/*6.1.1.  CAPABILITY Command   Arguments:  none   Responses:  REQUIRED untagged response: CAPABILITY   Result:     OK - capability completed               BAD - command unknown or arguments invalid      The CAPABILITY command requests a listing of capabilities that the      server supports.  The server MUST send a single untagged      CAPABILITY response with "IMAP4rev1" as one of the listed      capabilities before the (tagged) OK response.  This listing of      capabilities is not dependent upon connection state or user.  It      is therefore not necessary to issue a CAPABILITY command more than      once in a connection.      A capability name which begins with "AUTH=" indicates that the      server supports that particular authentication mechanism.  All      such names are, by definition, part of this specification.  For      example, the authorization capability for an experimental      "blurdybloop" authenticator would be "AUTH=XBLURDYBLOOP" and not      "XAUTH=BLURDYBLOOP" or "XAUTH=XBLURDYBLOOP".      Other capability names refer to extensions, revisions, or      amendments to this specification.  See the documentation of the      CAPABILITY response for additional information.  No capabilities,      beyond the base IMAP4rev1 set defined in this specification, are      enabled without explicit client action to invoke the capability.      See the section entitled "Client Commands -      Experimental/Expansion" for information about the form of site or      implementation-specific capabilities.   Example:    C: abcd CAPABILITY               S: * CAPABILITY IMAP4rev1 AUTH=KERBEROS_V4               S: abcd OK CAPABILITY completed7.2.1.  CAPABILITY Response   Contents:   capability listing      The CAPABILITY response occurs as a result of a CAPABILITY      command.  The capability listing contains a space-separated      listing of capability names that the server supports.  The      capability listing MUST include the atom "IMAP4rev1".      A capability name which begins with "AUTH=" indicates that the      server supports that particular authentication mechanism.      Other capability names indicate that the server supports an      extension, revision, or amendment to the IMAP4rev1 protocol.      Server responses MUST conform to this document until the client      issues a command that uses the associated capability.      Capability names MUST either begin with "X" or be standard or      standards-track IMAP4rev1 extensions, revisions, or amendments      registered with IANA.  A server MUST NOT offer unregistered or      non-standard capability names, unless such names are prefixed with      an "X".      Client implementations SHOULD NOT require any capability name      other than "IMAP4rev1", and MUST ignore any unknown capability      names.   Example:    S: * CAPABILITY IMAP4rev1 AUTH=KERBEROS_V4 XPIG-LATIN*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -