KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > james > imapserver > ImapSession


1 /***********************************************************************
2  * Copyright (c) 2000-2004 The Apache Software Foundation. *
3  * All rights reserved. *
4  * ------------------------------------------------------------------- *
5  * Licensed under the Apache License, Version 2.0 (the "License"); you *
6  * may not use this file except in compliance with the License. You *
7  * may obtain a copy of the License at: *
8  * *
9  * http://www.apache.org/licenses/LICENSE-2.0 *
10  * *
11  * Unless required by applicable law or agreed to in writing, software *
12  * distributed under the License is distributed on an "AS IS" BASIS, *
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or *
14  * implied. See the License for the specific language governing *
15  * permissions and limitations under the License. *
16  ***********************************************************************/

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 JavaDoc;
27 import java.io.PrintWriter JavaDoc;
28 import java.util.List JavaDoc;
29
30 public interface ImapSession extends MailboxEventListener
31 {
32     void okResponse( String JavaDoc command );
33
34     void noResponse( String JavaDoc command );
35
36     void noResponse( String JavaDoc command, String JavaDoc msg );
37
38     void badResponse( String JavaDoc badMsg );
39
40     void notImplementedResponse( String JavaDoc command );
41
42     void taggedResponse( String JavaDoc msg );
43
44     void untaggedResponse( String JavaDoc msg );
45
46     ImapSessionState getState();
47
48     void setState( ImapSessionState state );
49
50     BufferedReader JavaDoc getIn();
51
52     void setIn( BufferedReader JavaDoc in );
53
54     PrintWriter JavaDoc getOut();
55
56     void setOut( PrintWriter JavaDoc out );
57     
58     void setCanParseCommand(boolean canParseCommand);
59     
60     boolean getCanParseCommand();
61
62     void checkSize();
63     
64     void checkExpunge();
65     
66     String JavaDoc getRemoteHost();
67     
68     String JavaDoc getRemoteIP();
69     
70     Logger getSecurityLogger();
71     
72     UsersRepository getUsers();
73     
74     Host getImapHost();
75     
76     IMAPSystem getImapSystem();
77     
78     String JavaDoc getCurrentNamespace();
79     void setCurrentNamespace( String JavaDoc currentNamespace );
80     String JavaDoc getCurrentSeperator();
81     void setCurrentSeperator( String JavaDoc currentSeperator );
82     String JavaDoc getCurrentFolder();
83     void setCurrentFolder( String JavaDoc 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 JavaDoc getCurrentUser();
91     void setCurrentUser( String JavaDoc user );
92     void setSequence( List JavaDoc sequence );
93
94     ImapCommand getImapCommand( String JavaDoc command );
95     
96     boolean closeConnection(int exitStatus,
97                                      String JavaDoc message1,
98                                      String JavaDoc message2 );
99     
100     void logACE( AccessControlException ace );
101     void logAZE( AuthorizationException aze );
102     
103 // ACLMailbox getBox( String user, String mailboxName );
104

105     List JavaDoc decodeSet( String JavaDoc rawSet, int exists ) throws IllegalArgumentException JavaDoc;
106 }
107
Popular Tags