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