You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Matthieu Chase Heimer (JIRA)" <ji...@apache.org> on 2009/01/07 00:37:44 UTC

[jira] Created: (DIRMINA-655) Add a more general purpose text based decoder

Add a more general purpose text based decoder
---------------------------------------------

                 Key: DIRMINA-655
                 URL: https://issues.apache.org/jira/browse/DIRMINA-655
             Project: MINA
          Issue Type: New Feature
    Affects Versions: 2.0.0-M4
         Environment: Mina 2.0.0-M4, Java 1.6, Fedora 10
            Reporter: Matthieu Chase Heimer
            Priority: Minor


There are many text based protocols who have messages that are terminated by a delimiter other than an end of line. A protocol decoder that is more generic than TextLineDecoder would be a nice addition. It should also be easy to extend so developers can focus on coverting text messages to domain objects and not on converting  and parsing IoBuffers.

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


[jira] Updated: (DIRMINA-655) Add a more general purpose text based decoder

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

Julien Vermillard updated DIRMINA-655:
--------------------------------------


any progress here ?

> Add a more general purpose text based decoder
> ---------------------------------------------
>
>                 Key: DIRMINA-655
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-655
>             Project: MINA
>          Issue Type: New Feature
>    Affects Versions: 2.0.0-M4
>         Environment: Mina 2.0.0-M4, Java 1.6, Fedora 10
>            Reporter: Matthieu Chase Heimer
>            Priority: Minor
>         Attachments: RegExDecoder.java
>
>
> There are many text based protocols who have messages that are terminated by a delimiter other than an end of line. A protocol decoder that is more generic than TextLineDecoder would be a nice addition. It should also be easy to extend so developers can focus on coverting text messages to domain objects and not on converting  and parsing IoBuffers.

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


[jira] Updated: (DIRMINA-655) Add a more general purpose text based decoder

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

Emmanuel Lecharny updated DIRMINA-655:
--------------------------------------

    Fix Version/s: 3.0.0-M1

> Add a more general purpose text based decoder
> ---------------------------------------------
>
>                 Key: DIRMINA-655
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-655
>             Project: MINA
>          Issue Type: New Feature
>    Affects Versions: 2.0.0-M4
>         Environment: Mina 2.0.0-M4, Java 1.6, Fedora 10
>            Reporter: Matthieu Chase Heimer
>            Priority: Minor
>             Fix For: 3.0.0-M1
>
>         Attachments: RegExDecoder.java
>
>
> There are many text based protocols who have messages that are terminated by a delimiter other than an end of line. A protocol decoder that is more generic than TextLineDecoder would be a nice addition. It should also be easy to extend so developers can focus on coverting text messages to domain objects and not on converting  and parsing IoBuffers.

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


[jira] Commented: (DIRMINA-655) Add a more general purpose text based decoder

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661382#action_12661382 ] 

Emmanuel Lecharny commented on DIRMINA-655:
-------------------------------------------

That's an interesting addition.

Just wondering if you also have some unit tests for it ? It would be cool to add something like  the TextLineEncoder/DecoderTest classes to check this regexp codec.

Thanks !

> Add a more general purpose text based decoder
> ---------------------------------------------
>
>                 Key: DIRMINA-655
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-655
>             Project: MINA
>          Issue Type: New Feature
>    Affects Versions: 2.0.0-M4
>         Environment: Mina 2.0.0-M4, Java 1.6, Fedora 10
>            Reporter: Matthieu Chase Heimer
>            Priority: Minor
>         Attachments: RegExDecoder.java
>
>
> There are many text based protocols who have messages that are terminated by a delimiter other than an end of line. A protocol decoder that is more generic than TextLineDecoder would be a nice addition. It should also be easy to extend so developers can focus on coverting text messages to domain objects and not on converting  and parsing IoBuffers.

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


[jira] Commented: (DIRMINA-655) Add a more general purpose text based decoder

Posted by "Matthieu Chase Heimer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661460#action_12661460 ] 

Matthieu Chase Heimer commented on DIRMINA-655:
-----------------------------------------------

Yeah I see what you are saying about that case but as the second matching message would begin with the terminator it would be filtered out. I should probably separate out the multi-character and single-character patterns for line feeds into separate constants. I'll try to write some unit tests as time permits this week.

> Add a more general purpose text based decoder
> ---------------------------------------------
>
>                 Key: DIRMINA-655
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-655
>             Project: MINA
>          Issue Type: New Feature
>    Affects Versions: 2.0.0-M4
>         Environment: Mina 2.0.0-M4, Java 1.6, Fedora 10
>            Reporter: Matthieu Chase Heimer
>            Priority: Minor
>         Attachments: RegExDecoder.java
>
>
> There are many text based protocols who have messages that are terminated by a delimiter other than an end of line. A protocol decoder that is more generic than TextLineDecoder would be a nice addition. It should also be easy to extend so developers can focus on coverting text messages to domain objects and not on converting  and parsing IoBuffers.

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


[jira] Commented: (DIRMINA-655) Add a more general purpose text based decoder

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661385#action_12661385 ] 

Emmanuel Lecharny commented on DIRMINA-655:
-------------------------------------------

Thinking a bit more about the proposal :

As you know, you have no guarantee that a terminated message will be transmitted in one single block. What if the received bytes just get decoded and the regexp is partially matched ? 

For instance using the LINE_TERM regexp, what if we receive \r\n in two messages ? I guess that you will match LINE_TERM twice, and potentially consider that you have two lines to deal with, when it's just an artefact, as the sender really wanted to terminate its message with a '\r\n'

This is where it gets tricky ...

> Add a more general purpose text based decoder
> ---------------------------------------------
>
>                 Key: DIRMINA-655
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-655
>             Project: MINA
>          Issue Type: New Feature
>    Affects Versions: 2.0.0-M4
>         Environment: Mina 2.0.0-M4, Java 1.6, Fedora 10
>            Reporter: Matthieu Chase Heimer
>            Priority: Minor
>         Attachments: RegExDecoder.java
>
>
> There are many text based protocols who have messages that are terminated by a delimiter other than an end of line. A protocol decoder that is more generic than TextLineDecoder would be a nice addition. It should also be easy to extend so developers can focus on coverting text messages to domain objects and not on converting  and parsing IoBuffers.

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


[jira] Updated: (DIRMINA-655) Add a more general purpose text based decoder

Posted by "Matthieu Chase Heimer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthieu Chase Heimer updated DIRMINA-655:
------------------------------------------

    Attachment: RegExDecoder.java

A general purpose text decoder that uses regular expresions.

> Add a more general purpose text based decoder
> ---------------------------------------------
>
>                 Key: DIRMINA-655
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-655
>             Project: MINA
>          Issue Type: New Feature
>    Affects Versions: 2.0.0-M4
>         Environment: Mina 2.0.0-M4, Java 1.6, Fedora 10
>            Reporter: Matthieu Chase Heimer
>            Priority: Minor
>         Attachments: RegExDecoder.java
>
>
> There are many text based protocols who have messages that are terminated by a delimiter other than an end of line. A protocol decoder that is more generic than TextLineDecoder would be a nice addition. It should also be easy to extend so developers can focus on coverting text messages to domain objects and not on converting  and parsing IoBuffers.

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