|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.support.ServiceSupport
org.apache.camel.impl.DefaultEndpoint
org.apache.camel.util.component.AbstractApiEndpoint<E,T>
public abstract class AbstractApiEndpoint<E extends ApiName,T>
Abstract base class for API Component Endpoints.
| Field Summary | |
|---|---|
protected E |
apiName
|
protected T |
configuration
|
protected String |
inBody
|
protected org.slf4j.Logger |
log
|
protected ApiMethodHelper<? extends ApiMethod> |
methodHelper
|
protected String |
methodName
|
| Fields inherited from class org.apache.camel.support.ServiceSupport |
|---|
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
| Constructor Summary | |
|---|---|
AbstractApiEndpoint(String endpointUri,
Component component,
E apiName,
String methodName,
ApiMethodHelper<? extends ApiMethod> methodHelper,
T endpointConfiguration)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.apache.camel.support.ServiceSupport |
|---|
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, 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 |
|---|
createConsumer, createProducer |
| Methods inherited from interface org.apache.camel.Service |
|---|
start, stop |
| Field Detail |
|---|
protected final org.slf4j.Logger log
protected final E extends ApiName apiName
protected final String methodName
protected final ApiMethodHelper<? extends ApiMethod> methodHelper
@UriParam protected final T configuration
@UriParam protected String inBody
| Constructor Detail |
|---|
public AbstractApiEndpoint(String endpointUri,
Component component,
E apiName,
String methodName,
ApiMethodHelper<? extends ApiMethod> methodHelper,
T endpointConfiguration)
| Method Detail |
|---|
public boolean isSingleton()
IsSingleton
isSingleton in interface IsSingletonprotected abstract ApiMethodPropertiesHelper<T> getPropertiesHelper()
ApiMethodPropertiesHelper to work with API properties.
public void configureProperties(Map<String,Object> options)
Endpoint
configureProperties in interface EndpointconfigureProperties in class DefaultEndpointoptions - the options (properties)protected abstract void afterConfigureProperties()
public void interceptPropertyNames(Set<String> propertyNames)
PropertyNamesInterceptor
interceptPropertyNames in interface PropertyNamesInterceptorpropertyNames - argument names.public void interceptProperties(Map<String,Object> properties)
PropertiesInterceptor
interceptProperties 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 name
IllegalArgumentException - for invalid parameter name.public final Set<String> getEndpointPropertyNames()
public final Map<String,Object> getEndpointProperties()
public abstract Object getApiProxy(ApiMethod method,
Map<String,Object> args)
AbstractApiConsumer or AbstractApiProducer.
method - method about to be invokedargs - method arguments
AbstractApiProducer,
AbstractApiConsumerpublic final ExecutorService getExecutorService()
protected abstract String getThreadProfileName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||