Class PeerManager

java.lang.Object
com.isode.dsapi.config.PeerManager

public class PeerManager extends Object
Peer DSA manager manages the various peer DSA entries stored in the directory session.
Since:
15.0
Author:
mv
  • Constructor Details

    • PeerManager

      public PeerManager(IsodeDirectorySession ds)
      Constructor for peer DSA manager.
      Parameters:
      ds - Isode directory session, must not be null
  • Method Details

    • load

      public void load(Entry entry) throws ConfigOpFailedException
      Load a peer DSA object.
      Parameters:
      entry - Entry, must not be null
      Throws:
      ConfigOpFailedException - if mandatory attributes are not loaded
    • create

      public PeerEntry create(DN dsaDN, PresentationAddress pa, PeerAuthData dspAuthData, PeerAuthData dispAuthData) throws ConfigOpFailedException, ReadFailedException
      Create a peer configuration entry.
      Parameters:
      dsaDN - DSA DN, must not be null
      pa - Presentation address, must not be null
      dspAuthData - authentication data to be used for DSP messages, must not be null
      dispAuthData - authentication data to be used for DISP messages, must not be null
      Returns:
      The created peer entry, will not be null
      Throws:
      ReadFailedException - if there is a problem on reading the committed entry back.
      ConfigOpFailedException - if there is any other problem on applying the changes
    • delete

      public boolean delete(DN dsaDN) throws ConfigOpFailedException
      Remove a peer DSA.
      Parameters:
      dsaDN - DN of peer DSA, must not be null
      Returns:
      TRUE if the peer entry corresponding to the DSA DN was found, FALSE otherwise
      Throws:
      ConfigOpFailedException - if the operation failed.
    • get

      public HashMap<DN,PeerEntry> get()
      Get the peer DSAs.
      Returns:
      list of peer DSAs, will not be null
    • get

      public PeerEntry get(DN dsaDN)
      Find the peer authentication entry for the given DSA.
      Parameters:
      dsaDN - DN of peer DSA, must not be null
      Returns:
      peer entry found or null if not found