@Component(value="spark-rest")
public class SparkComponent
extends org.apache.camel.support.DefaultComponent
implements org.apache.camel.spi.RestConsumerFactory, org.apache.camel.spi.RestApiConsumerFactory
| Constructor and Description |
|---|
SparkComponent() |
| Modifier and Type | Method and Description |
|---|---|
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) |
protected void |
doShutdown() |
protected void |
doStart() |
String |
getIpAddress() |
String |
getKeystoreFile() |
String |
getKeystorePassword() |
int |
getMaxThreads() |
int |
getMinThreads() |
int |
getPort() |
SparkBinding |
getSparkBinding() |
SparkConfiguration |
getSparkConfiguration() |
spark.Service |
getSparkInstance() |
int |
getTimeOutMillis() |
String |
getTruststoreFile() |
String |
getTruststorePassword() |
void |
setIpAddress(String ipAddress)
Set the IP address that Spark should listen on.
|
void |
setKeystoreFile(String keystoreFile)
Configures connection to be secure to use the keystore file
|
void |
setKeystorePassword(String keystorePassword)
Configures connection to be secure to use the keystore password
|
void |
setMaxThreads(int maxThreads)
Maximum number of threads in Spark thread-pool (shared globally)
|
void |
setMinThreads(int minThreads)
Minimum number of threads in Spark thread-pool (shared globally)
|
void |
setPort(int port)
Port number.
|
void |
setSparkBinding(SparkBinding sparkBinding)
To use a custom SparkBinding to map to/from Camel message.
|
void |
setSparkConfiguration(SparkConfiguration sparkConfiguration)
To use the shared SparkConfiguration
|
void |
setTimeOutMillis(int timeOutMillis)
Thread idle timeout in millis where threads that has been idle for a longer period will be terminated from the thread pool
|
void |
setTruststoreFile(String truststoreFile)
Configures connection to be secure to use the truststore file
|
void |
setTruststorePassword(String truststorePassword)
Configures connection to be secure to use the truststore password
|
afterConfiguration, createEndpoint, createEndpoint, doInit, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, preProcessUri, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURIbuild, doBuild, doResume, doSuspend, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic spark.Service getSparkInstance()
public int getPort()
public void setPort(int port)
public String getIpAddress()
public void setIpAddress(String ipAddress)
public int getMinThreads()
public void setMinThreads(int minThreads)
public int getMaxThreads()
public void setMaxThreads(int maxThreads)
public int getTimeOutMillis()
public void setTimeOutMillis(int timeOutMillis)
public String getKeystoreFile()
public void setKeystoreFile(String keystoreFile)
public String getKeystorePassword()
public void setKeystorePassword(String keystorePassword)
public String getTruststoreFile()
public void setTruststoreFile(String truststoreFile)
public String getTruststorePassword()
public void setTruststorePassword(String truststorePassword)
public SparkConfiguration getSparkConfiguration()
public void setSparkConfiguration(SparkConfiguration sparkConfiguration)
public SparkBinding getSparkBinding()
public void setSparkBinding(SparkBinding sparkBinding)
protected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
createEndpoint in class org.apache.camel.support.DefaultComponentExceptionprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.DefaultComponentExceptionprotected void doShutdown()
throws Exception
doShutdown in class org.apache.camel.support.service.ServiceSupportExceptionpublic 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.RestApiConsumerFactoryExceptionApache Camel