Class LdapEndpoint

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

    @UriEndpoint(firstVersion="1.5.0",
                 scheme="ldap",
                 title="LDAP",
                 syntax="ldap:dirContextName",
                 producerOnly=true,
                 category={SEARCH,LDAP})
    public class LdapEndpoint
    extends org.apache.camel.support.DefaultEndpoint
    Perform searches on LDAP servers.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String OBJECT_SCOPE  
      static String ONELEVEL_SCOPE  
      static String SUBTREE_SCOPE  
      static String SYSTEM_DN  
      • 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 Concrete Methods 
      Modifier and Type Method Description
      org.apache.camel.Consumer createConsumer​(org.apache.camel.Processor processor)  
      org.apache.camel.Producer createProducer()  
      String getBase()  
      String getDirContextName()  
      Integer getPageSize()  
      String getReturnedAttributes()  
      String getScope()  
      void setBase​(String base)
      The base DN for searches.
      void setDirContextName​(String dirContextName)
      Name of either a DirContext, or Hashtable, or Map bean to lookup in the registry.
      void setPageSize​(Integer pageSize)
      When specified the ldap module uses paging to retrieve all results (most LDAP Servers throw an exception when trying to retrieve more than 1000 entries in one query).
      void setReturnedAttributes​(String returnedAttributes)
      Comma-separated list of attributes that should be set in each entry of the result
      void setScope​(String scope)
      Specifies how deeply to search the tree of entries, starting at the base DN.
      • Methods inherited from class org.apache.camel.support.DefaultEndpoint

        configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
      • Methods inherited from class org.apache.camel.support.service.BaseService

        build, doBuild, 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.Endpoint

        getEndpointBaseUri, isSingletonProducer
      • 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
    • Method Detail

      • createConsumer

        public org.apache.camel.Consumer createConsumer​(org.apache.camel.Processor processor)
                                                 throws Exception
        Throws:
        Exception
      • createProducer

        public org.apache.camel.Producer createProducer()
                                                 throws Exception
        Throws:
        Exception
      • getDirContextName

        public String getDirContextName()
      • setDirContextName

        public void setDirContextName​(String dirContextName)
        Name of either a DirContext, or Hashtable, or Map bean to lookup in the registry. If the bean is either a Hashtable or Map then a new DirContext instance is created for each use. If the bean is a DirContext then the bean is used as given. The latter may not be possible in all situations where the DirContext must not be shared, and in those situations it can be better to use Hashtable or Map instead.
      • setPageSize

        public void setPageSize​(Integer pageSize)
        When specified the ldap module uses paging to retrieve all results (most LDAP Servers throw an exception when trying to retrieve more than 1000 entries in one query). To be able to use this a LdapContext (subclass of DirContext) has to be passed in as ldapServerBean (otherwise an exception is thrown)
      • getPageSize

        public Integer getPageSize()
      • getBase

        public String getBase()
      • setBase

        public void setBase​(String base)
        The base DN for searches.
      • getScope

        public String getScope()
      • setScope

        public void setScope​(String scope)
        Specifies how deeply to search the tree of entries, starting at the base DN.
      • getReturnedAttributes

        public String getReturnedAttributes()
      • setReturnedAttributes

        public void setReturnedAttributes​(String returnedAttributes)
        Comma-separated list of attributes that should be set in each entry of the result