You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Roland Weber (JIRA)" <ji...@apache.org> on 2008/02/23 22:20:19 UTC

[jira] Created: (HTTPCORE-150) SerializerEntity

SerializerEntity
----------------

                 Key: HTTPCORE-150
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-150
             Project: HttpComponents HttpCore
          Issue Type: New Feature
          Components: HttpCore
            Reporter: Roland Weber
            Priority: Minor


We need an entity that serializes a Java object, at least in contrib if not in proper.
Every few months there's somebody asking for it. Should be a nice programming exercise.
Deserializing would be nice as well, but seems less important.

If we put it in core, it's available for everybody but has to use java.io.Serializable.
If we put it in client, it could use generics. Don't know if that is useful in this case.

cheers,
  Roland


-- 
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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCORE-150) SerializerEntity

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586770#action_12586770 ] 

Oleg Kalnichevski commented on HTTPCORE-150:
--------------------------------------------

There are certainly pros and cons. How about making buffering optional? Take a boolean parameter in the constructor and buffer content if the parameter is true. Also force buffering if #getContent() is called. Stream out live object if the buffer is not available, otherwise stream out buffered content.

Oleg

> SerializerEntity
> ----------------
>
>                 Key: HTTPCORE-150
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-150
>             Project: HttpComponents HttpCore
>          Issue Type: New Feature
>          Components: HttpCore
>            Reporter: Roland Weber
>            Priority: Minor
>             Fix For: 4.0-beta2
>
>         Attachments: httpcore150.patch
>
>
> We need an entity that serializes a Java object, at least in contrib if not in proper.
> Every few months there's somebody asking for it. Should be a nice programming exercise.
> Deserializing would be nice as well, but seems less important.
> If we put it in core, it's available for everybody but has to use java.io.Serializable.
> If we put it in client, it could use generics. Don't know if that is useful in this case.
> cheers,
>   Roland

-- 
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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCORE-150) SerializerEntity

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

Oleg Kalnichevski updated HTTPCORE-150:
---------------------------------------

    Fix Version/s: 4.0-beta2

> SerializerEntity
> ----------------
>
>                 Key: HTTPCORE-150
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-150
>             Project: HttpComponents HttpCore
>          Issue Type: New Feature
>          Components: HttpCore
>            Reporter: Roland Weber
>            Priority: Minor
>             Fix For: 4.0-beta2
>
>
> We need an entity that serializes a Java object, at least in contrib if not in proper.
> Every few months there's somebody asking for it. Should be a nice programming exercise.
> Deserializing would be nice as well, but seems less important.
> If we put it in core, it's available for everybody but has to use java.io.Serializable.
> If we put it in client, it could use generics. Don't know if that is useful in this case.
> cheers,
>   Roland

-- 
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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCORE-150) SerializerEntity

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

Andrea Selva updated HTTPCORE-150:
----------------------------------

    Attachment: htttpcore150-2.patch

Hi Oleg,
typically, having a class that have different behaviour based on a parameter i prefer to split in two distinct classes, but in this case, where the code is very small, the solution you have suggest is a valid way also for me.
I attach the revisited version, if there are problems or something to impreove or sugestions, i'm here-
Thanks, 
 Andrea

> SerializerEntity
> ----------------
>
>                 Key: HTTPCORE-150
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-150
>             Project: HttpComponents HttpCore
>          Issue Type: New Feature
>          Components: HttpCore
>            Reporter: Roland Weber
>            Priority: Minor
>             Fix For: 4.0-beta2
>
>         Attachments: httpcore150.patch, htttpcore150-2.patch
>
>
> We need an entity that serializes a Java object, at least in contrib if not in proper.
> Every few months there's somebody asking for it. Should be a nice programming exercise.
> Deserializing would be nice as well, but seems less important.
> If we put it in core, it's available for everybody but has to use java.io.Serializable.
> If we put it in client, it could use generics. Don't know if that is useful in this case.
> cheers,
>   Roland

-- 
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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Resolved: (HTTPCORE-150) SerializerEntity

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

Oleg Kalnichevski resolved HTTPCORE-150.
----------------------------------------

    Resolution: Fixed

