org.apache.camel.component.rest
Class RestEndpoint
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.impl.DefaultEndpoint
org.apache.camel.component.rest.RestEndpoint
- All Implemented Interfaces:
- CamelContextAware, Endpoint, IsSingleton, Service, ShutdownableService, HasId, StatefulService, SuspendableService
@UriEndpoint(scheme="rest")
public class RestEndpoint
- extends DefaultEndpoint
| Methods inherited from class org.apache.camel.impl.DefaultEndpoint |
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, getPollingConsumerQueueSize, hashCode, isPollingConsumerBlockWhenFull, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString |
| Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
RestEndpoint
public RestEndpoint(String endpointUri,
RestComponent component)
getComponent
public RestComponent getComponent()
- Description copied from class:
DefaultEndpoint
- Returns the component that created this endpoint.
- Overrides:
getComponent in class DefaultEndpoint
- Returns:
- the component that created this endpoint, or null if
none set
getMethod
public String getMethod()
setMethod
public void setMethod(String method)
getPath
public String getPath()
setPath
public void setPath(String path)
getUriTemplate
public String getUriTemplate()
setUriTemplate
public void setUriTemplate(String uriTemplate)
getConsumes
public String getConsumes()
setConsumes
public void setConsumes(String consumes)
getProduces
public String getProduces()
setProduces
public void setProduces(String produces)
getComponentName
public String getComponentName()
setComponentName
public void setComponentName(String componentName)
getParameters
public Map<String,Object> getParameters()
setParameters
public void setParameters(Map<String,Object> parameters)
createProducer
public Producer createProducer()
throws Exception
- Description copied from interface:
Endpoint
- Creates a new producer which is used send messages into the endpoint
- Returns:
- a newly created producer
- Throws:
Exception - can be thrown
createConsumer
public Consumer createConsumer(Processor processor)
throws Exception
- Description copied from interface:
Endpoint
- Creates a new Event
Driven Consumer which consumes messages from the endpoint using the
given processor
- Parameters:
processor - the given processor
- Returns:
- a newly created consumer
- Throws:
Exception - can be thrown
isSingleton
public boolean isSingleton()
- Description copied from interface:
IsSingleton
- Whether this class supports being singleton or not.
- Returns:
- true to be a single shared instance, false to create new instances.
isLenientProperties
public boolean isLenientProperties()
- Description copied from interface:
Endpoint
- Should all properties be known or does the endpoint allow unknown options?
lenient = false means that the endpoint should validate that all
given options is known and configured properly.
lenient = true means that the endpoint allows additional unknown options to
be passed to it but does not throw a ResolveEndpointFailedException when creating
the endpoint.
This options is used by a few components for instance the HTTP based that can have
dynamic URI options appended that is targeted for an external system.
Most endpoints is configured to be not lenient.
- Specified by:
isLenientProperties in interface Endpoint- Overrides:
isLenientProperties in class DefaultEndpoint
- Returns:
- whether properties is lenient or not
Apache Camel