org.apache.james.imapserver
Class SingleThreadedConnectionHandler

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--org.apache.james.BaseConnectionHandler
              |
              +--org.apache.james.imapserver.BaseCommand
                    |
                    +--org.apache.james.imapserver.SingleThreadedConnectionHandler
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.cornerstone.services.connection.ConnectionHandler, org.apache.avalon.framework.activity.Disposable, java.util.EventListener, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.logger.Loggable, MailboxEventListener, java.io.Serializable, org.apache.avalon.cornerstone.services.scheduler.Target

public class SingleThreadedConnectionHandler
extends BaseCommand
implements org.apache.avalon.cornerstone.services.connection.ConnectionHandler, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.cornerstone.services.scheduler.Target, MailboxEventListener

An IMAP Handler handles one IMAP connection. TBC - it may spawn worker threads someday.

Based on SMTPHandler and POP3Handler by Federico Barbieri

Version:
0.1 on 14 Dec 2000
Author:
Charles Benett
See Also:
Serialized Form

Fields inherited from class org.apache.james.BaseConnectionHandler
helloName, timeout
 
Constructor Summary
SingleThreadedConnectionHandler()
           
 
Method Summary
 void checkSize()
           
 void compose(org.apache.avalon.framework.component.ComponentManager componentManager)
           
 void dispose()
           
 java.io.OutputStream getOutputStream()
           
 java.io.PrintWriter getPrintWriter()
           
 java.lang.String getUser()
           
 void handleConnection(java.net.Socket connection)
          Handle a connection.
 void initialize()
           
 void logACE(AccessControlException ace)
           
 void logAZE(AuthorizationException aze)
           
 void receiveEvent(MailboxEvent me)
           
 void targetTriggered(java.lang.String triggerName)
           
 
Methods inherited from class org.apache.james.imapserver.BaseCommand
decodeSet, decodeUIDSet
 
Methods inherited from class org.apache.james.BaseConnectionHandler
configure
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable
getLogger, setLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.avalon.framework.configuration.Configurable
configure
 

Constructor Detail

SingleThreadedConnectionHandler

public SingleThreadedConnectionHandler()
Method Detail

compose

public void compose(org.apache.avalon.framework.component.ComponentManager componentManager)
             throws org.apache.avalon.framework.component.ComponentException
Specified by:
compose in interface org.apache.avalon.framework.component.Composable

initialize

public void initialize()
                throws java.lang.Exception
Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable

handleConnection

public void handleConnection(java.net.Socket connection)
                      throws java.io.IOException
Handle a connection. This handler is responsible for processing connections as they occur.
Specified by:
handleConnection in interface org.apache.avalon.cornerstone.services.connection.ConnectionHandler
Parameters:
connection - the connection
Throws:
java.io.IOException - if an error reading from socket occurs
java.net.ProtocolException - if an error handling connection occurs

targetTriggered

public void targetTriggered(java.lang.String triggerName)
Specified by:
targetTriggered in interface org.apache.avalon.cornerstone.services.scheduler.Target

dispose

public void dispose()
Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable

receiveEvent

public void receiveEvent(MailboxEvent me)
Specified by:
receiveEvent in interface MailboxEventListener

logACE

public void logACE(AccessControlException ace)

logAZE

public void logAZE(AuthorizationException aze)

getPrintWriter

public java.io.PrintWriter getPrintWriter()

getOutputStream

public java.io.OutputStream getOutputStream()

getUser

public java.lang.String getUser()

checkSize

public void checkSize()


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.