public class AgentList extends XMLRequest implements java.lang.Iterable<AgentListItem>
| Modifier and Type | Class and Description |
|---|---|
static class |
AgentList.Filter
Filter in the Agent list.
|
| Constructor and Description |
|---|
AgentList()
Creates a new AgentList request which reads the full agent list (all columns and all agents).
|
AgentList(AgentList.Filter filter,
java.lang.String... selectedColumns)
Requests the Agent list with a filter.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
createRequest(com.uc4.util.XMLDocument doc,
org.w3c.dom.Element request,
ConnectionAttributes sessionInfo)
Creates the XML Document for the request.
|
AgentListItem |
getAgentByName(UC4HostName name)
Returns the AgentListItem for the specified name or
null if not found. |
protected java.lang.String |
getSrc()
Returns the request source.
|
protected void |
handleContent(com.uc4.util.XMLDocument doc,
ConnectionAttributes session) |
protected boolean |
isAllowedInClientZero()
This method is used internally.
|
boolean |
isListTruncated()
If max rows are set by the filter and the actual amount of rows exceeds this number than this will return true.
|
java.util.Iterator<AgentListItem> |
iterator()
Returns an Iterator which can be used to step through the
AgentListItem. |
void |
setSimpleList(boolean simpleList)
Deprecated.
Do not call this method if you need a filtered output, use AgentList(AgentFilter filter, String... selectedColumns) instead
|
int |
size()
Returns the total number of items in the Agent list (active and inactive).
|
void |
withGenericAgents(boolean with)
If this is set to true then all generic Agents from client 0 are included in the result.
|
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, ignoreMessageBox, send, setMessageBox, showQuarantineNotificationpublic AgentList(AgentList.Filter filter, java.lang.String... selectedColumns)
filter - Filter to restrict the resultselectedColumns - Name of optional columns, possible values are:
public AgentList()
protected java.lang.String getSrc()
XMLRequestgetSrc in class XMLRequestprotected void createRequest(com.uc4.util.XMLDocument doc,
org.w3c.dom.Element request,
ConnectionAttributes sessionInfo)
XMLRequestcreateRequest in class XMLRequestdoc - Document, used to create new Elementsrequest - Request Element - classes append information to this request elementsessionInfo - Information about the sessionprotected void handleContent(com.uc4.util.XMLDocument doc,
ConnectionAttributes session)
handleContent in class XMLRequestpublic AgentListItem getAgentByName(UC4HostName name)
null if not found.name - Name of the Agentpublic java.util.Iterator<AgentListItem> iterator()
AgentListItem.iterator in interface java.lang.Iterable<AgentListItem>AgentListItemprotected boolean isAllowedInClientZero()
XMLRequestXMLRequest is allowed in client 0.
The default implementation returns false, subclasses may override.isAllowedInClientZero in class XMLRequesttrue if this request is allowed in client 0, false otherwisepublic int size()
AgentListItempublic boolean isListTruncated()
public void withGenericAgents(boolean with)
with - generic agents@Deprecated public void setSimpleList(boolean simpleList)
simpleList - true to enable simple-list mode, false to fetch all agent attributes (default)