Patch checked in. Many thanks, Andrea

Oleg

> SerializerEntity
> ----------------
>
>                 Key: HTTPCORE-150
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-150
>             Project: HttpComponents HttpCore
>          Issue Type: New Feature
>          Components: HttpCore
>            Reporter: Roland Weber
>            Priority: Minor
>             Fix For: 4.0-beta2
>
>         Attachments: httpcore150.patch, htttpcore150-2.patch
>
>
> We need an entity that serializes a Java object, at least in contrib if not in proper.
> Every few months there's somebody asking for it. Should be a nice programming exercise.
> Deserializing would be nice as well, but seems less important.
> If we put it in core, it's available for everybody but has to use java.io.Serializable.
> If we put it in client, it could use generics. Don't know if that is useful in this case.
> cheers,
>   Roland

-- 
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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCORE-150) SerializerEntity

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586760#action_12586760 ] 

Oleg Kalnichevski commented on HTTPCORE-150:
--------------------------------------------

Andrea, I think it would be better if the SerializerEntity did not buffer the content. It would also be perfectly okay to throw UnsupportedOperationException from #getContent(). Otherwise look good. I'll happily add this class to HttpClient proper.

Oleg

> SerializerEntity
> ----------------
>
>                 Key: HTTPCORE-150
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-150
>             Project: HttpComponents HttpCore
>          Issue Type: New Feature
>          Components: HttpCore
>            Reporter: Roland Weber
>            Priority: Minor
>             Fix For: 4.0-beta2
>
>         Attachments: httpcore150.patch
>
>
> We need an entity that serializes a Java object, at least in contrib if not in proper.
> Every few months there's somebody asking for it. Should be a nice programming exercise.
> Deserializing would be nice as well, but seems less important.
> If we put it in core, it's available for everybody but has to use java.io.Serializable.
> If we put it in client, it could use generics. Don't know if that is useful in this case.
> cheers,
>   Roland

-- 
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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCORE-150) SerializerEntity

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

Andrea Selva updated HTTPCORE-150:
----------------------------------

    Attachment: httpcore150.patch

Hi Roland,
here is a patch that i think should solve this issue. Let me know how to improve it.
 Andrea

> SerializerEntity
> ----------------
>
>                 Key: HTTPCORE-150
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-150
>             Project: HttpComponents HttpCore
>          Issue Type: New Feature
>          Components: HttpCore
>            Reporter: Roland Weber
>            Priority: Minor
>             Fix For: 4.0-beta2
>
>         Attachments: httpcore150.patch
>
>
> We need an entity that serializes a Java object, at least in contrib if not in proper.
> Every few months there's somebody asking for it. Should be a nice programming exercise.
> Deserializing would be nice as well, but seems less important.
> If we put it in core, it's available for everybody but has to use java.io.Serializable.
> If we put it in client, it could use generics. Don't know if that is useful in this case.
> cheers,
>   Roland

-- 
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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCORE-150) SerializerEntity

Posted by "Andrea Selva (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586769#action_12586769 ] 

Andrea Selva commented on HTTPCORE-150:
---------------------------------------

Hi Oleg, 
i think that is better not have an handle to a live object to transmit with entity, perhaps i'm in wrong, but this is the rationale of this choice. If in your opinion is better to not store (due to memory leaks) the serialized form, i'll work on this.
 Andrea

> SerializerEntity
> ----------------
>
>                 Key: HTTPCORE-150
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-150
>             Project: HttpComponents HttpCore
>          Issue Type: New Feature
>          Components: HttpCore
>            Reporter: Roland Weber
>            Priority: Minor
>             Fix For: 4.0-beta2
>
>         Attachments: httpcore150.patch
>
>
> We need an entity that serializes a Java object, at least in contrib if not in proper.
> Every few months there's somebody asking for it. Should be a nice programming exercise.
> Deserializing would be nice as well, but seems less important.
> If we put it in core, it's available for everybody but has to use java.io.Serializable.
> If we put it in client, it could use generics. Don't know if that is useful in this case.
> cheers,
>   Roland

-- 
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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org