1 package com.atlassian.messagequeue.internal.lifecycle;
2
3 import java.util.Optional;
4
5 /**
6 * Deserializes lifecycle notifications.
7 */
8 public interface NotificationDeserializer {
9
10 /**
11 * @param string string to deserialize
12 * @param notificationType the type of notification
13 * @return an instance lifecycle notification or {@link Optional#empty()} if the string is invalid.
14 */
15 <T> Optional<T> deserialize(String string, Class<T> notificationType);
16 }