Class 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  
      • Fields inherited from class org.apache.camel.support.service.BaseService

        BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
    • 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 properties
      protected abstract GenericFileEndpoint<T> buildFileEndpoint​(String uri, String remaining, Map<String,​Object> parameters)
      A factory method for derived file components to create the endpoint
      protected 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 interface org.apache.camel.Service

        build, close, init, start, stop
      • Methods inherited from interface org.apache.camel.ShutdownableService

        shutdown
      • Methods inherited from interface org.apache.camel.StatefulService

        getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
      • Methods inherited from interface org.apache.camel.SuspendableService

        isSuspended, resume, suspend
    • Field Detail

      • log

        protected org.slf4j.Logger log
    • Constructor Detail

      • GenericFileComponent

        public GenericFileComponent()
      • GenericFileComponent

        public GenericFileComponent​(org.apache.camel.CamelContext context)
    • Method Detail

      • 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 endpoint
        remaining - the remaining part of the URI without the query parameters or component prefix
        parameters - 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