Class WorkspaceScope
java.lang.Object
com.github._1c_syntax.bsl.languageserver.infrastructure.WorkspaceScope
- All Implemented Interfaces:
Scope
Custom Spring Scope для per-workspace бинов.
Ключ scope — workspace URI из WorkspaceContextHolder.
Если workspace URI не установлен, выбрасывается исключение.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(String name, ObjectFactory<?> objectFactory) <T> Collection<T> getAllInstances(String beanName, Class<T> type) Get all instances of a bean across all workspaces.voidregisterDestructionCallback(String name, Runnable callback) voidremoveWorkspace(URI workspaceUri) Удалить все бины workspace, предварительно вызвав destruction callbacks.
-
Field Details
-
SCOPE_NAME
- See Also:
-
-
Constructor Details
-
WorkspaceScope
public WorkspaceScope()
-
-
Method Details
-
get
-
remove
-
registerDestructionCallback
- Specified by:
registerDestructionCallbackin interfaceScope
-
resolveContextualObject
- Specified by:
resolveContextualObjectin interfaceScope
-
getConversationId
- Specified by:
getConversationIdin interfaceScope
-
removeWorkspace
Удалить все бины workspace, предварительно вызвав destruction callbacks. -
getAllInstances
Get all instances of a bean across all workspaces.- Parameters:
beanName- the bean nametype- the expected type- Returns:
- collection of all instances
-