Package org.apache.camel.console
Interface DevConsoleRegistry
-
- All Superinterfaces:
AutoCloseable,CamelContextAware,HasId,IdAware,Service,StaticService
public interface DevConsoleRegistry extends CamelContextAware, StaticService, IdAware
A registry for dev console.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static 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>getConsoleIDs()A collection of dev console IDs.booleanisEnabled()Whether dev console is enabled globallyvoidloadDevConsoles()Loads custom dev consoles by scanning classpath.voidloadDevConsoles(boolean force)Loads custom dev consoles by scanning classpath.booleanregister(DevConsole console)Registers aDevConsole.DevConsoleresolveById(String id)ResolvesDevConsoleby id.voidsetEnabled(boolean enabled)Whether dev console is enabled globallyStream<DevConsole>stream()Returns a sequentialStreamwith the knownDevConsoleas its source.booleanunregister(DevConsole console)Unregisters aDevConsole.-
Methods inherited from interface org.apache.camel.CamelContextAware
getCamelContext, setCamelContext
-
Methods inherited from interface org.apache.camel.spi.IdAware
setGeneratedId, setId
-
-
-
-
Field Detail
-
NAME
static final String NAME
Service factory name.- See Also:
- Constant Field Values
-
FACTORY
static final String FACTORY
Service factory key.- See Also:
- Constant Field Values
-
-
Method Detail
-
isEnabled
boolean isEnabled()
Whether dev console is enabled globally
-
setEnabled
void setEnabled(boolean enabled)
Whether dev console is enabled globally
-
resolveById
DevConsole resolveById(String id)
ResolvesDevConsoleby id. Will first lookup in thisDevConsoleRegistryand thenRegistry, and lastly do classpath scanning viaServiceFactory.- Returns:
- either
DevConsole, or null if none found.
-
register
boolean register(DevConsole console)
Registers aDevConsole.
-
unregister
boolean unregister(DevConsole console)
Unregisters aDevConsole.
-
getConsoleIDs
default Collection<String> getConsoleIDs()
A collection of dev console IDs.
-
getConsole
default Optional<DevConsole> getConsole(String id)
Returns the dev console identified by the givenidif available.
-
get
static DevConsoleRegistry get(CamelContext context)
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
-
-