@UriEndpoint(firstVersion="2.0.0", scheme="restlet", title="Restlet", syntax="restlet:protocol:host:port/uriPattern", consumerClass=RestletConsumer.class, label="rest", lenientProperties=true) public class RestletEndpoint extends org.apache.camel.impl.DefaultEndpoint implements org.apache.camel.AsyncEndpoint, org.apache.camel.spi.HeaderFilterStrategyAware
Constructor and Description |
---|
RestletEndpoint(RestletComponent component,
String remaining) |
Modifier and Type | Method and Description |
---|---|
void |
connect(RestletConsumer restletConsumer) |
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Exchange |
createExchange() |
org.apache.camel.Producer |
createProducer() |
void |
disconnect(RestletConsumer restletConsumer) |
protected void |
doStart() |
protected void |
doStop() |
int |
getConnectTimeout() |
org.apache.camel.http.common.cookie.CookieHandler |
getCookieHandler() |
org.apache.camel.ExchangePattern |
getExchangePattern() |
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy() |
String |
getHost() |
int |
getPort() |
String |
getProtocol() |
Map<String,Object> |
getQueryParameters() |
RestletBinding |
getRestletBinding() |
org.restlet.data.Method |
getRestletMethod() |
org.restlet.data.Method[] |
getRestletMethods() |
Map<String,String> |
getRestletRealm() |
List<String> |
getRestletUriPatterns()
Deprecated.
|
int |
getSocketTimeout() |
org.apache.camel.util.jsse.SSLContextParameters |
getSslContextParameters() |
String |
getUriPattern() |
boolean |
isAutoCloseStream() |
boolean |
isDisableStreamCache() |
boolean |
isLenientProperties() |
boolean |
isSingleton() |
boolean |
isStreamRepresentation() |
boolean |
isThrowExceptionOnFailure() |
void |
setAutoCloseStream(boolean autoCloseStream)
Whether to auto close the stream representation as response from calling a REST service using the restlet producer.
|
void |
setCompleteEndpointUri(String uri) |
void |
setConnectTimeout(int connectTimeout)
The Client will give up connection if the connection is timeout, 0 for unlimited wait.
|
void |
setCookieHandler(org.apache.camel.http.common.cookie.CookieHandler cookieHandler)
Configure a cookie handler to maintain a HTTP session
|
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 |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
To use a custom HeaderFilterStrategy to filter header to and from Camel message.
|
void |
setHost(String host)
The hostname of the restlet service
|
void |
setPort(int port)
The port number of the restlet service
|
void |
setProtocol(String protocol)
The protocol to use which is http or https
|
void |
setQueryParameters(Map<String,Object> queryParameters)
Additional query parameters for producer
|
void |
setRestletBinding(RestletBinding restletBinding)
To use a custom RestletBinding to bind between Restlet and Camel message.
|
void |
setRestletMethod(org.restlet.data.Method restletMethod)
On a producer endpoint, specifies the request method to use.
|
void |
setRestletMethods(org.restlet.data.Method[] restletMethods)
Specify one or more methods separated by commas (e.g.
|
void |
setRestletRealm(Map<String,String> restletRealm)
To configure the security realms of restlet as a map.
|
void |
setRestletUriPatterns(List<String> restletUriPatterns)
Deprecated.
|
void |
setSocketTimeout(int socketTimeout)
The Client socket receive timeout, 0 for unlimited wait.
|
void |
setSslContextParameters(org.apache.camel.util.jsse.SSLContextParameters scp)
To configure security using SSLContextParameters.
|
void |
setStreamRepresentation(boolean streamRepresentation)
Whether to support stream representation as response from calling a REST service using the restlet producer.
|
void |
setThrowExceptionOnFailure(boolean throwExceptionOnFailure)
Whether to throw exception on a producer failure.
|
void |
setUriPattern(String uriPattern)
The resource pattern such as /customer/{id}
|
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public RestletEndpoint(RestletComponent component, String remaining) throws Exception
Exception
public void setCompleteEndpointUri(String uri)
public boolean isSingleton()
isSingleton
in interface org.apache.camel.IsSingleton
public boolean isLenientProperties()
isLenientProperties
in interface org.apache.camel.Endpoint
isLenientProperties
in class org.apache.camel.impl.DefaultEndpoint
public org.apache.camel.Exchange createExchange()
createExchange
in interface org.apache.camel.Endpoint
createExchange
in class org.apache.camel.impl.DefaultEndpoint
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
createConsumer
in interface org.apache.camel.Endpoint
Exception
public org.apache.camel.Producer createProducer() throws Exception
createProducer
in interface org.apache.camel.Endpoint
Exception
public void connect(RestletConsumer restletConsumer) throws Exception
Exception
public void disconnect(RestletConsumer restletConsumer) throws Exception
Exception
public org.restlet.data.Method getRestletMethod()
public void setRestletMethod(org.restlet.data.Method restletMethod)
public String getProtocol()
public void setProtocol(String protocol)
public String getHost()
public void setHost(String host)
public int getPort()
public void setPort(int port)
public int getSocketTimeout()
public void setSocketTimeout(int socketTimeout)
public int getConnectTimeout()
public void setConnectTimeout(int connectTimeout)
public String getUriPattern()
public void setUriPattern(String uriPattern)
public RestletBinding getRestletBinding()
public void setRestletBinding(RestletBinding restletBinding)
public void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
setHeaderFilterStrategy
in interface org.apache.camel.spi.HeaderFilterStrategyAware
public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
getHeaderFilterStrategy
in interface org.apache.camel.spi.HeaderFilterStrategyAware
public void setRestletRealm(Map<String,String> restletRealm)
public org.apache.camel.ExchangePattern getExchangePattern()
getExchangePattern
in class org.apache.camel.impl.DefaultEndpoint
public void setRestletMethods(org.restlet.data.Method[] restletMethods)
public org.restlet.data.Method[] getRestletMethods()
@Deprecated public void setRestletUriPatterns(List<String> restletUriPatterns)
@Deprecated public List<String> getRestletUriPatterns()
public boolean isThrowExceptionOnFailure()
public void setThrowExceptionOnFailure(boolean throwExceptionOnFailure)
public boolean isDisableStreamCache()
public void setDisableStreamCache(boolean disableStreamCache)
public org.apache.camel.util.jsse.SSLContextParameters getSslContextParameters()
public void setSslContextParameters(org.apache.camel.util.jsse.SSLContextParameters scp)
public boolean isStreamRepresentation()
public void setStreamRepresentation(boolean streamRepresentation)
InputStream
as the
message body on the Camel Message
body. If using this option you may want to enable the
autoCloseStream option as well to ensure the input stream is closed when the Camel Exchange
is done being routed. However if you need to read the stream outside a Camel route, you may need
to not auto close the stream.public boolean isAutoCloseStream()
public void setAutoCloseStream(boolean autoCloseStream)
InputStream
from the streaming response to ensure the input stream is closed when the Camel Exchange
is done being routed. However if you need to read the stream outside a Camel route, you may need
to not auto close the stream.public org.apache.camel.http.common.cookie.CookieHandler getCookieHandler()
public void setCookieHandler(org.apache.camel.http.common.cookie.CookieHandler cookieHandler)
public void setQueryParameters(Map<String,Object> queryParameters)
protected void doStart() throws Exception
doStart
in class org.apache.camel.impl.DefaultEndpoint
Exception
Apache Camel