Class BrokerCompleteTerritoryGateway


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

      • BrokerCompleteTerritoryGateway

        public BrokerCompleteTerritoryGateway()
        Constructor.
      • BrokerCompleteTerritoryGateway

        public BrokerCompleteTerritoryGateway​(BrokerTerritoryGatewayInfo info)
        Constructor. Sets the remote territory info.
      • BrokerCompleteTerritoryGateway

        public BrokerCompleteTerritoryGateway​(BrokerClusterGatewayInfo clusterGWInfo)
        Constructor. Sets the remote territory info.
    • Method Detail

      • store

        public void store​(BrokerAdminClient client)
                   throws BrokerException
        Stores the information from this Territory Gateway into the broker for which the given client object has been provided. It does this by first confirming that the gateway to the remote territory exists. If it does not it is created.

        Other gateways already configured for the broker are not deleted.

        Only the following BrokerTerritoryGatewayInfo members are used during a store: remote_territory_name, remote_host_name, remote_broker_name, auth_type, and encrypt_level.

        All specifics about a Territory Gateway are overwritten, except that if a local territory gateway already exists, but connects to a different remote broker and host than those specified, that part of the situation is not altered.

        • The auth_type and encrypt_level in the info member replace the current settings on the Territory Gateway.
        • If the access control list is set it replaces the existing one.
        • If either of the remote_can_publish or remote_can_subscribe lists is non-null, the shared event types list for the gateway is replaced. The sub_id fields in the remote_can_subscribe array are ignored.
        Throws:
        BrokerInvalidAccessListException - If the access list is not valid.
        BrokerNullParameterException - If the client parameter is null or the instance variable info or info.remote_territory_name are null.
        BrokerInvalidClientException - If client has been destroyed or disconnected.
        BrokerOutOfRangeException - If a gateway already exists between the broker's territory and the remote territory specified in in the 'info' member, but that gateway was established by either another broker in the broker's territory or, if established through the broker, is connected to a different broker in the remote territory than that specified in in the 'info' member. Nothing about the gateway will have been altered if this exception is thrown.
        BrokerNotRunningException - If the other side of the gateway doesn't existing yet and shared event types cannot be established. Everything else about the gateway will have been setup, and so this object needs to be stored again once the other side of the gateway is up.
        BrokerUnknownBrokerNameException - If the other side of the gateway doesn't exist yet and the remote broker couldn't be found. Bring up the remote broker and try again.
        BrokerException
      • write

        public void write​(java.io.Writer writer,
                          int indent_level)
                   throws BrokerException,
                          java.io.IOException
        Writes this Territory Gateway'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' or 'info.remote_territory_name' are 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 Gateway'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 Gateway'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