[jboss-jira] [JBoss JIRA] Commented: (JBREM-692) Let marshallers/unmarshallers construct their preferred streams.
Ron Sigal (JIRA)
jira-events at jboss.com
Sun Feb 4 03:41:19 EST 2007
[ http://jira.jboss.com/jira/browse/JBREM-692?page=comments#action_12352282 ]
Ron Sigal commented on JBREM-692:
---------------------------------
Two new interfaces, org.jboss.remoting.marshal.PreferredStreamMarshaller and org.jboss.remoting.marshal.PreferredStreamUnMarshaller, have been introduced:
public interface PreferredStreamMarshaller extends SerialMarshaller
{
OutputStream getMarshallingStream(OutputStream outputStream) throws IOException;
Stream getMarshallingStream(OutputStream outputStream, Map config) throws IOException;
}
and
public interface PreferredStreamUnMarshaller extends SerialUnMarshaller
{
InputStream getMarshallingStream(InputStream inputStream) throws IOException;
InputStream getMarshallingStream(InputStream inputStream, Map config) throws IOException;
}
A marshaller that implements PreferredStreamMarshaller will return, when supplied with a basic OutputStream such as SocketOutputStream, will return the OutputStream it prefers to use and which may be cached by the transport layer. For example, org.jboss.remoting.marshal.serializable.SerializableMarshaller will return an ObjectOutputStream wrapped around a BufferedOutputStream. Similarly, an unmarshaller that implements preferredStreamUnMarshaller will return, when supplied with a basic InputStream such as SocketIntputStream, will return the IntputStream it prefers to use. For example, org.jboss.remoting.marshal.serializable.SerializableUnMarshaller will return an ObjectInputStream wrapped around a BufferedInputStream.
Currently the socket transport and its descendants (sslsocket, bisocket, and sslbisocket) recognize PreferredStreamMarshallers and PreferredStreamUnMarshallers.
> Let marshallers/unmarshallers construct their preferred streams.
> ----------------------------------------------------------------
>
> Key: JBREM-692
> URL: http://jira.jboss.com/jira/browse/JBREM-692
> Project: JBoss Remoting
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Affects Versions: 2.2.0.Beta1 (Bluto)
> Reporter: Ron Sigal
> Assigned To: Ron Sigal
> Fix For: 2.2.0.Beta1 (Bluto)
>
>
> In response to JBREM-597 the socket transport was changed to provide raw socket streams to the marshaller layer. This leads to several issues:
> 1. JBREM-623
> 2. JBREM-631
> 3. The result of JBREM-597 is that (un)marshallers like Serializable(Un)Marshaller that use object streams need to recreate object streams with each invocation, which is time consuming.
> A solution, suggested by Tom Elrod, is to allow the marshaller layer to construct the streams it prefers to work with, which can then be cached at the transport layer.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list