View Javadoc
1   /*
2    * Copyright (C) 2013 4th Line GmbH, Switzerland
3    *
4    * The contents of this file are subject to the terms of either the GNU
5    * Lesser General Public License Version 2 or later ("LGPL") or the
6    * Common Development and Distribution License Version 1 or later
7    * ("CDDL") (collectively, the "License"). You may not use this file
8    * except in compliance with the License. See LICENSE.txt for more
9    * information.
10   *
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14   */
15  
16  package org.fourthline.cling.registry.event;
17  
18  import javax.enterprise.util.AnnotationLiteral;
19  import javax.inject.Qualifier;
20  import java.lang.annotation.Retention;
21  import java.lang.annotation.Target;
22  
23  import static java.lang.annotation.ElementType.FIELD;
24  import static java.lang.annotation.ElementType.PARAMETER;
25  import static java.lang.annotation.RetentionPolicy.RUNTIME;
26  
27  /**
28   * @author Christian Bauer
29   */
30  
31  public interface Phase {
32  
33      public static AnnotationLiteral<Alive> ALIVE = new AnnotationLiteral<Alive>() {
34      };
35  
36      public static AnnotationLiteral<Complete> COMPLETE = new AnnotationLiteral<Complete>() {
37      };
38  
39      public static AnnotationLiteral<Byebye> BYEBYE = new AnnotationLiteral<Byebye>() {
40      };
41  
42      public static AnnotationLiteral<Updated> UPDATED = new AnnotationLiteral<Updated>() {
43      };
44  
45  
46      @Qualifier
47      @Target({FIELD, PARAMETER})
48      @Retention(RUNTIME)
49      public @interface Alive {
50  
51      }
52  
53      @Qualifier
54      @Target({FIELD, PARAMETER})
55      @Retention(RUNTIME)
56      public @interface Complete {
57  
58      }
59  
60      @Qualifier
61      @Target({FIELD, PARAMETER})
62      @Retention(RUNTIME)
63      public @interface Byebye {
64  
65      }
66  
67      @Qualifier
68      @Target({FIELD, PARAMETER})
69      @Retention(RUNTIME)
70      public @interface Updated {
71  
72      }
73  
74  }