XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • 10.0.0.Final
    • 9.4.0.Final
    • Core
    • None

      The StreamingMarshaller interface is no longer fit for purpose once we move away from jboss-marshalling as the ObjectOutput abstraction does not fit with non-serialization based marshallers. We should provide a simpler interface that simply allows reading/writing objects to a provided stream. This interface should then be exposed via the InitializationContext to store implementations.

      @ThreadSafe
      public interface StreamAwareMarshaller extends Marshaller {
          /**
          * Marshall an object to the {@link OutputStream}
          *
          * @param o the object to write to the {@link OutputStream}
          * @param out the {@link OutputStream} to write the object to
          * @throws IOException if the object cannot be marshalled to the {@link OutputStream} due to some I/O error
          */
         void writeObject(Object o, OutputStream out) throws IOException;
          /**
          * Unmarshall an object from the {@link InputStream}
          *
          * @param in the {@link InputStream} to unmarshall an object from
          * @return the unmarshalled object instance
          * @throws IOException if unmarshalling cannot complete due to some I/O error
          * @throws ClassNotFoundException if the class of the object trying to unmarshall is not found
          */
         Object readObject(InputStream in) throws ClassNotFoundException, IOException;
      }
      

              remerson@redhat.com Ryan Emerson
              remerson@redhat.com Ryan Emerson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: