1 17 18 package org.apache.james.imapserver; 19 20 import org.apache.avalon.framework.logger.Logger; 21 import org.apache.james.imapserver.AccessControlException; 22 import org.apache.james.imapserver.AuthorizationException; 23 import org.apache.james.imapserver.commands.ImapCommand; 24 import org.apache.james.services.UsersRepository; 25 26 import java.io.BufferedReader ; 27 import java.io.PrintWriter ; 28 import java.util.List ; 29 30 public interface ImapSession extends MailboxEventListener 31 { 32 void okResponse( String command ); 33 34 void noResponse( String command ); 35 36 void noResponse( String command, String msg ); 37 38 void badResponse( String badMsg ); 39 40 void notImplementedResponse( String command ); 41 42 void taggedResponse( String msg ); 43 44 void untaggedResponse( String msg ); 45 46 ImapSessionState getState(); 47 48 void setState( ImapSessionState state ); 49 50 BufferedReader getIn(); 51 52 void setIn( BufferedReader in ); 53 54 PrintWriter getOut(); 55 56 void setOut( PrintWriter out ); 57 58 void setCanParseCommand(boolean canParseCommand); 59 60 boolean getCanParseCommand(); 61 62 void checkSize(); 63 64 void checkExpunge(); 65 66 String getRemoteHost(); 67 68 String getRemoteIP(); 69 70 Logger getSecurityLogger(); 71 72 UsersRepository getUsers(); 73 74 Host getImapHost(); 75 76 IMAPSystem getImapSystem(); 77 78 String getCurrentNamespace(); 79 void setCurrentNamespace( String currentNamespace ); 80 String getCurrentSeperator(); 81 void setCurrentSeperator( String currentSeperator ); 82 String getCurrentFolder(); 83 void setCurrentFolder( String currentFolder ); 84 ACLMailbox getCurrentMailbox(); 85 void setCurrentMailbox( ACLMailbox currentMailbox ); 86 boolean isCurrentIsReadOnly(); 87 void setCurrentIsReadOnly( boolean currentIsReadOnly ); 88 boolean isConnectionClosed(); 89 void setConnectionClosed( boolean connectionClosed ); 90 String getCurrentUser(); 91 void setCurrentUser( String user ); 92 void setSequence( List sequence ); 93 94 ImapCommand getImapCommand( String command ); 95 96 boolean closeConnection(int exitStatus, 97 String message1, 98 String message2 ); 99 100 void logACE( AccessControlException ace ); 101 void logAZE( AuthorizationException aze ); 102 103 105 List decodeSet( String rawSet, int exists ) throws IllegalArgumentException ; 106 } 107 | Popular Tags |