Package org.apache.camel.support
Class AbstractVariableRepository
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.AbstractVariableRepository
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.BrowsableVariableRepository,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.VariableRepository,org.apache.camel.StatefulService,org.apache.camel.StaticService,org.apache.camel.SuspendableService,org.apache.camel.VariableAware
- Direct Known Subclasses:
GlobalVariableRepository
public abstract class AbstractVariableRepository
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.BrowsableVariableRepository, org.apache.camel.CamelContextAware
Base class for
VariableRepository implementations that store variables in memory.-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()protected org.apache.camel.StreamCacheconvertToStreamCache(Object body) protected voiddoInit()org.apache.camel.CamelContextgetVariable(String name) booleannames()removeVariable(String name) voidsetCamelContext(org.apache.camel.CamelContext camelContext) voidsetVariable(String name, Object value) voidsetVariables(Map<String, Object> map) intsize()protected org.apache.camel.StreamCachetryStreamCache(Object body) Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspendMethods inherited from interface org.apache.camel.spi.VariableRepository
getId
-
Constructor Details
-
AbstractVariableRepository
public AbstractVariableRepository()
-
-
Method Details
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()- Specified by:
getCamelContextin interfaceorg.apache.camel.spi.HasCamelContext
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext) - Specified by:
setCamelContextin interfaceorg.apache.camel.CamelContextAware
-
getVariable
- Specified by:
getVariablein interfaceorg.apache.camel.VariableAware
-
setVariable
- Specified by:
setVariablein interfaceorg.apache.camel.VariableAware
-
hasVariables
public boolean hasVariables()- Specified by:
hasVariablesin interfaceorg.apache.camel.spi.BrowsableVariableRepository
-
size
public int size()- Specified by:
sizein interfaceorg.apache.camel.spi.BrowsableVariableRepository
-
names
- Specified by:
namesin interfaceorg.apache.camel.spi.BrowsableVariableRepository
-
getVariables
- Specified by:
getVariablesin interfaceorg.apache.camel.spi.BrowsableVariableRepository
-
setVariables
-
clear
public void clear()- Specified by:
clearin interfaceorg.apache.camel.spi.BrowsableVariableRepository
-
removeVariable
- Specified by:
removeVariablein interfaceorg.apache.camel.spi.VariableRepository
-
doInit
- Overrides:
doInitin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
convertToStreamCache
-
tryStreamCache
-