public class RestletComponent
extends org.apache.camel.impl.HeaderFilterStrategyComponent
implements org.apache.camel.spi.RestConsumerFactory
| Constructor and Description |
|---|
RestletComponent() |
RestletComponent(org.restlet.Component component) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addServerIfNecessary(RestletEndpoint endpoint) |
void |
connect(RestletConsumer consumer) |
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) |
protected org.restlet.Server |
createServer(RestletEndpoint endpoint) |
void |
disconnect(RestletConsumer consumer) |
protected void |
doStart() |
protected void |
doStop() |
Boolean |
getControllerDaemon() |
Integer |
getControllerSleepTimeMs() |
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() |
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 |
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.
|
protected String |
stringArrayToString(String[] strings) |
protected boolean |
useIntrospectionOnEndpoint() |
getHeaderFilterStrategy, setEndpointHeaderFilterStrategy, setHeaderFilterStrategycreateComponentConfiguration, createParameterConfigurationMap, getEndpointClass, getParameterConfigurationMap, populateParameterConfigurationMap, setEndpointClassafterConfiguration, createConfiguration, createEndpoint, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, ifStartsWithReturnRemainder, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setCamelContext, setProperties, useRawUri, validateParameters, validateURIpublic 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 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
GeneralSecurityExceptionIOExceptionprotected void addServerIfNecessary(RestletEndpoint endpoint) throws Exception
Exception@Deprecated protected String preProcessUri(String uri)
preProcessUri in class org.apache.camel.impl.DefaultComponentpublic 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 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.RestConsumerFactoryExceptionApache Camel