Class TwilioEndpoint
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultEndpoint
-
- org.apache.camel.support.ScheduledPollEndpoint
-
- org.apache.camel.support.component.AbstractApiEndpoint<TwilioApiName,TwilioConfiguration>
-
- org.apache.camel.component.twilio.TwilioEndpoint
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.ApiEndpoint
,org.apache.camel.CamelContextAware
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasId
,org.apache.camel.StatefulService
,org.apache.camel.support.component.PropertiesInterceptor
,org.apache.camel.support.component.PropertyNamesInterceptor
,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="2.20.0", scheme="twilio", title="Twilio", syntax="twilio:apiName/methodName", apiSyntax="apiName/methodName", category={API,MESSAGING,CLOUD}) public class TwilioEndpoint extends org.apache.camel.support.component.AbstractApiEndpoint<TwilioApiName,TwilioConfiguration>
Interact with Twilio REST APIs using Twilio Java SDK.
-
-
Field Summary
Fields Modifier and Type Field Description protected TwilioComponent
component
protected static Map<String,String>
EXECUTOR_METHOD_MAP
-
Constructor Summary
Constructors Constructor Description TwilioEndpoint(String uri, TwilioComponent component, TwilioApiName apiName, String methodName, TwilioConfiguration endpointConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterConfigureProperties()
org.apache.camel.Consumer
createConsumer(org.apache.camel.Processor processor)
org.apache.camel.Producer
createProducer()
protected Object
doExecute(Object executor, String methodName, Map<String,Object> properties)
Object
execute(Object executor, org.apache.camel.support.component.ApiMethod method, Map<String,Object> properties)
Object
getApiProxy(org.apache.camel.support.component.ApiMethod method, Map<String,Object> args)
protected org.apache.camel.support.component.ApiMethodPropertiesHelper<TwilioConfiguration>
getPropertiesHelper()
com.twilio.http.TwilioRestClient
getRestClient()
protected String
getThreadProfileName()
-
Methods inherited from class org.apache.camel.support.component.AbstractApiEndpoint
configureConsumer, configureProperties, getApiName, getCandidates, getConfiguration, getEndpointProperties, getEndpointPropertyNames, getExecutorService, getInBody, getMethodHelper, getMethodName, interceptProperties, interceptPropertyNames, setInBody
-
Methods inherited from class org.apache.camel.support.ScheduledPollEndpoint
configureScheduledPollConsumerProperties, doConfigureConsumer, doStart, doStop, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDefaultDelay, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configurePollingConsumer, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.camel.Endpoint
createAsyncProducer, createExchange, createExchange, createPollingConsumer, getCamelContext, getEndpointBaseUri, getEndpointKey, getEndpointUri, isLenientProperties, isSingletonProducer, setCamelContext
-
-
-
-
Field Detail
-
component
protected final TwilioComponent component
-
-
Constructor Detail
-
TwilioEndpoint
public TwilioEndpoint(String uri, TwilioComponent component, TwilioApiName apiName, String methodName, TwilioConfiguration endpointConfiguration)
-
-
Method Detail
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
- Throws:
Exception
-
afterConfigureProperties
protected void afterConfigureProperties()
- Specified by:
afterConfigureProperties
in classorg.apache.camel.support.component.AbstractApiEndpoint<TwilioApiName,TwilioConfiguration>
-
getApiProxy
public Object getApiProxy(org.apache.camel.support.component.ApiMethod method, Map<String,Object> args)
- Specified by:
getApiProxy
in classorg.apache.camel.support.component.AbstractApiEndpoint<TwilioApiName,TwilioConfiguration>
-
execute
public Object execute(Object executor, org.apache.camel.support.component.ApiMethod method, Map<String,Object> properties)
-
doExecute
protected Object doExecute(Object executor, String methodName, Map<String,Object> properties) throws Exception
- Throws:
Exception
-
getPropertiesHelper
protected org.apache.camel.support.component.ApiMethodPropertiesHelper<TwilioConfiguration> getPropertiesHelper()
- Specified by:
getPropertiesHelper
in classorg.apache.camel.support.component.AbstractApiEndpoint<TwilioApiName,TwilioConfiguration>
-
getThreadProfileName
protected String getThreadProfileName()
- Specified by:
getThreadProfileName
in classorg.apache.camel.support.component.AbstractApiEndpoint<TwilioApiName,TwilioConfiguration>
-
getRestClient
public com.twilio.http.TwilioRestClient getRestClient()
-
-