Notify Changes Related to LDAP Realm Configurations
To listen to changes made on the LDAP configurations on the TIBCO Enterprise Administrator server, the agent must implement the com.tibco.tea.agent.api.TeaLdapConfigurationListener interface. On implementing the interface, the agent gets a notification when there is an addition, modification, or deletion of an LDAP configuration on the TIBCO Enterprise Administrator server.
The following steps ensure that changes to the LDAP realm configurations on the TIBCO Enterprise Administrator server are notified to the agent:
- The TIBCO Enterprise Administrator server is running.
- At least one LDAP realm configuration is created on the TIBCO Enterprise Administrator server.
- The agent has implemented the com.tibco.tea.agent.api.TeaLdapConfigurationListener interface.
- The agent is registered with the TIBCO Enterprise Administrator server.
Running mode receives the LDAP realm configurations.
When an agent is reconnected to the server or when the agent is in the Running mode, the agent receives notifications about the updates on the LDAP realm configurations.
The TeaLdapConfigurationListener Interface
The interface implementation must be registered with com.tibco.tea.agent.server.TeaAgentServer using the addEventListener() method. This is usually included as a part of the agent setup code block. The following is a snippet fromTeaLdapConfigurationListener.java:
public interface TeaLdapConfigurationListener extends java.util.EventListener {
public void onRealmAdded(final TeaLdapConfigurationEvent
ldapConfigurationEvent);
public void onRealmUpdated(final TeaLdapConfigurationEvent
ldapConfigurationEvent);
public void onRealmDeleted(final TeaLdapConfigurationEvent
ldapConfigurationEvent);
}As a consumer of such an event, you can examine the
com.tibco.tea.agent.api.TeaLdapConfigurationEvent.TYPE to retrieve the
com.tibco.tea.agent.api.LdapRealmConfig instance from the event object.