|The Big Picture|
A context implementation must support methods defined in the Context interface and subinterfaces in accordance with the JNDI specifications. Within that framework, however, a lot of leeway exists regarding the features that the context implementation supports. None of the features discussed in this section involve adding any new components. Rather, they involve embellishing a context implementation, typically by making existing methods support the feature or by adding new methods.
FederationFederation concepts are described in the Federation lesson. Support for federation consists of the following:
The JNDI SPI framework contains methods to assist in the latter.
- Determining the portion of the input name to process
- Contacting the next naming system (nns) to continue the operation
A context implementation's support of federation is helpful but not required. The implementation can be used simply for accessing a particular naming/directory service--a valid and supported use of the JNDI.
The Adding Federation Support lesson describes how to add support for federation.
Link Reference SupportA link reference is a symbolic link that can span multiple naming systems. It is represented by the LinkRef class. Context.lookup() and the resolution portion of all context methods are supposed to dereference link references automatically. Context.lookupLink() is used to read a link reference. Link references are described in the Miscellaneous lesson.
A context implementation that does not support binding of link references obviously does not have to deal with them. One that does support this feature should process the references according to the specification. It also should have mechanisms in place to catch link loops and/or to limit the number of links that can be followed.
The Miscellaneous lesson describes how to add support for link references.
Referral SupportA referral is an entity used to redirect a client's request to another server. Containing the names and locations of other objects, it is sent by the server to indicate that the information that the client has requested can be found at another location (or locations), possibly at another server or several servers.
Referrals are used by the LDAP (RFC 2251) and therefore apply only to LDAP-style directories. They are described in detail in the Referrals lesson.
The JNDI specifies the environment property Context.REFERRAL ("java.naming.referral") that an application can use to control how referrals are processed by the context implementation. A context implementation that supports referrals must conform to this specification. It also should have mechanisms in place to catch referral loops and/or to limit the number of referrals that can be followed.
The Miscellaneous lesson describes how to add support for referrals.
Schema SupportThe DirContext and Attribute interfaces contain methods that enable programs to retrieve the schema of the directory entry/attribute. Schema in the LDAP are described in detail in the Schema lesson. These methods make sense only for a directory context implementations that publishes its schema. The schema might be read-only or read-write, depending on both the context implementation and the underlying directory service. To the degree possible, support for schemas should follow the guidelines given in the Guidelines for LDAP Service Providers.
The Adding Directory Support lesson describes how to add support for schema.
Event Notification SupportEvent notification support is defined in the javax.naming.event package. It is described in detail in the Event Notification lesson.
Support for event notification makes sense primarily for an underlying naming and directory service that supports event notification. Some context implementations might support this feature for those underlying services that do not support event notification, by using techniques such as polling to simulate the effects of notifications.
The Miscellaneous lesson describes how to add support for events.
The Big Picture: End of Lesson
What's next? Now you can:
- Continue on in this trail to learn about the ground rules for writing service providers.
|The Big Picture|