View Javadoc

1   package com.atlassian.messagequeue.internal.lifecycle;
2   
3   /**
4    * Observes instance lifecycle notifications.
5    *
6    * <p>Allows listeners to be registered to respond to an instance terminating notification</p>.
7    */
8   public interface InstanceLifecycleNotificationObserver {
9       /**
10       * Initialise this observer.
11       */
12      void initialise();
13  
14      /**
15       * Register the specified listener to be notified when an instance is terminating.
16       * @param listener the listener
17       */
18      void addInstanceTerminatingListener(InstanceLifecycleListener listener);
19  
20      /**
21       * Shutdown this observer.
22       */
23      void shutdown();
24  }