Interface RoutableFactory

    • Method Detail

      • encode

        boolean encode​(com.yahoo.messagebus.Routable obj,
                       com.yahoo.document.serialization.DocumentSerializer out)

        This method encodes the content of the given routable into a byte buffer that can later be decoded using the decode(DocumentDeserializer, com.yahoo.documentapi.messagebus.loadtypes.LoadTypeSet) method.

        Return false to signal failure.

        This method is NOT exception safe.

        Parameters:
        obj - The routable to encode.
        out - The buffer to write into.
        Returns:
        True if the routable could be encoded.
      • decode

        com.yahoo.messagebus.Routable decode​(com.yahoo.document.serialization.DocumentDeserializer in,
                                             LoadTypeSet loadTypes)

        This method decodes the given byte bufer to a routable.

        Return false to signal failure.

        This method is NOT exception safe.

        Parameters:
        in - The buffer to read from.
        loadTypes - The LoadTypeSet to inject into the Routable.
        Returns:
        The decoded routable.