Class BeanstalkComponent
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultComponent
-
- org.apache.camel.component.beanstalk.BeanstalkComponent
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Component
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@Component("beanstalk") public class BeanstalkComponent extends org.apache.camel.support.DefaultComponent
Beanstalk Camel component. URI isbeanstalk://[host[:port]][/tube]?query
Parameters:command
- one of "put", "release", "bury", "touch", "delete", "kick". "put" is the default for Producers.jobPriority
jobDelay
jobTimeToRun
consumer.onFailure
consumer.awaitJob
- See Also:
BeanstalkEndpoint
,ConnectionSettingsFactory
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMMAND_BURY
static String
COMMAND_DELETE
static String
COMMAND_KICK
static String
COMMAND_PUT
static String
COMMAND_RELEASE
static String
COMMAND_TOUCH
static int
DEFAULT_DELAY
static long
DEFAULT_PRIORITY
static int
DEFAULT_TIME_TO_RUN
static String
DEFAULT_TUBE
-
Constructor Summary
Constructors Constructor Description BeanstalkComponent()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.camel.Endpoint
createEndpoint(String uri, String remaining, Map<String,Object> parameters)
static ConnectionSettingsFactory
getConnectionSettingsFactory()
static void
setConnectionSettingsFactory(ConnectionSettingsFactory connFactory)
CustomConnectionSettingsFactory
.boolean
useRawUri()
-
Methods inherited from class org.apache.camel.support.DefaultComponent
afterConfiguration, createEndpoint, createEndpoint, doBuild, doInit, doStart, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, resolveRawParameterValues, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useIntrospectionOnEndpoint, validateParameters, validateURI
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
DEFAULT_TUBE
public static final String DEFAULT_TUBE
- See Also:
- Constant Field Values
-
COMMAND_BURY
public static final String COMMAND_BURY
- See Also:
- Constant Field Values
-
COMMAND_RELEASE
public static final String COMMAND_RELEASE
- See Also:
- Constant Field Values
-
COMMAND_PUT
public static final String COMMAND_PUT
- See Also:
- Constant Field Values
-
COMMAND_TOUCH
public static final String COMMAND_TOUCH
- See Also:
- Constant Field Values
-
COMMAND_DELETE
public static final String COMMAND_DELETE
- See Also:
- Constant Field Values
-
COMMAND_KICK
public static final String COMMAND_KICK
- See Also:
- Constant Field Values
-
DEFAULT_PRIORITY
public static final long DEFAULT_PRIORITY
- See Also:
- Constant Field Values
-
DEFAULT_DELAY
public static final int DEFAULT_DELAY
- See Also:
- Constant Field Values
-
DEFAULT_TIME_TO_RUN
public static final int DEFAULT_TIME_TO_RUN
- See Also:
- Constant Field Values
-
-
Method Detail
-
useRawUri
public boolean useRawUri()
- Specified by:
useRawUri
in interfaceorg.apache.camel.Component
- Overrides:
useRawUri
in classorg.apache.camel.support.DefaultComponent
-
createEndpoint
protected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
- Specified by:
createEndpoint
in classorg.apache.camel.support.DefaultComponent
- Throws:
Exception
-
setConnectionSettingsFactory
@Metadata(label="advanced") public static void setConnectionSettingsFactory(ConnectionSettingsFactory connFactory)
CustomConnectionSettingsFactory
. Specify whichConnectionSettingsFactory
to use to make connections to Beanstalkd. Especially useful for unit testing without beanstalkd daemon (you can mockConnectionSettings
)- Parameters:
connFactory
- the connection factory- See Also:
ConnectionSettingsFactory
-
getConnectionSettingsFactory
public static ConnectionSettingsFactory getConnectionSettingsFactory()
-
-