Skip navigation links

OracleVirtual Directory Java API Reference
11g Release 1 (11.1.1)

E10688-02


com.octetstring.vde.router
Class BaseRoutingPlugin

java.lang.Object
  extended by com.octetstring.vde.router.BaseRoutingPlugin


public abstract class BaseRoutingPlugin
extends java.lang.Object

This class implements the Routing Plug-In which allows for custom decision logic to be added to VDE's routing system. The class provides two methods that are meant to be overridden with custom logic. All other methods of this parent class are provided to allow the plug-in logic to query the routing system as to configuration options.

Note that this plug-in essentially replaces VDE Router logic surrounding inclusion and exclusion in determining regarding whether a particular adapter should be used for an ldap operation.

When the plug-in is enabled, you can store additional configuration information in the routing-include and routing-exclude parameters. The values of these parameters can be retrieved by calling this.getInclFilter() and this.getExclFilter(). As the name implies the values returned by these methods must be valid LDAP filters.

The two main methods that can be extended are isEligible(Filter) and isEligible(Entry). Typically the first is called by the routing engine during LDAP search operations, while the latter is called during all other operations and an entry (or just a DN in the case of a delete) is present.


Constructor Summary
BaseRoutingPlugin(com.octetstring.vde.router.RoutingRule rule)
          Constructor BaseRoutingPlugin.

 

Method Summary
 java.lang.String getAdapterNumStr()
          Method getAdapterNumStr returns a String representation of the current adapter number.
 Filter getExclFilter()
          Method getExclFilter returns the exclusion filter specified for this adapter in adapters.prop.
 int getExclScope()
          Method getExclScope returns the scope defined in the routing-exclude statement in adapters.prop.
 Filter getInclFilter()
          Method getInclFilter returns the inclusion filter specified for this adapter in adapters.prop.
 int getInclScope()
          Method getInclScope.returns the scope defined in the routing-include statement in adapters.prop.
 int getPriority()
          Method getPriority returns the adapters priority level as defined in adapters.prop (default is 50).
 java.util.Vector getRetrieveAttrs()
          Method getRetrieveAttrs returns a Vector of DirectoryString values representing the retrievable attributes defined for this adapter.
 java.util.Vector getStoreAttrs()
          Method getStoreAttrs returns a Vector of DirectoryString values representing the modifiable attributes defined for this adapter.
 DirectoryString getSuffix()
          Method getSuffix returns a DirectoryString value representing the virtual base or "backend.x.root" of the adapter.
 boolean isCritical()
          Method isCritical returns whether a failure to return results will fail a search query.
 boolean isEligible(Entry entry)
          Method isEligible is called by the routing engine whenever a decision needs to be made about whether an adapter is eligible for a particular add, bind, modify, or rename event.
 boolean isEligible(Filter filter)
          Method isEligible is called by the routing engine whenever a decision needs to be made about whether an adapter is eligible for a particular search event.
 boolean isVisible()
          Method isVisible returns whether the adapter is actually visible to end clients.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

BaseRoutingPlugin

public BaseRoutingPlugin(com.octetstring.vde.router.RoutingRule rule)
Constructor BaseRoutingPlugin. This constructor takes a handle to the routing rule for the relevant adapter. This handle is used by the base class to provide the plug-in with access to additional relevant configuration information. The constructor can be extended, but a call to super(rule) must be made to ensure proper initialization.
Parameters:
rule - a handle into the internal data structures. Not to be used directly.

Method Detail

isEligible

public boolean isEligible(Filter filter)
Method isEligible is called by the routing engine whenever a decision needs to be made about whether an adapter is eligible for a particular search event. The filter provided is the ldap search filter provided by the client.
Parameters:
filter - is an LDAP Filter provided by the client.
Returns:
boolean is true if the adapter is to be used, or false if not.

isEligible

public boolean isEligible(Entry entry)
Method isEligible is called by the routing engine whenever a decision needs to be made about whether an adapter is eligible for a particular add, bind, modify, or rename event. The Entry value is either the entry related to the operation or just the DN related to the operation. The DN can be determined by calling entry.getName().
Parameters:
entry - is a Entry provided by the client or the distinguished name of the entry related to the operation.
Returns:
boolean is true if the adapter is to be used, or false if not.

getAdapterNumStr

public java.lang.String getAdapterNumStr()
Method getAdapterNumStr returns a String representation of the current adapter number.
Returns:
String

getInclFilter

public Filter getInclFilter()
Method getInclFilter returns the inclusion filter specified for this adapter in adapters.prop.
Returns:
Filter

getInclScope

public int getInclScope()
Method getInclScope.returns the scope defined in the routing-include statement in adapters.prop.
Returns:
int

getExclFilter

public Filter getExclFilter()
Method getExclFilter returns the exclusion filter specified for this adapter in adapters.prop.
Returns:
Filter

getExclScope

public int getExclScope()
Method getExclScope returns the scope defined in the routing-exclude statement in adapters.prop.
Returns:
int

getPriority

public int getPriority()
Method getPriority returns the adapters priority level as defined in adapters.prop (default is 50).
Returns:
int

getRetrieveAttrs

public java.util.Vector getRetrieveAttrs()
Method getRetrieveAttrs returns a Vector of DirectoryString values representing the retrievable attributes defined for this adapter. Null is unrestricted.
Returns:
Vector

getStoreAttrs

public java.util.Vector getStoreAttrs()
Method getStoreAttrs returns a Vector of DirectoryString values representing the modifiable attributes defined for this adapter. Null is unrestricted.
Returns:
Vector

getSuffix

public DirectoryString getSuffix()
Method getSuffix returns a DirectoryString value representing the virtual base or "backend.x.root" of the adapter.
Returns:
DirectoryString

isCritical

public boolean isCritical()
Method isCritical returns whether a failure to return results will fail a search query. Not that if this plugin declares the adapter ineligable, it is not a *failure* in this sense.
Returns:
boolean

isVisible

public boolean isVisible()
Method isVisible returns whether the adapter is actually visible to end clients. If not visible, the adapter likely supports a JoinView or is being called by a custom plug-in through the AdapterServiceInterface class.
Returns:
boolean

Skip navigation links

OracleVirtual Directory Java API Reference
11g Release 1 (11.1.1)

E10688-02


Copyright © 2000-2009 Oracle. All Rights Reserved.