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 "Norman Maurer (JIRA)" <ji...@apache.org> on 2010/11/18 08:28:13 UTC

[jira] Created: (PROTOCOLS-11) Make CommandHandler/LineHandler/ConnectHandler more consistent

Make CommandHandler/LineHandler/ConnectHandler more consistent
--------------------------------------------------------------

                 Key: PROTOCOLS-11
                 URL: https://issues.apache.org/jira/browse/PROTOCOLS-11
             Project: JAMES Protocols
          Issue Type: Task
    Affects Versions: 1.1, 1.0
            Reporter: Norman Maurer
            Assignee: Norman Maurer
             Fix For: 1.2-M2


At the moment we have three different Handler types. These are ConnectHandler, CommandHandler and LineHandler. The ConnectHandler and LineHandler use void as return type and so if you want to write something back to the client you use Session.write(...). On the other hand if you use CommandHandler you can use the return type of Response to trigger a write back to the client and Session.write(..).  We should only use Session.write(...) in all cases

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (PROTOCOLS-11) Make CommandHandler/LineHandler/ConnectHandler more consistent

Posted by "Norman Maurer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PROTOCOLS-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933354#action_12933354 ] 

Norman Maurer commented on PROTOCOLS-11:
----------------------------------------

Thats not true (the one about not return). For example in RetrCmdHandler and TopCmdHandler we write the message directly without return a result. IF we would do it in the result we would need to buffer the whole message which just don't make sense.



> Make CommandHandler/LineHandler/ConnectHandler more consistent
> --------------------------------------------------------------
>
>                 Key: PROTOCOLS-11
>                 URL: https://issues.apache.org/jira/browse/PROTOCOLS-11
>             Project: JAMES Protocols
>          Issue Type: Task
>    Affects Versions: 1.0, 1.1
>            Reporter: Norman Maurer
>            Assignee: Norman Maurer
>             Fix For: 1.2-M2
>
>
> At the moment we have three different Handler types. These are ConnectHandler, CommandHandler and LineHandler. The ConnectHandler and LineHandler use void as return type and so if you want to write something back to the client you use Session.write(...). On the other hand if you use CommandHandler you can use the return type of Response to trigger a write back to the client and Session.write(..).  We should only use Session.write(...) in all cases

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Resolved: (PROTOCOLS-11) Make CommandHandler/LineHandler/ConnectHandler more consistent

Posted by "Norman Maurer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PROTOCOLS-11?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Norman Maurer resolved PROTOCOLS-11.
------------------------------------

    Resolution: Won't Fix

Its ok now how it works..

> Make CommandHandler/LineHandler/ConnectHandler more consistent
> --------------------------------------------------------------
>
>                 Key: PROTOCOLS-11
>                 URL: https://issues.apache.org/jira/browse/PROTOCOLS-11
>             Project: JAMES Protocols
>          Issue Type: Task
>    Affects Versions: 1.0, 1.1
>            Reporter: Norman Maurer
>            Assignee: Norman Maurer
>             Fix For: 1.2-M2
>
>
> At the moment we have three different Handler types. These are ConnectHandler, CommandHandler and LineHandler. The ConnectHandler and LineHandler use void as return type and so if you want to write something back to the client you use Session.write(...). On the other hand if you use CommandHandler you can use the return type of Response to trigger a write back to the client and Session.write(..).  We should only use Session.write(...) in all cases

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (PROTOCOLS-11) Make CommandHandler/LineHandler/ConnectHandler more consistent

Posted by "Stefano Bagnara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PROTOCOLS-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934121#action_12934121 ] 

Stefano Bagnara commented on PROTOCOLS-11:
------------------------------------------

Well, the issue is that Retr and Top command handlers are wrong :-)
They are blocking:

AbstractRetrCmdHandler.writeMessageContentTo does a loop and blocks while it writes each line of the message to the output channel.

This way if the remote client is blocking you either fill a buffer or block an executor thread of the SEDA pool.

So it has to be changed.

In the API we solved this issue for incoming streams (DataCmdHandler for SMTP) and we push a new linehandler in the chain to handle asynchronous streaming.

Maybe this needs a similar solution but reversed for writing a stream.

I'm opening a new JIRA for this purpose.

> Make CommandHandler/LineHandler/ConnectHandler more consistent
> --------------------------------------------------------------
>
>                 Key: PROTOCOLS-11
>                 URL: https://issues.apache.org/jira/browse/PROTOCOLS-11
>             Project: JAMES Protocols
>          Issue Type: Task
>    Affects Versions: 1.0, 1.1
>            Reporter: Norman Maurer
>            Assignee: Norman Maurer
>             Fix For: 1.2-M2
>
>
> At the moment we have three different Handler types. These are ConnectHandler, CommandHandler and LineHandler. The ConnectHandler and LineHandler use void as return type and so if you want to write something back to the client you use Session.write(...). On the other hand if you use CommandHandler you can use the return type of Response to trigger a write back to the client and Session.write(..).  We should only use Session.write(...) in all cases

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (PROTOCOLS-11) Make CommandHandler/LineHandler/ConnectHandler more consistent

Posted by "Stefano Bagnara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PROTOCOLS-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933341#action_12933341 ] 

Stefano Bagnara commented on PROTOCOLS-11:
------------------------------------------

We made this way to make it simpler to write CommandHandler. The simplicity could not be ported to Connect/LIne handler because they are more powerful, but the CommandHandler pattern is simpler to implement correctly: implementors are "forced" by the interface to do the right thing. In SMTP/POP3 there are no commands that do not return, and they always returns one result in response to one command.

> Make CommandHandler/LineHandler/ConnectHandler more consistent
> --------------------------------------------------------------
>
>                 Key: PROTOCOLS-11
>                 URL: https://issues.apache.org/jira/browse/PROTOCOLS-11
>             Project: JAMES Protocols
>          Issue Type: Task
>    Affects Versions: 1.0, 1.1
>            Reporter: Norman Maurer
>            Assignee: Norman Maurer
>             Fix For: 1.2-M2
>
>
> At the moment we have three different Handler types. These are ConnectHandler, CommandHandler and LineHandler. The ConnectHandler and LineHandler use void as return type and so if you want to write something back to the client you use Session.write(...). On the other hand if you use CommandHandler you can use the return type of Response to trigger a write back to the client and Session.write(..).  We should only use Session.write(...) in all cases

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (PROTOCOLS-11) Make CommandHandler/LineHandler/ConnectHandler more consistent

Posted by "Norman Maurer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PROTOCOLS-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933356#action_12933356 ] 

Norman Maurer commented on PROTOCOLS-11:
----------------------------------------

And just as a side note we miss the possibility to call disconnect in ConnectHandler and LineHandler if you don't want to write back a Response.

> Make CommandHandler/LineHandler/ConnectHandler more consistent
> --------------------------------------------------------------
>
>                 Key: PROTOCOLS-11
>                 URL: https://issues.apache.org/jira/browse/PROTOCOLS-11
>             Project: JAMES Protocols
>          Issue Type: Task
>    Affects Versions: 1.0, 1.1
>            Reporter: Norman Maurer
>            Assignee: Norman Maurer
>             Fix For: 1.2-M2
>
>
> At the moment we have three different Handler types. These are ConnectHandler, CommandHandler and LineHandler. The ConnectHandler and LineHandler use void as return type and so if you want to write something back to the client you use Session.write(...). On the other hand if you use CommandHandler you can use the return type of Response to trigger a write back to the client and Session.write(..).  We should only use Session.write(...) in all cases

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org