Interface ObjectMarshallingStrategy


  • public interface ObjectMarshallingStrategy
    • Method Detail

      • getName

        default String getName()
        Override this method if you want multiple marshalling strategies of the same implementation in environment
        Returns:
        the unique name in runtime environment of the ObjectMarshallingStrategy
      • accept

        boolean accept​(Object object)
      • marshal

        byte[] marshal​(ObjectMarshallingStrategy.Context context,
                       ObjectOutputStream os,
                       Object object)
                throws IOException
        This method is analogous to the write() method, but instead of writing the object into an output stream, it returns the marshalled object as a byte[].
        Parameters:
        context - the context for this strategy created by the method #createContext()
        object - the object to be marshalled
        Returns:
        the marshalled byte[] of the input object
        Throws:
        IOException