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 DevConsoleRegistry
get(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 givenid
if available.default Collection<String>
getConsoleIDs()
A collection of dev console IDs.boolean
isEnabled()
Whether dev console is enabled globallyvoid
loadDevConsoles()
Loads custom dev consoles by scanning classpath.void
loadDevConsoles(boolean force)
Loads custom dev consoles by scanning classpath.boolean
register(DevConsole console)
Registers aDevConsole
.DevConsole
resolveById(String id)
ResolvesDevConsole
by id.void
setEnabled(boolean enabled)
Whether dev console is enabled globallyStream<DevConsole>
stream()
Returns a sequentialStream
with the knownDevConsole
as its source.boolean
unregister(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)
ResolvesDevConsole
by id. Will first lookup in thisDevConsoleRegistry
and 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 givenid
if 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 sequentialStream
with the knownDevConsole
as 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
-
-