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.support.HealthCheckComponent
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.spi.HasCamelContext, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
Direct Known Subclasses:
FileComponent

public abstract class GenericFileComponent<T> extends org.apache.camel.support.HealthCheckComponent
Base class file component. To be extended.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.slf4j.Logger
     

    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
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    GenericFileComponent(org.apache.camel.CamelContext context)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    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
    createEndpoint(String uri, String remaining, Map<String,Object> parameters)
     

    Methods inherited from class org.apache.camel.support.HealthCheckComponent

    isHealthCheckConsumerEnabled, isHealthCheckProducerEnabled, setHealthCheckConsumerEnabled, setHealthCheckProducerEnabled

    Methods inherited from class org.apache.camel.support.DefaultComponent

    afterConfiguration, createEndpoint, createEndpoint, doBuild, doInit, 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, doStart, doStop, 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

    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 Details

    • log

      protected org.slf4j.Logger log
  • Constructor Details

    • GenericFileComponent

      protected GenericFileComponent()
    • GenericFileComponent

      protected GenericFileComponent(org.apache.camel.CamelContext context)
  • Method Details

    • createEndpoint

      protected GenericFileEndpoint<T> createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
      Specified by:
      createEndpoint in class org.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 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