Class AgentList

    • Constructor Detail

      • AgentList

        public AgentList​(AgentList.Filter filter,
                         java.lang.String... selectedColumns)
        Requests the Agent list with a filter. This requires at least AE Version 12 and one running JWP.
        Parameters:
        filter - Filter to restrict the result
        selectedColumns - Name of optional columns, possible values are:
        • AUTHENTICATED
        • VERSION
        • VARIANT
        • HARDWARE
        • SOFTWARE
        • SOFTWARE_VERSION
        • IPADDRESS
        • PORT
        • LICENSE_CLASS
        • MIB_INFO
        • ROLES
        • SM_LINKED
        • NET_AREA
        • NUMBER_OF_CLIENTS
        • RUNNING_JOBS
        • LAST_LOGOFF
        • RUNNING_FT
        • ZDU_VERSION
        If this parameter is not set all optional fields are returned. All other columns that are not in this list are always returned (for example Name of the Agent). This method can be used to improve the performance if only a few of these optional fields are required.
      • AgentList

        public AgentList()
        Creates a new AgentList request which reads the full agent list (all columns and all agents).
    • Method Detail

      • getSrc

        protected java.lang.String getSrc()
        Description copied from class: XMLRequest
        Returns the request source. This method is used internally.
        Specified by:
        getSrc in class XMLRequest
        Returns:
        Source
      • createRequest

        protected void createRequest​(com.uc4.util.XMLDocument doc,
                                     org.w3c.dom.Element request,
                                     ConnectionAttributes sessionInfo)
        Description copied from class: XMLRequest
        Creates the XML Document for the request. This method is used internally.
        Specified by:
        createRequest in class XMLRequest
        Parameters:
        doc - Document, used to create new Elements
        request - Request Element - classes append information to this request element
        sessionInfo - Information about the session
      • handleContent

        protected void handleContent​(com.uc4.util.XMLDocument doc,
                                     ConnectionAttributes session)
        Description copied from class: XMLRequest
        Sub classes extract the values from the XML document and provide public getter methods.
        Overrides:
        handleContent in class XMLRequest
        Parameters:
        doc - XML Document
        session - Info about the user session
      • getAgentByName

        public AgentListItem getAgentByName​(UC4HostName name)
        Returns the AgentListItem for the specified name or null if not found.
        Parameters:
        name - Name of the Agent
        Returns:
        AgentListItem containing information about the version and status of the Agent
      • iterator

        public java.util.Iterator<AgentListItem> iterator()
        Returns an Iterator which can be used to step through the AgentListItem.
        Specified by:
        iterator in interface java.lang.Iterable<AgentListItem>
        Returns:
        Iterator containing AgentListItem
      • isAllowedInClientZero

        protected boolean isAllowedInClientZero()
        Description copied from class: XMLRequest
        This method is used internally. Tests if this XMLRequest is allowed in client 0. The default implementation returns false, subclasses may override.
        Overrides:
        isAllowedInClientZero in class XMLRequest
        Returns:
        true if this request is allowed in client 0, false otherwise
      • size

        public int size()
        Returns the total number of items in the Agent list (active and inactive).
        Returns:
        number of AgentListItem
      • isListTruncated

        public boolean isListTruncated()
        If max rows are set by the filter and the actual amount of rows exceeds this number than this will return true. However the list is truncated in this case.
        Returns:
        true if there are more rows than defined by max rows.
      • withGenericAgents

        public void withGenericAgents​(boolean with)
        If this is set to true then all generic Agents from client 0 are included in the result.
        Parameters:
        with - generic agents
      • setSimpleList

        @Deprecated
        public void setSimpleList​(boolean simpleList)
        Deprecated.
        Do not call this method if you need a filtered output, use AgentList(AgentFilter filter, String... selectedColumns) instead
        Sets to simple list mode. Only name, JclVariant and active flag are filled to get a faster response. If an AgentFilter is provided in the constructor the filter and columns are ignored if the parameter simpleList is set to true.
        Parameters:
        simpleList - true to enable simple-list mode, false to fetch all agent attributes (default)