Interface DevConsoleRegistry
- All Superinterfaces:
AutoCloseable, CamelContextAware, HasCamelContext, HasId, IdAware, Service, StaticService
A registry for dev console.
- Since:
- 3.15
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable DevConsoleRegistryget(CamelContext context) Returns an optionalDevConsoleRegistry, by default no registry is present, and it must be explicit activated.default Optional<DevConsole> getConsole(String id) Returns the dev console identified by the givenidif available.default Collection<String> A collection of dev console IDs.booleanWhether dev console is enabled globallyvoidLoads custom dev consoles by scanning classpath.voidloadDevConsoles(boolean force) Loads custom dev consoles by scanning classpath.booleanregister(DevConsole console) Registers aDevConsole.@Nullable DevConsoleresolveById(String id) ResolvesDevConsoleby id.voidsetEnabled(boolean enabled) Whether dev console is enabled globallystream()Returns a sequentialStreamwith the knownDevConsoleas its source.booleanunregister(DevConsole console) Unregisters aDevConsole.Methods inherited from interface CamelContextAware
setCamelContextMethods inherited from interface HasCamelContext
getCamelContextMethods inherited from interface IdAware
setGeneratedId, setId
-
Field Details
-
NAME
-
FACTORY
-
-
Method Details
-
isEnabled
boolean isEnabled()Whether dev console is enabled globally -
setEnabled
void setEnabled(boolean enabled) Whether dev console is enabled globally -
resolveById
ResolvesDevConsoleby id. Will first lookup in thisDevConsoleRegistryand thenRegistry, and lastly do classpath scanning viaServiceFactory.- Returns:
- either
DevConsole, or null if none found.
-
register
Registers aDevConsole. -
unregister
Unregisters aDevConsole. -
getConsoleIDs
A collection of dev console IDs. -
getConsole
Returns the dev console identified by the givenidif available. -
get
Returns an optionalDevConsoleRegistry, by default no registry is present, and it must be explicit activated. Components can register/unregister dev consoles in response to life-cycle events (i.e. start/stop). This registry is not used by the camel context, but it is up to the implementation to properly use it. -
stream
Stream<DevConsole> stream()Returns a sequentialStreamwith the knownDevConsoleas its source. -
loadDevConsoles
void loadDevConsoles()Loads custom dev consoles by scanning classpath. -
loadDevConsoles
void loadDevConsoles(boolean force) Loads custom dev consoles by scanning classpath.- Parameters:
force- force re-scanning such as when additional JARs has been added to the classpath that can include custom dev consoles
-