Package org.apache.camel.component.file
Class GenericFileComponent<T>
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultComponent
-
- org.apache.camel.component.file.GenericFileComponent<T>
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Component
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
- Direct Known Subclasses:
FileComponent
public abstract class GenericFileComponent<T> extends org.apache.camel.support.DefaultComponent
Base class file component. To be extended.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description GenericFileComponent()
GenericFileComponent(org.apache.camel.CamelContext context)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
afterPropertiesSet(GenericFileEndpoint<T> endpoint)
A factory method for derived file components to perform validation of propertiesprotected abstract GenericFileEndpoint<T>
buildFileEndpoint(String uri, String remaining, Map<String,Object> parameters)
A factory method for derived file components to create the endpointprotected GenericFileEndpoint<T>
createEndpoint(String uri, String remaining, Map<String,Object> parameters)
-
Methods inherited from class org.apache.camel.support.DefaultComponent
afterConfiguration, createEndpoint, createEndpoint, doBuild, doInit, doStart, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getDefaultName, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, resolveRawParameterValues, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, 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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
createEndpoint
protected GenericFileEndpoint<T> createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
- Specified by:
createEndpoint
in classorg.apache.camel.support.DefaultComponent
- Throws:
Exception
-
buildFileEndpoint
protected abstract GenericFileEndpoint<T> buildFileEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
A factory method for derived file components to create the endpoint- Parameters:
uri
- the full URI of the endpointremaining
- the remaining part of the URI without the query parameters or component prefixparameters
- the optional parameters passed in- Returns:
- a newly created endpoint or null if the endpoint cannot be created based on the inputs
- Throws:
Exception
- can be thrown
-
afterPropertiesSet
protected abstract void afterPropertiesSet(GenericFileEndpoint<T> endpoint) throws Exception
A factory method for derived file components to perform validation of properties- Parameters:
endpoint
- the endpoint- Throws:
Exception
- can be thrown in case of validation errors
-
-