Class TracedIsodeDirectorySession

All Implemented Interfaces:
SWIG_DSAPIConstants

public class TracedIsodeDirectorySession extends IsodeDirectorySession
A IsodeDirectorySession that has a Nettrace attached to it. Instead of binding to the server directly; IsodeDirectorySession creates a Nettrace pointing to the server and then binds to Nettrace.
Since:
16.0
Author:
ac
  • Field Details

    • origAddress

      public String origAddress
      The original Presentation Address passed to the Constructor. This is the Presentation Address of the sever. It is used to index the Nettrace in NettraceUtil so must be retained.
    • errorStartingNettrace

      public boolean errorStartingNettrace
      Flag to indicate if there has been an error starting nettrace.
  • Constructor Details

    • TracedIsodeDirectorySession

      public TracedIsodeDirectorySession(String addr, boolean startTLS, com.isode.nettrace.observers.NettraceObserver observer) throws BadAddressException
      Creates a new DirectorySession pointing to a Nettrace that points towards the given address and verifies that the specified address is valid.
      Parameters:
      addr - The presentation address of the remote DSA, which must not be null.
      startTLS - true to force plain LDAP connections to use the startTLS extension (ignored for LDAPS and DAP connections)
      observer - A NettraceObserver to register with the Nettrace. It will receive messages whenever data is decoded. This can be null in which case no observer will be registered.
      Throws:
      BadAddressException - if addr is null or is not a valid presentation address; or if there is an error generating a presentation address for the Nettrace
      NativeLibraryException - if an unrecoverable error was detected by the native library
      See Also:
    • TracedIsodeDirectorySession

      public TracedIsodeDirectorySession(String addr, com.isode.nettrace.observers.NettraceObserver observer) throws BadAddressException
      Creates a new DirectorySession pointing to a Nettrace that points towards the given address and verifies that the specified address is valid.
      Parameters:
      addr - the bind profile address of the remote DSA, which must not be null.
      observer - A NettraceObserver to register with the Nettrace. It will receive messages whenever data is decoded. This can be null in which case no observer will be registered.
      Throws:
      BadAddressException - if addr is null or is not a valid presentation address; or if there is an error generating a presentation address for the Nettrace
      See Also:
  • Method Details

    • getServerAddress

      public String getServerAddress()
      Gets the address of the server that the session is connecting to via the Nettrace
      Returns:
      The address of the server that the session is connecting to, this will not be null.
    • registerNettraceObserver

      public void registerNettraceObserver(com.isode.nettrace.observers.NettraceObserver obs)
      Unregisters a NettraceObserver with the Nettrace associated with this directory session.
      Parameters:
      obs - The NettraceObserver to be unregistered. This can be null in which case no observer will be registered.
    • unregisterNettraceObserver

      public void unregisterNettraceObserver(com.isode.nettrace.observers.NettraceObserver obs)
      Unregisters a NettraceObserver with the Nettrace associated with this directory session.
      Parameters:
      obs - The NettraceObserver to be unregistered. This can be null in which case no observer will be registered.
    • finalize

      protected void finalize() throws Throwable
      Description copied from class: DirectorySession
      Releases any native structures associated with this object.
      Overrides:
      finalize in class DirectorySession
      Throws:
      Throwable
    • preBindHook

      protected void preBindHook() throws NotBoundException
      Prebind Hook for the @{link TracedIsodeDirectorySession TracedIsodeDirectorySession}. Checks to see if there was an error setting up the Nettrace. If so throws a NotBoundException.
      Overrides:
      preBindHook in class IsodeDirectorySession
      Throws:
      NotBoundException - The Directory Session was not bound correctly.
    • bind

      Description copied from class: DirectorySession
      Perform a synchronous anonymous bind.
      Overrides:
      bind in class DirectorySession
      Parameters:
      cargs - CommonArgs; may be null.
      Returns:
      an Indication containing the result of the bind.
      Throws:
      NotBoundException - if the connection attempt to the server failed.
      IndicationException - the bind failed but threw an IndicationException that provides additional information about the failure.
      NotImplementedException - the session has previously been bound, and cannot be re-bound. The session will remain in its previous state.
      NativeLibraryException - if an unrecoverable error was detected by the native library