public class RestletComponent
extends org.apache.camel.impl.DefaultComponent
implements org.apache.camel.spi.RestConsumerFactory, org.apache.camel.spi.RestApiConsumerFactory, org.apache.camel.spi.RestProducerFactory, org.apache.camel.SSLContextParametersAware, org.apache.camel.spi.HeaderFilterStrategyAware
| Constructor and Description |
|---|
RestletComponent() |
RestletComponent(org.restlet.Component component) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addServerIfNecessary(RestletEndpoint endpoint) |
protected static void |
cleanupConverters(List<String> converters) |
void |
connect(RestletConsumer consumer) |
org.apache.camel.Consumer |
createApiConsumer(org.apache.camel.CamelContext camelContext,
org.apache.camel.Processor processor,
String contextPath,
org.apache.camel.spi.RestConfiguration configuration,
Map<String,Object> parameters) |
org.apache.camel.Consumer |
createConsumer(org.apache.camel.CamelContext camelContext,
org.apache.camel.Processor processor,
String verb,
String basePath,
String uriTemplate,
String consumes,
String produces,
org.apache.camel.spi.RestConfiguration configuration,
Map<String,Object> parameters) |
protected org.apache.camel.Endpoint |
createEndpoint(String uri,
String remaining,
Map<String,Object> parameters) |
org.apache.camel.Producer |
createProducer(org.apache.camel.CamelContext camelContext,
String host,
String verb,
String basePath,
String uriTemplate,
String queryParameters,
String consumes,
String produces,
Map<String,Object> parameters) |
protected RestletHost |
createRestletHost() |
void |
disconnect(RestletConsumer consumer) |
protected void |
doStart() |
protected void |
doStop() |
Boolean |
getControllerDaemon() |
Integer |
getControllerSleepTimeMs() |
List<String> |
getEnabledConverters() |
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy() |
Integer |
getInboundBufferSize() |
Integer |
getLowThreads() |
Integer |
getMaxConnectionsPerHost() |
Integer |
getMaxQueued() |
Integer |
getMaxThreads() |
Integer |
getMaxTotalConnections() |
Integer |
getMinThreads() |
Integer |
getOutboundBufferSize() |
Boolean |
getPersistingConnections() |
Boolean |
getPipeliningConnections() |
int |
getPort() |
Boolean |
getReuseAddress() |
Boolean |
getSynchronous() |
Integer |
getThreadMaxIdleTimeMs() |
Boolean |
getUseForwardedForHeader() |
boolean |
isDisableStreamCache() |
boolean |
isUseGlobalSslContextParameters() |
void |
setControllerDaemon(Boolean controllerDaemon)
Indicates if the controller thread should be a daemon (not blocking JVM exit).
|
void |
setControllerSleepTimeMs(Integer controllerSleepTimeMs)
Time for the controller thread to sleep between each control.
|
void |
setDisableStreamCache(boolean disableStreamCache)
Determines whether or not the raw input stream from Restlet is cached or not
(Camel will read the stream into a in memory/overflow to file, Stream caching) cache.
|
void |
setEnabledConverters(List<String> enabledConverters)
A list of converters to enable as full class name or simple class name.
|
void |
setEnabledConverters(String enabledConverters)
A comma separated list of converters to enable as full class name or simple
class name.
|
void |
setEndpointHeaderFilterStrategy(org.apache.camel.Endpoint endpoint) |
void |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy)
To use a custom
HeaderFilterStrategy to filter header to and from Camel message. |
void |
setInboundBufferSize(Integer inboundBufferSize)
The size of the buffer when reading messages.
|
void |
setLowThreads(Integer lowThreads)
Number of worker threads determining when the connector is considered overloaded.
|
void |
setMaxConnectionsPerHost(Integer maxConnectionsPerHost)
Maximum number of concurrent connections per host (IP address).
|
void |
setMaxQueued(Integer maxQueued)
Maximum number of calls that can be queued if there aren't any worker thread available to service them.
|
void |
setMaxThreads(Integer maxThreads)
Maximum threads that will service requests.
|
void |
setMaxTotalConnections(Integer maxTotalConnections)
Maximum number of concurrent connections in total.
|
void |
setMinThreads(Integer minThreads)
Minimum threads waiting to service requests.
|
void |
setOutboundBufferSize(Integer outboundBufferSize)
The size of the buffer when writing messages.
|
void |
setPersistingConnections(Boolean persistingConnections)
Indicates if connections should be kept alive after a call.
|
void |
setPipeliningConnections(Boolean pipeliningConnections)
Indicates if pipelining connections are supported.
|
void |
setPort(int port)
To configure the port number for the restlet consumer routes.
|
void |
setReuseAddress(Boolean reuseAddress)
Enable/disable the SO_REUSEADDR socket option.
|
void |
setSynchronous(Boolean synchronous)
Whether to use synchronous Restlet Client for the producer.
|
void |
setThreadMaxIdleTimeMs(Integer threadMaxIdleTimeMs)
Time for an idle thread to wait for an operation before being collected.
|
void |
setUseForwardedForHeader(Boolean useForwardedForHeader)
Lookup the "X-Forwarded-For" header supported by popular proxies and caches and uses it to populate the Request.getClientAddresses()
method result.
|
void |
setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)
Enable usage of global SSL context parameters.
|
protected boolean |
useIntrospectionOnEndpoint() |
afterConfiguration, createComponentConfiguration, createConfiguration, createEndpoint, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isResolvePropertyPlaceholders, preProcessUri, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setCamelContext, setProperties, setProperties, setResolvePropertyPlaceholders, useRawUri, validateParameters, validateURIdoResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic RestletComponent()
public RestletComponent(org.restlet.Component component)
protected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
createEndpoint in class org.apache.camel.impl.DefaultComponentExceptionprotected void doStart()
throws Exception
doStart in class org.apache.camel.impl.DefaultComponentExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.impl.DefaultComponentExceptionprotected boolean useIntrospectionOnEndpoint()
useIntrospectionOnEndpoint in class org.apache.camel.impl.DefaultComponentpublic void connect(RestletConsumer consumer) throws Exception
Exceptionpublic void disconnect(RestletConsumer consumer) throws Exception
Exceptionprotected void addServerIfNecessary(RestletEndpoint endpoint) throws Exception
Exceptionprotected RestletHost createRestletHost()
public Boolean getControllerDaemon()
public void setControllerDaemon(Boolean controllerDaemon)
public Integer getControllerSleepTimeMs()
public void setControllerSleepTimeMs(Integer controllerSleepTimeMs)
public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
getHeaderFilterStrategy in interface org.apache.camel.spi.HeaderFilterStrategyAwarepublic void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy)
HeaderFilterStrategy to filter header to and from Camel message.setHeaderFilterStrategy in interface org.apache.camel.spi.HeaderFilterStrategyAwarepublic Integer getInboundBufferSize()
public void setInboundBufferSize(Integer inboundBufferSize)
public Integer getMaxConnectionsPerHost()
public void setMaxConnectionsPerHost(Integer maxConnectionsPerHost)
public Integer getMaxThreads()
public void setMaxThreads(Integer maxThreads)
public Integer getLowThreads()
public void setLowThreads(Integer lowThreads)
public Integer getMaxTotalConnections()
public void setMaxTotalConnections(Integer maxTotalConnections)
public Integer getMinThreads()
public void setMinThreads(Integer minThreads)
public Integer getOutboundBufferSize()
public void setOutboundBufferSize(Integer outboundBufferSize)
public Boolean getPersistingConnections()
public void setPersistingConnections(Boolean persistingConnections)
public Boolean getPipeliningConnections()
public void setPipeliningConnections(Boolean pipeliningConnections)
public Integer getThreadMaxIdleTimeMs()
public void setThreadMaxIdleTimeMs(Integer threadMaxIdleTimeMs)
public Boolean getUseForwardedForHeader()
public void setUseForwardedForHeader(Boolean useForwardedForHeader)
public Boolean getReuseAddress()
public void setReuseAddress(Boolean reuseAddress)
public Integer getMaxQueued()
public void setMaxQueued(Integer maxQueued)
public boolean isDisableStreamCache()
public void setDisableStreamCache(boolean disableStreamCache)
public int getPort()
public void setPort(int port)
public Boolean getSynchronous()
public void setSynchronous(Boolean synchronous)
public void setEnabledConverters(List<String> enabledConverters)
public void setEnabledConverters(String enabledConverters)
public boolean isUseGlobalSslContextParameters()
isUseGlobalSslContextParameters in interface org.apache.camel.SSLContextParametersAwarepublic void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)
setUseGlobalSslContextParameters in interface org.apache.camel.SSLContextParametersAwarepublic org.apache.camel.Consumer createConsumer(org.apache.camel.CamelContext camelContext,
org.apache.camel.Processor processor,
String verb,
String basePath,
String uriTemplate,
String consumes,
String produces,
org.apache.camel.spi.RestConfiguration configuration,
Map<String,Object> parameters)
throws Exception
createConsumer in interface org.apache.camel.spi.RestConsumerFactoryExceptionpublic org.apache.camel.Consumer createApiConsumer(org.apache.camel.CamelContext camelContext,
org.apache.camel.Processor processor,
String contextPath,
org.apache.camel.spi.RestConfiguration configuration,
Map<String,Object> parameters)
throws Exception
createApiConsumer in interface org.apache.camel.spi.RestApiConsumerFactoryExceptionpublic org.apache.camel.Producer createProducer(org.apache.camel.CamelContext camelContext,
String host,
String verb,
String basePath,
String uriTemplate,
String queryParameters,
String consumes,
String produces,
Map<String,Object> parameters)
throws Exception
createProducer in interface org.apache.camel.spi.RestProducerFactoryExceptionpublic void setEndpointHeaderFilterStrategy(org.apache.camel.Endpoint endpoint)
Apache Camel