Class AccessPoint

java.lang.Object
com.isode.dsapi.syntax.AccessPoint
All Implemented Interfaces:
Comparable<AccessPoint>

public class AccessPoint extends Object implements Comparable<AccessPoint>
Class representation of an AccessPoint. An AccessPoint object may be constructed using an appropriate AttributeValue. At present, the only fields which can be extracted from an AccessPoint are the "name" and "Presentation address".

This is an immutable class.

  • Field Details

  • Constructor Details

    • AccessPoint

      public AccessPoint(AttributeValue val) throws BadValueException, BadSyntaxException
      Construct a new AccessPoint object from an existing AttributeValue. This method requires that val contains an AttributeValue of the correct syntax, and that it contains valid AccessPoint
      Parameters:
      val - an AttributeValue containing an AccessPoint
      Throws:
      BadValueException - if val is null, or does not contain a valid AccessPoint
      BadSyntaxException - if val does not appear to be an AccessPoint, or if it is not possible to parse AccessPoint or PresentationAddress objects in this environment.
    • AccessPoint

      public AccessPoint(String stringVal) throws BadValueException, BadSyntaxException
      Create an AccessPoint object by parsing a String
      Parameters:
      stringVal - a String representation of an AccessPoint, must not be null
      Throws:
      BadValueException - if stringVal does not contain a valid AccessPoint
      BadSyntaxException - if stringVval does not appear to be an AccessPoint, or if it is not possible to parse AccessPoint or PresentationAddress objects in this environment.
    • AccessPoint

      Create an AccessPoint object using name and presentation address.
      Parameters:
      name - DN of access point, must not be null
      pa - Presentation Address of access point, must not be null
      Throws:
      BadValueException - If there are encoding errors
      BadSyntaxException - if it is not possible to parse AccessPoint objects in this environment.
      BadDNException - if there is something invalid about one of the name RDNs: either that one of the RDN attributes doesn't have exactly one value, or that it wasn't possible to get an OID for one of the RDN attribute-types, or that it wasn't possible to convert the value to BER (e.g. for schema-invalid values). None of these problems should occur for a valid DN.
      Since:
      15.0
  • Method Details

    • getName

      public DN getName()
      Determine the name contained in this AccessPoint as a DN
      Returns:
      the name
    • getPresentationAddress

      public PresentationAddress getPresentationAddress()
      Determine the Presentation Address contained in this AccessPoint
      Returns:
      the Presentation Address
      Since:
      15.0
    • getAttributeValue

      public AttributeValue getAttributeValue()
      Obtain a reference to an AttributeValue containing this AccessPoint attribute.
      Returns:
      the source AttributeValue for this object.
    • toString

      public String toString()
      Return a String representation of this AccessPoint.
      Overrides:
      toString in class Object
      Returns:
      a String representation of the AccessPoint
    • getFriendlyString

      public String getFriendlyString()
      Returns friendly string form to display.
      Returns:
      Friendly string form to display.
      Since:
      15.0
    • getCanonicalForm

      public AccessPoint getCanonicalForm() throws BadSyntaxException
      The DN and presentation address are converted to their canonical forms.
      Returns:
      canonical form of object.
      Throws:
      BadSyntaxException - if it is not possible to parse the presentation address.
      Since:
      15.0
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
      Since:
      15.0
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Since:
      15.0
    • compareTo

      public int compareTo(AccessPoint o)
      Specified by:
      compareTo in interface Comparable<AccessPoint>
      Since:
      15.0