public abstract class AbstractApiEndpoint<E extends ApiName,T> extends DefaultEndpoint implements PropertyNamesInterceptor, PropertiesInterceptor
| Modifier and Type | Field and Description |
|---|---|
protected E |
apiName |
protected T |
configuration |
protected String |
inBody |
protected org.slf4j.Logger |
log |
protected ApiMethodHelper<? extends ApiMethod> |
methodHelper |
protected String |
methodName |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Constructor and Description |
|---|
AbstractApiEndpoint(String endpointUri,
Component component,
E apiName,
String methodName,
ApiMethodHelper<? extends ApiMethod> methodHelper,
T endpointConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
afterConfigureProperties()
Initialize proxies, create server connections, etc.
|
void |
configureProperties(Map<String,Object> options)
Configure properties on this endpoint.
|
E |
getApiName()
Returns API name.
|
abstract Object |
getApiProxy(ApiMethod method,
Map<String,Object> args)
Returns an instance of an API Proxy based on apiName, method and args.
|
List<ApiMethod> |
getCandidates()
Returns candidate methods for this endpoint.
|
T |
getConfiguration()
Returns endpoint configuration object.
|
Map<String,Object> |
getEndpointProperties() |
Set<String> |
getEndpointPropertyNames() |
ExecutorService |
getExecutorService() |
String |
getInBody()
Returns name of parameter passed in the exchange In Body.
|
ApiMethodHelper<? extends ApiMethod> |
getMethodHelper()
Returns method helper.
|
String |
getMethodName()
Returns method name.
|
protected abstract ApiMethodPropertiesHelper<T> |
getPropertiesHelper()
Returns generated helper that extends
ApiMethodPropertiesHelper to work with API properties. |
protected abstract String |
getThreadProfileName()
Returns Thread profile name.
|
void |
interceptProperties(Map<String,Object> properties)
Intercept method invocation arguments used to find and invoke API method.
|
void |
interceptPropertyNames(Set<String> propertyNames)
Intercept property names used to find API Method.
|
boolean |
isSingleton()
Whether this class supports being singleton or not.
|
void |
setInBody(String inBody)
Sets the name of a parameter to be passed in the exchange In Body.
|
configureConsumer, configurePollingConsumer, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, getPollingConsumerQueueSize, hashCode, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toStringdoResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, finalize, getClass, notify, notifyAll, wait, wait, waitcreateConsumer, createProducerprotected final org.slf4j.Logger log
protected final String methodName
protected final ApiMethodHelper<? extends ApiMethod> methodHelper
protected final T configuration
@UriParam protected String inBody
public boolean isSingleton()
IsSingletonisSingleton in interface IsSingletonprotected abstract ApiMethodPropertiesHelper<T> getPropertiesHelper()
ApiMethodPropertiesHelper to work with API properties.public void configureProperties(Map<String,Object> options)
EndpointconfigureProperties in interface EndpointconfigureProperties in class DefaultEndpointoptions - the options (properties)protected abstract void afterConfigureProperties()
public void interceptPropertyNames(Set<String> propertyNames)
PropertyNamesInterceptorinterceptPropertyNames in interface PropertyNamesInterceptorpropertyNames - argument names.public void interceptProperties(Map<String,Object> properties)
PropertiesInterceptorinterceptProperties in interface PropertiesInterceptorproperties - method invocation arguments.public final T getConfiguration()
public final E getApiName()
public final String getMethodName()
public final ApiMethodHelper<? extends ApiMethod> getMethodHelper()
public final List<ApiMethod> getCandidates()
public final String getInBody()
public final void setInBody(String inBody) throws IllegalArgumentException
inBody - parameter nameIllegalArgumentException - for invalid parameter name.public abstract Object getApiProxy(ApiMethod method, Map<String,Object> args)
AbstractApiConsumer or AbstractApiProducer.method - method about to be invokedargs - method argumentsAbstractApiProducer,
AbstractApiConsumerpublic final ExecutorService getExecutorService()
protected abstract String getThreadProfileName()
Apache Camel