Package org.apache.camel.component.paho
Class PahoSendDynamicAware
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.component.paho.PahoSendDynamicAware
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasCamelContext
,org.apache.camel.spi.SendDynamicAware
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@SendDynamic("paho")
public class PahoSendDynamicAware
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.SendDynamicAware
Paho based
SendDynamicAware
which allows to optimise Paho components with the toD
(dynamic to) DSL in Camel. This implementation optimises by allowing to provide dynamic parameters via
PahoConstants.CAMEL_PAHO_OVERRIDE_TOPIC
header instead of the endpoint uri. That allows to use a static
endpoint and its producer to service dynamic requests.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.camel.spi.SendDynamicAware
org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry
-
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
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.Processor
createPostProcessor
(org.apache.camel.Exchange exchange, org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry entry) org.apache.camel.Processor
createPreProcessor
(org.apache.camel.Exchange exchange, org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry entry) org.apache.camel.CamelContext
boolean
org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry
resolveStaticUri
(org.apache.camel.Exchange exchange, org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry entry) void
setCamelContext
(org.apache.camel.CamelContext camelContext) void
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doStart, doStop, 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
Methods inherited from interface org.apache.camel.spi.SendDynamicAware
resolveRawParameterValues
Methods inherited from interface org.apache.camel.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
PahoSendDynamicAware
public PahoSendDynamicAware()
-
-
Method Details
-
getScheme
- Specified by:
getScheme
in interfaceorg.apache.camel.spi.SendDynamicAware
-
setScheme
- Specified by:
setScheme
in interfaceorg.apache.camel.spi.SendDynamicAware
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()- Specified by:
getCamelContext
in interfaceorg.apache.camel.spi.HasCamelContext
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext) - Specified by:
setCamelContext
in interfaceorg.apache.camel.CamelContextAware
-
isLenientProperties
public boolean isLenientProperties()- Specified by:
isLenientProperties
in interfaceorg.apache.camel.spi.SendDynamicAware
-
prepare
public org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry prepare(org.apache.camel.Exchange exchange, String uri, String originalUri) throws Exception - Specified by:
prepare
in interfaceorg.apache.camel.spi.SendDynamicAware
- Throws:
Exception
-
resolveStaticUri
public String resolveStaticUri(org.apache.camel.Exchange exchange, org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry entry) throws Exception - Specified by:
resolveStaticUri
in interfaceorg.apache.camel.spi.SendDynamicAware
- Throws:
Exception
-
createPreProcessor
public org.apache.camel.Processor createPreProcessor(org.apache.camel.Exchange exchange, org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry entry) throws Exception - Specified by:
createPreProcessor
in interfaceorg.apache.camel.spi.SendDynamicAware
- Throws:
Exception
-
createPostProcessor
public org.apache.camel.Processor createPostProcessor(org.apache.camel.Exchange exchange, org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry entry) throws Exception - Specified by:
createPostProcessor
in interfaceorg.apache.camel.spi.SendDynamicAware
- Throws:
Exception
-