blob: 308271874c8e2fc33085f0ca88ba698a281aa720 [file] [log] [blame]
tom1d416c52014-09-29 20:55:24 -07001package org.onlab.onos.store.cluster.messaging;
2
Yuta HIGUCHIa10f3882014-10-11 22:45:07 -07003// FIXME: not used any more? remove
tom1d416c52014-09-29 20:55:24 -07004/**
Yuta HIGUCHI53a285d2014-10-06 23:58:01 -07005 * Service for encoding & decoding intra-cluster message payload.
tom1d416c52014-09-29 20:55:24 -07006 */
7public interface SerializationService {
8
9 /**
tom81583142014-09-30 01:40:29 -070010 * Decodes the specified byte buffer to obtain the message within.
tom1d416c52014-09-29 20:55:24 -070011 *
12 * @param buffer byte buffer with message(s)
13 * @return parsed message
14 */
Yuta HIGUCHI53a285d2014-10-06 23:58:01 -070015 <T> T decode(byte[] data);
tom1d416c52014-09-29 20:55:24 -070016
17 /**
18 * Encodes the specified message into the given byte buffer.
19 *
20 * @param message message to be encoded
21 * @param buffer byte buffer to receive the message data
22 */
Madan Jampani890bc352014-10-01 22:35:29 -070023 byte[] encode(Object message);
tom1d416c52014-09-29 20:55:24 -070024
25}