Package org.apache.activemq.network
Class LdapNetworkConnector
java.lang.Object
org.apache.activemq.network.NetworkBridgeConfiguration
org.apache.activemq.network.NetworkConnector
org.apache.activemq.network.LdapNetworkConnector
- All Implemented Interfaces:
EventListener,NamespaceChangeListener,NamingListener,ObjectChangeListener,org.apache.activemq.Service
public class LdapNetworkConnector
extends NetworkConnector
implements NamespaceChangeListener, ObjectChangeListener
class to create dynamic network connectors listed in an directory server
using the LDAP v3 protocol as defined in RFC 2251, the entries listed in the
directory server must implement the ipHost and ipService objectClasses as
defined in RFC 2307.
-
Field Summary
Fields inherited from class org.apache.activemq.network.NetworkConnector
bridges, connectionFilter, localURI, serviceSupportFields inherited from class org.apache.activemq.network.NetworkBridgeConfiguration
dynamicallyIncludedDestinations, excludedDestinations, staticallyIncludedDestinations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddConnector(SearchResult result) add connector of the given URIgetUri()returns the next URI from the configured listvoidinvoked when an exception has occurred during a persistent searchvoidobjectAdded(NamingEvent event) invoked when an entry has been added during a persistent searchvoidobjectChanged(NamingEvent event) invoked when an entry has been changed during a persistent searchvoidobjectRemoved(NamingEvent event) invoked when an entry has been removed during a persistent searchvoidobjectRenamed(NamingEvent event) invoked when an entry has been renamed during a persistent searchprotected voidremoveConnector(SearchResult result) remove connector of the given URIvoidsetAnonymousAuthentication(boolean anonymousAuthentication) sets LDAP anonymous authentication access credentialsvoidsets the base LDAP dn used for lookup operationsvoidsetPassword(String password) sets the LDAP password for access credentialsvoidsetSearchEventListener(boolean searchEventListener) enables/disable a persistent search to the LDAP server as defined in draft-ietf-ldapext-psearch-03.txt (2.16.840.1.113730.3.4.3)voidsetSearchFilter(String searchFilter) sets the LDAP search filter as defined in RFC 2254voidsetSearchScope(String searchScope) sets the LDAP search scopevoidsets the LDAP server URIvoidsets the LDAP user for access credentialsvoidstart()start the connectorvoidstop()stop the connectortoString()protected URItoURI(SearchResult result) convert search result into URIprotected StringtoUUID(SearchResult result) convert search result into URIMethods inherited from class org.apache.activemq.network.NetworkConnector
activeBridges, addDynamicallyIncludedDestination, addExcludedDestination, addStaticallyIncludedDestination, configureBridge, createLocalTransport, createNetworkBridgeObjectName, getBrokerService, getConnectionFilter, getDurableDestinations, getDurableTopicDestinations, getLocalUri, getObjectName, handleStart, handleStop, isStarted, isStopped, isStopping, registerNetworkBridgeMBean, removeDemandSubscription, setBrokerService, setConnectionFilter, setDurableDestinations, setLocalUri, setObjectName, unregisterNetworkBridgeMBeanMethods inherited from class org.apache.activemq.network.NetworkBridgeConfiguration
getAdvisoryAckPercentage, getAdvisoryPrefetchSize, getBridgeFactory, getBrokerName, getBrokerURL, getClientIdToken, getConsumerPriorityBase, getConsumerTTL, getDestinationFilter, getDynamicallyIncludedDestinations, getExcludedDestinations, getGcSweepTime, getMessageTTL, getName, getNetworkTTL, getPassword, getPrefetchSize, getRemotePassword, getRemoteUserName, getSslContext, getStaticallyIncludedDestinations, getUserName, isAdvisoryForFailedForward, isAlwaysSyncSend, isBridgeTempDestinations, isCheckDuplicateMessagesOnDuplex, isConduitNetworkQueueSubscriptions, isConduitSubscriptions, isDecreaseNetworkConsumerPriority, isDispatchAsync, isDuplex, isDynamicOnly, isGcDestinationViews, isStaticBridge, isSuppressDuplicateQueueSubscriptions, isSuppressDuplicateTopicSubscriptions, isSyncDurableSubs, isUseBrokerNamesAsIdSeed, isUseCompression, isUseVirtualDestSubs, setAdvisoryAckPercentage, setAdvisoryForFailedForward, setAdvisoryPrefetchSize, setAlwaysSyncSend, setBridgeFactory, setBridgeTempDestinations, setBrokerName, setBrokerURL, setCheckDuplicateMessagesOnDuplex, setClientIdToken, setConduitNetworkQueueSubscriptions, setConduitSubscriptions, setConsumerPriorityBase, setConsumerTTL, setDecreaseNetworkConsumerPriority, setDestinationFilter, setDispatchAsync, setDuplex, setDynamicallyIncludedDestinations, setDynamicOnly, setExcludedDestinations, setGcDestinationViews, setGcSweepTime, setMessageTTL, setName, setNetworkTTL, setPrefetchSize, setRemotePassword, setRemoteUserName, setSslContext, setStaticallyIncludedDestinations, setStaticBridge, setSuppressDuplicateQueueSubscriptions, setSuppressDuplicateTopicSubscriptions, setSyncDurableSubs, setUseBrokerNameAsIdSees, setUseCompression, setUserName, setUseVirtualDestSubs
-
Constructor Details
-
LdapNetworkConnector
public LdapNetworkConnector()
-
-
Method Details
-
getUri
returns the next URI from the configured list- Returns:
- random URI from the configured list
-
setUri
sets the LDAP server URI- Parameters:
uri- LDAP server URI- Throws:
Exception
-
setBase
sets the base LDAP dn used for lookup operations- Parameters:
base- LDAP base dn
-
setUser
sets the LDAP user for access credentials- Parameters:
user- LDAP dn of user
-
setPassword
sets the LDAP password for access credentials- Overrides:
setPasswordin classNetworkBridgeConfiguration- Parameters:
password- user password
-
setAnonymousAuthentication
public void setAnonymousAuthentication(boolean anonymousAuthentication) sets LDAP anonymous authentication access credentials- Parameters:
anonymousAuthentication- set to true to use anonymous authentication
-
setSearchScope
sets the LDAP search scope- Parameters:
searchScope- LDAP JNDI search scope- Throws:
Exception
-
setSearchFilter
sets the LDAP search filter as defined in RFC 2254- Parameters:
searchFilter- LDAP search filter- See Also:
-
setSearchEventListener
public void setSearchEventListener(boolean searchEventListener) enables/disable a persistent search to the LDAP server as defined in draft-ietf-ldapext-psearch-03.txt (2.16.840.1.113730.3.4.3)- Parameters:
searchEventListener- enable = true, disable = false (default)- See Also:
-
start
start the connector- Specified by:
startin interfaceorg.apache.activemq.Service- Overrides:
startin classNetworkConnector- Throws:
Exception
-
stop
stop the connector- Specified by:
stopin interfaceorg.apache.activemq.Service- Overrides:
stopin classNetworkConnector- Throws:
Exception
-
toString
-
addConnector
add connector of the given URI- Parameters:
result- search result of connector to add- Throws:
Exception
-
removeConnector
remove connector of the given URI- Parameters:
result- search result of connector to remove- Throws:
Exception
-
toURI
convert search result into URI- Parameters:
result- search result to convert to URI- Throws:
Exception
-
toUUID
convert search result into URI- Parameters:
result- search result to convert to URI
-
objectAdded
invoked when an entry has been added during a persistent search- Specified by:
objectAddedin interfaceNamespaceChangeListener
-
objectRemoved
invoked when an entry has been removed during a persistent search- Specified by:
objectRemovedin interfaceNamespaceChangeListener
-
objectRenamed
invoked when an entry has been renamed during a persistent search- Specified by:
objectRenamedin interfaceNamespaceChangeListener
-
objectChanged
invoked when an entry has been changed during a persistent search- Specified by:
objectChangedin interfaceObjectChangeListener
-
namingExceptionThrown
invoked when an exception has occurred during a persistent search- Specified by:
namingExceptionThrownin interfaceNamingListener
-