Class MASAP

All Implemented Interfaces:
Comparable<MASAP>

Class representation of MASAP. A MASAP object may be constructed using an appropriate AttributeValue.

This is an immutable class.

This class works by holding an MASAPSyntax.MasterAndShadowAccessPoints object, and providing a slightly more user-friendly set of methods which access and manipulate fields inside that object.

The ASN for a MASAP is:

 MasterOrShadowAccessPoint ::= SET {
    COMPONENTS OF AccessPoint,
    category [3] ENUMERATED { master (0), shadow (1) } DEFAULT 0
    }
 
 MasterAndShadowAccessPoints ::= SET OF MasterOrShadowAccessPoint
Since:
15.0
Author:
mv
  • Constructor Details

  • Method Details

    • getSyntaxInfo

      protected IsodeSyntax.SyntaxInfo getSyntaxInfo() throws BadSyntaxException
      Description copied from class: IsodeSyntax
      Subclasses must implement a method which returns a SyntaxInfo object that can be used by the IsodeSyntax class.
      Specified by:
      getSyntaxInfo in class IsodeSyntax<MASAPSyntax.MasterAndShadowAccessPoints>
      Returns:
      a SyntaxInfo describing the syntax represented by the subclass.
      Throws:
      BadSyntaxException - if no SyntaxInfo is available for this syntax.
    • parse

      protected void parse(byte[] berRepresentation) throws BadValueException
      Decode the specifed byte array into ASN representation
      Specified by:
      parse in class IsodeSyntax<MASAPSyntax.MasterAndShadowAccessPoints>
      Parameters:
      berRepresentation - putative value in BER
      Throws:
      BadValueException
    • reset

      public void reset()
      Description copied from class: IsodeSyntax
      Clear all fields in the object. Following this operation, the object may not be a valid value, so may need to have fields set in it to become one.

      Subclasses should implement a method which clears all the asn fields, e.g.

         asnVal = new MHSR.GlobalDomainIdentifier();
         asnVal.setAdministration_domain_name(new AdministrationDomainName());
         asnVal.setCountry_name(new CountryName());
       
      Note that this method is called by the IsodeSyntax() constructor.
      Specified by:
      reset in class IsodeSyntax<MASAPSyntax.MasterAndShadowAccessPoints>
    • getAddressList

      public List<MOSAP> getAddressList()
      Returns:
      List containing the addresses. This will never be null.
    • getCanonicalForm

      public MASAP getCanonicalForm() throws BadSyntaxException
      The addresses are converted to their canonical forms. The address list is sorted and duplicates are removed.
      Returns:
      canonical form of object.
      Throws:
      BadSyntaxException - if it is not possible to parse the MASAP values.
    • equals

      public boolean equals(Object other)
      Description copied from class: IsodeSyntax
      Performs equality testing using the syntax handler for the relevant attribute type.

      Note that this method uses JNI to constructs AttributeValues and then call the syntax handler's comparison function, so it may not be ideal for use in resource-constrained situations (e.g. calling it loads of times in a loop)

      Overrides:
      equals in class IsodeSyntax<MASAPSyntax.MasterAndShadowAccessPoints>
      Parameters:
      other - another object of the same attribute type
      Returns:
      true if other is the same object, or one which has a valid value that matches this object's value so far as the syntax handler is concerned. A value of false means that object contains a different value, or that it is not possible to compare the values because no suitable syntax handler is available.
    • hashCode

      public int hashCode()
      Description copied from class: IsodeSyntax
      Returns a hashcode suitable for use by the Collection classes
      Overrides:
      hashCode in class IsodeSyntax<MASAPSyntax.MasterAndShadowAccessPoints>
      Returns:
      a hash code value for this object.
    • compareTo

      public int compareTo(MASAP o)
      Specified by:
      compareTo in interface Comparable<MASAP>