Class ClusterDestination

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        define serialVersionUID for interoperability
        See Also:
        Constant Field Values
      • logger

        private static final org.objectweb.util.monolog.api.Logger logger
    • Constructor Detail

      • ClusterDestination

        public ClusterDestination()
        Constructs an empty clustered destination.
      • ClusterDestination

        public ClusterDestination​(Hashtable<String,​Destination> cluster)
        Constructs a cluster destination.
        Parameters:
        cluster - Hashtable of the cluster agent destination.
    • Method Detail

      • addDestination

        public void addDestination​(Destination dest)
        Adds a destination to the cluster. The object will be added with a key equals to the location property. Be careful, the object should be rebind after modification.
        Parameters:
        dest - the Destination
      • addDestination

        public void addDestination​(String location,
                                   Destination dest)
        Adds a destination to the cluster with the specified location key. By default, the location value is set to the String server#i, where i is the server id. of the destination. Be careful, the object should be rebind after modification.
        Parameters:
        location - the location key
        dest - the Destination
      • getDestination

        protected Destination getDestination()
        return the appropriate destination of cluster
      • getType

        public byte getType()
        Returns the type of the destination: queue or topic, temporary or not.
        Overrides:
        getType in class Destination
      • setReader

        public void setReader​(User user)
                       throws ConnectException,
                              AdminException
        Description copied from class: Destination
        Administration method setting a given user as a reader on this destination.

        The request fails if this destination is deleted server side.

        Overrides:
        setReader in class Destination
        Parameters:
        user - User to be set as a reader.
        Throws:
        ConnectException - If the administration connection is closed or broken.
        AdminException - If the request fails.
      • setWriter

        public void setWriter​(User user)
                       throws ConnectException,
                              AdminException
        Description copied from class: Destination
        Administration method setting a given user as a writer on this destination.

        The request fails if this destination is deleted server side.

        Overrides:
        setWriter in class Destination
        Parameters:
        user - User to be set as a writer.
        Throws:
        ConnectException - If the administration connection is closed or broken.
        AdminException - If the request fails.