Class BrokerCompleteTerritory


  • public class BrokerCompleteTerritory
    extends java.lang.Object
    Holds all of the information describing a broker as far as import and export are concerned.
    • Constructor Detail

      • BrokerCompleteTerritory

        public BrokerCompleteTerritory()
        Constructor.
      • BrokerCompleteTerritory

        public BrokerCompleteTerritory​(BrokerTerritoryInfo info)
        Constructor. Sets the territory info field.
    • Method Detail

      • store

        public void store​(BrokerAdminClient client)
                   throws BrokerException
        Stores the information from this Territory into the broker for which the given client object has been provided. It does this by first confirming that the broker belongs to the given territory. If it does not, then the territory is joined (if found on any of the brokers in the other_brokers_in_territory list), or created.

        All specifics about a territory are overwritten.

        • The auth_type and encrypt_level in the info member replace the current settings in the territory.
        • If the access control list is set it replaces the existing one.
        Throws:
        BrokerInvalidAccessListException - If the access list is not valid.
        BrokerNullParameterException - If the client parameter is null or the instance variable info or info.territory_name are null.
        BrokerInvalidClientException - If client has been destroyed or disconnected.
        BrokerException
      • write

        public void write​(java.io.Writer writer,
                          int indent_level)
                   throws BrokerException,
                          java.io.IOException
        Writes this Territory's information out in a textual format. This is usually done to a file. The indent_level is the number of 4 character indents to use.

        Unicode characters in the output are escaped using backslash-u notiation (e.g. ӿ).

        Does not write anything if 'info' is null.

        Throws:
        java.io.IOException - If there is an error wrtiting to the file.
        BrokerNullParameterException - If writer is null.
        BrokerOutOfRangeException - If indent_level is less than 0.
        BrokerException
      • toString

        public java.lang.String toString​(int indent_level)
                                  throws BrokerException
        Converts this Territory's information into a string. The string is in proper format for saving to a file. The indent_level is the number of 4 character indents to use.

        Unicode characters in the output are escaped using backslash-u notiation (e.g. ӿ).

        Returns an empty string if all of the data members are null, or if all of them return empty strings when converted to strings.

        Throws:
        BrokerOutOfRangeException - If indent_level is less than 0.
        BrokerException
      • toString

        public java.lang.String toString()
        Converts this Territory's information into a string. The string is in proper format for saving to a file.

        Unicode characters in the output are escaped using backslash-u notiation (e.g. ӿ).

        Returns an empty string if all of the data members are null, or if all of them return empty strings when converted to strings.

        Overrides:
        toString in class java.lang.Object