1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.osgi.service.importer.support;
18
19 import org.springframework.core.enums.StaticLabeledEnum;
20
21 /**
22 * Enum-like class containing the OSGi service importer thread context class
23 * loader (TCCL) management options.
24 *
25 * @author Costin Leau
26 */
27 public class ImportContextClassLoader extends StaticLabeledEnum {
28
29 private static final long serialVersionUID = -7054525261814306077L;
30
31 /**
32 * The TCCL will not be managed upon service invocation.
33 */
34 public static final ImportContextClassLoader UNMANAGED = new ImportContextClassLoader(0, "UNMANAGED");
35
36 /**
37 * The TCCL will be set to the service provider upon service invocation.
38 */
39 public static final ImportContextClassLoader SERVICE_PROVIDER = new ImportContextClassLoader(1, "SERVICE_PROVIDER");
40
41 /**
42 * The TCCL will be set to the service provider upon service invocation.
43 */
44 public static final ImportContextClassLoader CLIENT = new ImportContextClassLoader(2, "CLIENT");
45
46
47 /**
48 * Constructs a new <code>ImportContextClassLoader</code> instance.
49 *
50 * @param code
51 * @param label
52 */
53 private ImportContextClassLoader(int code, String label) {
54 super(code, label);
55 }
56
57 }