Package org.apache.camel.http.base
Class HttpSendDynamicAware
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.component.SendDynamicAwareSupport
org.apache.camel.http.base.HttpSendDynamicAware
- 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
public class HttpSendDynamicAware
extends org.apache.camel.support.component.SendDynamicAwareSupport
HTTP based
SendDynamicAware which allows to optimise HTTP components with the toD
(dynamic to) DSL in Camel. This implementation optimises by allowing to provide dynamic parameters via
Exchange.HTTP_PATH and Exchange.HTTP_QUERY headers 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.ProcessorcreatePostProcessor(org.apache.camel.Exchange exchange, org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry entry) org.apache.camel.ProcessorcreatePreProcessor(org.apache.camel.Exchange exchange, org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry entry) booleanString[]parseUri(org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry entry) Parses the uri into a string array with 3 elements. 0 = host:port 1 = path 2 = authorityorg.apache.camel.spi.SendDynamicAware.DynamicAwareEntryresolveStaticUri(org.apache.camel.Exchange exchange, org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry entry) Methods inherited from class org.apache.camel.support.component.SendDynamicAwareSupport
asEndpointUri, doInit, endpointLenientProperties, endpointProperties, getCamelContext, getScheme, resolveRawParameterValues, setCamelContext, setSchemeMethods 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, suspend
-
Constructor Details
-
HttpSendDynamicAware
public HttpSendDynamicAware()
-
-
Method Details
-
isLenientProperties
public boolean isLenientProperties() -
prepare
public org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry prepare(org.apache.camel.Exchange exchange, String uri, String originalUri) throws Exception - Throws:
Exception
-
resolveStaticUri
public String resolveStaticUri(org.apache.camel.Exchange exchange, org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry entry) throws Exception - Throws:
Exception
-
createPreProcessor
public org.apache.camel.Processor createPreProcessor(org.apache.camel.Exchange exchange, org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry entry) throws Exception - Throws:
Exception
-
createPostProcessor
public org.apache.camel.Processor createPostProcessor(org.apache.camel.Exchange exchange, org.apache.camel.spi.SendDynamicAware.DynamicAwareEntry entry) throws Exception - Throws:
Exception
-
parseUri
Parses the uri into a string array with 3 elements. 0 = host:port 1 = path 2 = authority
-