View Javadoc

1   package com.atlassian.messagequeue.internal.core;
2   
3   /**
4    * Responsible for handling serialization and deserialization for {@link NestedMessage}.
5    *
6    * @see JacksonNestedMessageSerializer
7    * @see GsonNestedMessageSerializer
8    */
9   public interface NestedMessageSerializer {
10      /**
11       * Serialize message.
12       * @param message the message
13       * @return the serialized form.
14       * @throws com.atlassian.messagequeue.MessageSerializationException if there is an error serializing the message.
15       */
16      String serialize(NestedMessage message);
17  
18      /**
19       * Deserialize the specified string.
20       * @param string the string representing the serialized form
21       * @return the deserialized message
22       * @throws com.atlassian.messagequeue.MessageSerializationException if there is an error deserializing the message.
23       */
24      NestedMessage deserialize(String string);
25  }