public class RestletComponent
extends org.apache.camel.impl.HeaderFilterStrategyComponent
implements org.apache.camel.spi.RestConsumerFactory, org.apache.camel.spi.RestApiConsumerFactory, org.apache.camel.spi.RestProducerFactory, org.apache.camel.SSLContextParametersAware
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 org.restlet.Server |
createServer(RestletEndpoint endpoint) |
void |
disconnect(RestletConsumer consumer) |
protected void |
doStart() |
protected void |
doStop() |
Boolean |
getControllerDaemon() |
Integer |
getControllerSleepTimeMs() |
List<String> |
getEnabledConverters() |
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() |
protected String |
preProcessUri(String uri)
Deprecated.
|
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 |
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.
|
protected void |
setupServerWithSSLContext(org.restlet.util.Series<org.restlet.data.Parameter> params,
org.apache.camel.util.jsse.SSLContextParameters scp) |
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 String |
stringArrayToString(String[] strings) |
protected boolean |
useIntrospectionOnEndpoint() |
getHeaderFilterStrategy, setEndpointHeaderFilterStrategy, setHeaderFilterStrategy
createComponentConfiguration, createParameterConfigurationMap, getEndpointClass, getParameterConfigurationMap, populateParameterConfigurationMap, setEndpointClass
afterConfiguration, createConfiguration, createEndpoint, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, ifStartsWithReturnRemainder, isResolvePropertyPlaceholders, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setCamelContext, setProperties, setProperties, setResolvePropertyPlaceholders, useRawUri, validateParameters, validateURI
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public 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.DefaultComponent
Exception
protected void doStart() throws Exception
doStart
in class org.apache.camel.impl.DefaultComponent
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.impl.DefaultComponent
Exception
protected boolean useIntrospectionOnEndpoint()
useIntrospectionOnEndpoint
in class org.apache.camel.impl.DefaultComponent
public void connect(RestletConsumer consumer) throws Exception
Exception
public void disconnect(RestletConsumer consumer) throws Exception
Exception
protected org.restlet.Server createServer(RestletEndpoint endpoint)
protected void setupServerWithSSLContext(org.restlet.util.Series<org.restlet.data.Parameter> params, org.apache.camel.util.jsse.SSLContextParameters scp) throws GeneralSecurityException, IOException
GeneralSecurityException
IOException
protected void addServerIfNecessary(RestletEndpoint endpoint) throws Exception
Exception
@Deprecated protected String preProcessUri(String uri)
preProcessUri
in class org.apache.camel.impl.DefaultComponent
public Boolean getControllerDaemon()
public void setControllerDaemon(Boolean controllerDaemon)
public Integer getControllerSleepTimeMs()
public void setControllerSleepTimeMs(Integer controllerSleepTimeMs)
public 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.SSLContextParametersAware
public void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)
setUseGlobalSslContextParameters
in interface org.apache.camel.SSLContextParametersAware
public 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.RestConsumerFactory
Exception
public 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.RestApiConsumerFactory
Exception
public 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.RestProducerFactory
Exception
Apache Camel