Author: norman Date: Sat Aug 5 14:16:50 2006 New Revision: 429054 URL: http://svn.apache.org/viewvc?rev=429054&view=rev Log: Add javadocs
Modified: james/server/sandbox/handlerapi2/src/java/org/apache/james/smtpserver/SMTPHandler.java james/server/sandbox/handlerapi2/src/java/org/apache/james/smtpserver/SMTPSession.java Modified: james/server/sandbox/handlerapi2/src/java/org/apache/james/smtpserver/SMTPHandler.java URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi2/src/java/org/apache/james/smtpserver/SMTPHandler.java?rev=429054&r1=429053&r2=429054&view=diff ============================================================================== --- james/server/sandbox/handlerapi2/src/java/org/apache/james/smtpserver/SMTPHandler.java (original) +++ james/server/sandbox/handlerapi2/src/java/org/apache/james/smtpserver/SMTPHandler.java Sat Aug 5 14:16:50 2006 @@ -194,6 +194,7 @@ */ protected void handleProtocol() throws IOException { + // Add defaul IOState ioState.add((IOState) this); smtpID = random.nextInt(1024) + ""; @@ -661,31 +662,40 @@ public void setSMTPResponse(SMTPResponse response) { this.response = response; } - + /** - * Reset the SMTPResponse to the default state + * @see org.apache.james.smtpserver.SMTPSession#pushIOState(IOState) */ - private void resetSMTPResponse() { - getSMTPResponse().setSMTPCode(DEFAULT_SMTP_CODE); - getSMTPResponse().setSMTPResponse(DEFAULT_SMTP_RESPONSE); - } - public void pushIOState(IOState io) { ioState.add(0, io); } + /** + * @see org.apache.james.smtpserver.SMTPSession#popIOState() + */ public void popIOState() { ioState.remove(0); } + /** + * @see org.apache.james.smtpserver.SMTPSession#getIOState() + */ public IOState getIOState() { return (IOState) ioState.get(0); } + /** + * @see org.apache.james.smtpserver.SMTPSession#doChain() + */ public void doChain() { doChain = true; } + /** + * Proccess the next IOState + * + * @param data The data to process + */ private void process(String data) { getIOState().readResponse(this, data); } Modified: james/server/sandbox/handlerapi2/src/java/org/apache/james/smtpserver/SMTPSession.java URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi2/src/java/org/apache/james/smtpserver/SMTPSession.java?rev=429054&r1=429053&r2=429054&view=diff ============================================================================== --- james/server/sandbox/handlerapi2/src/java/org/apache/james/smtpserver/SMTPSession.java (original) +++ james/server/sandbox/handlerapi2/src/java/org/apache/james/smtpserver/SMTPSession.java Sat Aug 5 14:16:50 2006 @@ -222,22 +222,48 @@ Map getConnectionState(); /** - * The SMTPResponse + * Returns the SMTPResponse object * * @return SMTPResponse */ SMTPResponse getSMTPResponse(); + /** + * Set the SMTPResponse object + * + * @param response + */ void setSMTPResponse(SMTPResponse response); + /** + * + */ void writeResponse(String resp); + /** + * Push a new IOState + * + * @param io The IOState + */ public void pushIOState(IOState io); + /** + * Pop a IOState + * + */ public void popIOState(); + /** + * Get the IOState + * + * @return ioState The IOState + */ public IOState getIOState(); + /** + * Run the next handler in chain + * + */ public void doChain(); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]