1 package org.springframework.security.oauth.provider.token; 2 3 import org.springframework.beans.factory.annotation.Autowired; 4 5 import java.util.Collection; 6 7 /** 8 * Interface for a registry of token lifecycle listeners. 9 * 10 * @author Ryan Heaton 11 */ 12 public interface OAuthTokenLifecycleRegistry { 13 14 /** 15 * The collection of lifecycle listeners for this registry. 16 * 17 * @return The collection of lifecycle listeners for this registry. 18 */ 19 Collection<OAuthTokenLifecycleListener> getLifecycleListeners(); 20 21 /** 22 * Register lifecycle listener(s) with this registry. 23 * 24 * @param lifecycleListeners The listeners. 25 */ 26 @Autowired ( required = false ) 27 void register(OAuthTokenLifecycleListener... lifecycleListeners); 28 }