You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by se...@apache.org on 2001/11/26 04:27:29 UTC
cvs commit: jakarta-james/src/java/org/apache/james/pop3server POP3Handler.java
serge 01/11/25 19:27:29
Modified: src/java/org/apache/james/pop3server POP3Handler.java
Log:
Every 20k (configurable) sent during a RETR will notify the scheduler that something is hapenning.
Revision Changes Path
1.2 +14 -1 jakarta-james/src/java/org/apache/james/pop3server/POP3Handler.java
Index: POP3Handler.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/pop3server/POP3Handler.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- POP3Handler.java 2001/05/11 09:26:00 1.1
+++ POP3Handler.java 2001/11/26 03:27:29 1.2
@@ -43,6 +43,7 @@
import org.apache.james.services.UsersStore;
import org.apache.james.BaseConnectionHandler;
import org.apache.james.util.InternetPrintWriter;
+import org.apache.james.util.SchedulerNotifyOutputStream;
import org.apache.mailet.Mail;
/**
@@ -73,6 +74,8 @@
private Vector backupUserMailbox;
private static final Mail DELETED = new MailImpl();
+ private int lengthReset = 20000;
+
private static int AUTHENTICATION_READY = 0;
private static int AUTHENTICATION_USERSET = 1;
private static int TRANSACTION = 2;
@@ -80,6 +83,13 @@
private final static String OK_RESPONSE = "+OK";
private final static String ERR_RESPONSE = "-ERR";
+ public void configure(Configuration configuration)
+ throws ConfigurationException {
+ super.configure(configuration);
+
+ lengthReset = configuration.getChild("lengthReset").getValueAsInteger(20000);
+ }
+
public void compose( final ComponentManager componentManager )
throws ComponentException {
mailServer = (MailServer)componentManager.
@@ -391,7 +401,10 @@
MailImpl mc = (MailImpl) userMailbox.elementAt(num);
if (mc != DELETED) {
out.println(OK_RESPONSE + " Message follows");
- mc.writeMessageTo(outs);
+ SchedulerNotifyOutputStream nouts =
+ new SchedulerNotifyOutputStream(outs, scheduler,
+ this.toString(), lengthReset);
+ mc.writeMessageTo(nouts);
out.println();
out.println(".");
} else {
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>