public final class ServiceContextManager extends Object
ServiceContext. The
behaviour can be adapted, by calling set(ServiceContext) before accessing any
services.| Modifier and Type | Method | Description |
|---|---|---|
static ClassLoader |
getDefaultClassLoader() |
Evaluate the default classloader: This return the current thread context classloader, or this
class's classloader as fallback.
|
static ServiceContext |
getServiceContext() |
Ge
ServiceContext. |
static ServiceContext |
getServiceContext(ClassLoader classLoader) |
Ge
ServiceContext. |
static ServiceContext |
set(ServiceContext serviceContext) |
Replace the current
ServiceContext in use. |
static ServiceContext |
setToStaticClassLoader(ServiceContext serviceContext) |
Replace the current
ServiceContext for the ServiceContextManager's classloader in use. |
public static ServiceContext set(ServiceContext serviceContext)
ServiceContext in use.serviceContext - the new ServiceContext, not null.public static ServiceContext setToStaticClassLoader(ServiceContext serviceContext)
ServiceContext for the ServiceContextManager's classloader in use.serviceContext - the new ServiceContext, not null.public static ServiceContext getServiceContext(ClassLoader classLoader)
ServiceContext. If necessary the ServiceContext will be laziliy loaded.classLoader - the classloader to be used, not null.ServiceContext used.public static ServiceContext getServiceContext()
ServiceContext. If necessary the ServiceContext will be laziliy loaded.ServiceContext used.public static ClassLoader getDefaultClassLoader()
Copyright © 2014–2019 Apache Software Foundation. All rights reserved.