com.h3c.sdn.ha

## Interface SyncUtilService

-     public interface SyncUtilService

  An OSGI front-room service which provides utilities for marshaling and marshaling of POJOs over the HA channel (ZK Bus, Keystore). Most commonly used to create the payloads for Bus Messages.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `marshal(SyncObj<?> sObj)` Prepares the object for transmission/storage over the channel, by converting the object into bytes.
    `SyncObj<?>` | `unmarshal(Class<?> syncClass, byte[] payload)` Synthesizes the object from the given bytes that were retrieved from the channel.

- - ### Method Detail

    - #### unmarshal

          SyncObj<?> unmarshal(Class<?> syncClass,
                             byte[] payload)

      Synthesizes the object from the given bytes that were retrieved from the channel.
      Parameters:
        `syncClass` - class of the object that is being synthesized.
        `payload` - the bytes retrieved from the channel.
      Returns:
        synthesized object

    - #### marshal

          byte[] marshal(SyncObj<?> sObj)

      Prepares the object for transmission/storage over the channel, by converting the object into bytes.
      Parameters:
        `sObj` - the object which has to be flattened to bytes.
      Returns:
        the flattened representation of the object.

Copyright © 2014. All Rights Reserved.