1 17 18 package org.apache.james.imapserver.commands; 19 20 import org.apache.james.imapserver.ImapRequest; 21 import org.apache.james.imapserver.ImapSession; 22 import org.apache.james.imapserver.ImapSessionState; 23 24 import java.util.List ; 25 26 class CapabilityCommand extends CommandTemplate 27 { 28 String CAPABILITY_RESPONSE = "CAPABILITY " + VERSION; 30 public CapabilityCommand() 31 { 32 this.commandName = "CAPABILITY"; 33 } 34 35 protected boolean doProcess( ImapRequest request, ImapSession session, List args ) 36 { 37 session.untaggedResponse( CAPABILITY_RESPONSE ); 38 if ( session.getState() == ImapSessionState.SELECTED ) { 39 session.checkSize(); 40 session.checkExpunge(); 41 } 42 session.okResponse( request.getCommand() ); 43 logCommand( request, session ); 44 return true; 45 } 46 } 47 | Popular Tags |