public class NXCSession extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
NXCSession.MessageSubscription
Message subscription class
|
Modifier and Type | Field and Description |
---|---|
static int |
ADDRESS_LIST_DISCOVERY_FILTER |
static int |
ADDRESS_LIST_DISCOVERY_TARGETS |
static int |
APPLICATION_CLIENT |
static int |
CFG_IMPORT_REPLACE_EVENT_BY_CODE |
static int |
CFG_IMPORT_REPLACE_EVENT_BY_NAME |
static int |
CHANNEL_ALARMS |
static int |
CHANNEL_AUDIT_LOG |
static int |
CHANNEL_EVENTS |
static int |
CHANNEL_OBJECTS |
static int |
CHANNEL_SITUATIONS |
static int |
CHANNEL_SNMP_TRAPS |
static int |
CHANNEL_SYSLOG |
static int |
DEFAULT_CONN_PORT |
static int |
DESKTOP_CLIENT |
static int |
MOBILE_CLIENT |
static int |
OBJECT_SYNC_NOTIFY |
static int |
OBJECT_SYNC_WAIT |
static int |
SERVER_COMPONENT_DISCOVERY_MANAGER |
static int |
TABLET_CLIENT |
static int |
WEB_CLIENT |
Constructor and Description |
---|
NXCSession(String connAddress) |
NXCSession(String connAddress,
int connPort) |
NXCSession(String connAddress,
int connPort,
boolean connUseEncryption) |
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeAlarm(long alarmId)
Acknowledge alarm.
|
void |
acknowledgeAlarm(long alarmId,
boolean sticky,
int time)
Acknowledge alarm.
|
void |
acknowledgeAlarm(String helpdeskReference)
Acknowledge alarm by helpdesk reference.
|
void |
addClusterNode(long clusterId,
long nodeId)
Add node to cluster.
|
void |
addConsoleListener(ServerConsoleListener listener)
Add server console listener
|
void |
addListener(SessionListener listener)
Add notification listener
|
void |
addMessageSubscription(int messageCode,
long messageId,
MessageHandler handler)
Subscribe to specific messages
|
void |
addSchedule(ScheduledTask task) |
void |
applyTemplate(long templateId,
long nodeId)
Apply data collection template to node.
|
void |
bindObject(long parentId,
long childId)
Bind object.
|
void |
cancelFileMonitoring(long nodeId,
String remoteFileName)
Cancel file monitoring
|
void |
cancelServerJob(long jobId)
Cancel server job
|
void |
changeObjecToolDisableStatuss(long toolId,
boolean enable)
Delete object tool.
|
void |
changeObjectZone(long objectId,
long zoneId)
Move object to different zone.
|
boolean |
checkConnection()
Send KEEPALIVE message.
|
void |
clearAgentDataCollectionConfiguration(long nodeId)
Clear data collection configuration on agent.
|
void |
clearCollectedData(long nodeId,
long dciId)
Clear collected data for given DCI
|
void |
closeConsole()
Close server console.
|
void |
closeEventProcessingPolicy()
Close event processing policy.
|
ScriptCompilationResult |
compileScript(String source,
boolean serialize)
Compile NXSL script on server.
|
void |
connect()
Connect to NetMS server.
|
void |
connect(int[] componentVersions)
Connect to NetMS server.
|
long |
createAction(String name)
Create new server action.
|
void |
createAlarmComment(long alarmId,
String text)
Create alarm comment.
|
void |
createAlarmComment(String helpdeskReference,
String text)
Create alarm comment by helpdesk reference.
|
protected void |
createCustomObject(NXCObjectCreationData data,
Object userData,
org.netxms.base.NXCPMessage msg)
Hook method to allow adding of custom object creation data to NXCP message.
|
protected AbstractObject |
createCustomObjectFromMessage(int objectClass,
org.netxms.base.NXCPMessage msg)
Create custom object from NXCP message.
|
void |
createFolderOnAgent(String folder,
long nodeId)
Upload local file to server's file store
|
LibraryImage |
createImage(LibraryImage image,
ProgressListener listener) |
int |
createMappingTable(String name,
String description,
int flags)
Create new mapping table.
|
void |
createNewCertificate(byte[] data,
String comments)
Create new certificate
|
long |
createObject(NXCObjectCreationData data)
Create new NetXMS object.
|
long |
createObject(NXCObjectCreationData data,
Object userData)
Create new NetXMS object.
|
long |
createSituation(String name,
String comments)
Create new situation object.
|
long |
createSnmpTrapConfiguration()
Create new trap configuration record.
|
long |
createUser(String name)
Create user on server
|
long |
createUserGroup(String name)
Create user group on server
|
void |
deleteAction(long actionId)
Delete server action
|
void |
deleteAgentConfig(long id)
Delete config with given id.
|
void |
deleteAgentFile(long nodeId,
String fileName)
Delete file from agent
|
void |
deleteAlarm(long alarmId)
Delete alarm.
|
void |
deleteAlarmComment(long alarmId,
long commentId)
Delete alarm comment.
|
void |
deleteCertificate(long id)
Delete certificate
|
void |
deleteDciSummaryTable(int id)
Delete DCI summary table.
|
void |
deleteEventTemplate(long eventCode)
Delete event template.
|
void |
deleteImage(LibraryImage image) |
void |
deleteMappingTable(int id)
Delete mapping table
|
void |
deleteObject(long objectId)
Delete object
|
void |
deleteObjectTool(long toolId)
Delete object tool.
|
void |
deletePredefinedGraph(long graphId)
Delete predefined graph.
|
void |
deleteReportResult(UUID reportId,
UUID jobId) |
void |
deleteReportSchedule(UUID reportId,
UUID jobId) |
void |
deleteScript(long scriptId)
Delete script from library
|
void |
deleteServerFile(String serverFileName)
Delete file from server's file store
|
void |
deleteServerVariable(String name)
Delete server configuration variable
|
void |
deleteSituation(long id)
Delete situation object
|
void |
deleteSituationInstance(long id,
String instance)
Delete situation instance
|
void |
deleteSnmpTrapConfiguration(long trapId)
Delete SNMP trap configuration record from server.
|
void |
deleteUserDBObject(long id)
Delete user or group on server
|
void |
deployAgentPolicy(long policyId,
long nodeId)
Deploy policy on agent
|
void |
deployPackage(long packageId,
Long[] nodeList,
PackageDeploymentListener listener)
Deploy agent packages onto given nodes
|
void |
detachUserFromLdap(AbstractUserObject object)
Modify user database object
|
void |
disconnect()
Disconnect from server.
|
AgentFileData |
downloadFileFromAgent(long nodeId,
String remoteFileName,
long maxFileSize,
boolean follow)
Download file from remote host via agent.
|
File |
downloadFileFromServer(String remoteFileName)
Download file from server file storage.
|
File |
downloadMibFile()
Download MIB file from server.
|
void |
executeAction(long nodeId,
String action)
Execute action on remote agent
|
void |
executeAction(long nodeId,
String action,
boolean receiveOutput,
TextOutputListener listener,
Writer writer)
Execute action on remote agent
|
UUID |
executeReport(UUID reportId,
Map<String,String> parameters) |
void |
executeScript(long nodeId,
String script,
TextOutputListener listener)
Execute script.
|
void |
executeServerCommand(long objectId,
String command,
Map<String,String> inputFields)
Execute server command related to given object (usually defined as object tool)
|
void |
executeServerCommand(long objectId,
String command,
Map<String,String> inputFields,
boolean receiveOutput,
TextOutputListener listener,
Writer writer)
Execute server command related to given object (usually defined as object tool)
|
protected void |
executeSimpleCommand(int command)
Execute simple commands (without arguments and only returning RCC)
|
Table |
executeTableTool(long toolId,
long nodeId)
Execute object tool of "table" type against given node.
|
String |
exportConfiguration(String description,
long[] events,
long[] traps,
long[] templates,
UUID[] rules,
long[] scripts,
long[] objectTools,
long[] dciSummaryTables)
Export server configuration.
|
List<AbstractObject> |
filterObjects(ObjectFilter filter)
Find all objects matching given filter.
|
protected void |
finalize() |
ConnectionPoint |
findConnectionPoint(int zoneId,
InetAddress ipAddr)
Find connection point (either directly connected or most close known
interface on a switch) for given IP address.
|
ConnectionPoint |
findConnectionPoint(long objectId)
Find connection point (either directly connected or most close known
interface on a switch) for given node or interface object.
|
ConnectionPoint |
findConnectionPoint(MacAddress macAddr)
Find connection point (either directly connected or most close known
interface on a switch) for given MAC address.
|
EventTemplate |
findEventTemplateByCode(long code)
Find event template by code in event template database internally
maintained by session object.
|
EventTemplate |
findEventTemplateByName(String name)
Find event template by name in event template database internally
maintained by session object.
|
List<EventTemplate> |
findMultipleEventTemplates(long[] codes)
Find multiple event templates by event codes in event template database
internally maintained by session object.
|
List<EventTemplate> |
findMultipleEventTemplates(Long[] codes)
Find multiple event templates by event codes in event template database
internally maintained by session object.
|
List<AbstractObject> |
findMultipleObjects(long[] idList,
boolean returnUnknown)
Find multiple NetXMS objects by identifiers
|
List<AbstractObject> |
findMultipleObjects(Long[] idList,
boolean returnUnknown)
Find multiple NetXMS objects by identifiers
|
List<AbstractObject> |
findMultipleObjects(long[] idList,
Class<? extends AbstractObject> classFilter,
boolean returnUnknown)
Find multiple NetXMS objects by identifiers
|
List<AbstractObject> |
findMultipleObjects(Long[] idList,
Class<? extends AbstractObject> classFilter,
boolean returnUnknown)
Find multiple NetXMS objects by identifiers
|
AbstractObject |
findObject(ObjectFilter filter)
Generic object find using filter.
|
AbstractObject |
findObjectById(long id)
Find NetXMS object by it's identifier.
|
<T extends AbstractObject> |
findObjectById(long id,
Class<T> requiredClass)
Find NetXMS object by it's identifier with additional class checking.
|
AbstractObject |
findObjectByName(String name)
Find object by name.
|
AbstractObject |
findObjectByNamePattern(String pattern)
Find object by name using regular expression.
|
AbstractUserObject |
findUserDBObjectById(long id)
Find user by ID
|
Zone |
findZone(long zoneId)
Find zone object by zone ID.
|
void |
forceDCIPoll(long nodeId,
long dciId)
Force DCI poll for given DCI
|
long |
generateEventCode()
Generate code for new event template.
|
long |
generateObjectToolId()
Generate unique ID for new object tool.
|
List<ServerAction> |
getActions()
Get list of configured actions from server
|
List<IpAddressListElement> |
getAddressList(int listId)
Get address list.
|
String |
getAgentConfig(long nodeId)
Get agent's master configuration file.
|
Alarm |
getAlarm(long alarmId)
Get information about single active alarm.
|
List<AlarmComment> |
getAlarmComments(long alarmId)
Get list of comments for given alarm.
|
List<EventInfo> |
getAlarmEvents(long alarmId)
Get information about events related to single active alarm.
|
int |
getAlarmListDisplayLimit()
Get maximum number of records allowed to be displayed in alarm list
|
HashMap<Long,Alarm> |
getAlarms()
Get list of active alarms.
|
AbstractObject[] |
getAllObjects()
Get list of all objects
|
String |
getAttributeForCurrentUser(String name)
Get custom attribute for currently logged in user.
|
AuthenticationType |
getAuthenticationMethod() |
EventTemplate[] |
getCachedEventTemplates()
Get cached list event templates
|
List<AuthCertificate> |
getCertificateList()
Get list of certificates
|
String |
getClientInfo()
Get client information string
|
String |
getClientLanguage() |
int |
getClientType() |
DciData |
getCollectedData(long nodeId,
long dciId,
Date from,
Date to,
int maxRows)
Get collected DCI data from server.
|
DciData |
getCollectedTableData(long nodeId,
long dciId,
String instance,
String dataColumn,
Date from,
Date to,
int maxRows)
Get collected table DCI data from server.
|
ConfigContent |
getConfigContent(long id)
Saves existing config
|
List<ConfigListElement> |
getConfigList()
Gets the list of configuration files.(Config id, name and sequence number)
|
long[] |
getDataCollectionEvents(long objectId)
Get all events used in data collection by given node, cluster, or template object.
|
List<Script> |
getDataCollectionScripts(long objectId)
Get names of all scripts used in data collection by given node, cluster, or template object.
|
String |
getDateFormat()
Get default date format provided by server
|
DciSummaryTable |
getDciSummaryTable(int id)
Get DCI summary table configuration.
|
int |
getDefaultDciPollingInterval() |
int |
getDefaultDciRetentionTime() |
int |
getDefaultRecvBufferSize()
Get default receiver buffer size.
|
int |
getEffectiveRights(long objectId)
Get effective rights of currently logged in user to given object.
|
String |
getEventName(long code)
Get event name from event code
|
EventProcessingPolicy |
getEventProcessingPolicy()
Get read-only copy of ebent processing policy.
|
List<EventTemplate> |
getEventTemplates()
Get event templates from server
|
String |
getHelpdeskIssueUrl(long alarmId)
Get URL for helpdesk issue associated with given alarm
|
LibraryImage |
getImage(UUID guid) |
List<LibraryImage> |
getImageLibrary() |
List<LibraryImage> |
getImageLibrary(String category) |
List<PackageInfo> |
getInstalledPackages()
Get list of installed packages
|
DciValue[] |
getLastValues(long nodeId)
Get last DCI values for given node
|
DciValue[] |
getLastValues(long nodeId,
boolean objectTooltipOnly,
boolean overviewOnly,
boolean includeNoValueObjects)
Get last DCI values for given node
|
DciValue[] |
getLastValues(Set<MapDCIInstance> dciIDList)
Get last DCI values for given DCI id list(list can contain simple DCIss and table DCIs)
|
List<org.netxms.base.GeoLocation> |
getLocationHistory(long objectId,
Date from,
Date to)
Get location history for given object.
|
MappingTable |
getMappingTable(int id) |
int |
getMaxRecvBufferSize()
Get max receiver buffer size.
|
Date |
getMibFileTimestamp()
Get timestamp of server's MIB file.
|
int |
getMinViewRefreshInterval() |
NetworkPath |
getNetworkPath(long node1,
long node2)
Get IPv4 network path between two nodes.
|
PhysicalComponent |
getNodePhysicalComponents(long nodeId)
Get node's physical components (obtained from ENTITY-MIB).
|
List<SoftwarePackage> |
getNodeSoftwarePackages(long nodeId)
Get list of software packages installed on node.
|
List<WinPerfObject> |
getNodeWinPerfObjects(long nodeId)
Get list of available Windows performance objects.
|
String |
getObjectName(long objectId)
Get object name by ID.
|
ObjectToolDetails |
getObjectToolDetails(long toolId)
Get object tool details
|
List<ObjectTool> |
getObjectTools()
Get list of configured object tools
|
PerfTabDci[] |
getPerfTabItems(long nodeId)
Get list of DCIs configured to be shown on performance tab in console for
given node.
|
List<GraphSettings> |
getPredefinedGraphs()
Get list of predefined graphs.
|
String |
getPublicServerVariable(String name)
Get server public configuration variable
|
boolean |
getPublicServerVariableAsBoolean(String name)
Get server public configuration variable as boolen value
|
ReportDefinition |
getReportDefinition(UUID reportId) |
List<Route> |
getRoutingTable(long nodeId)
Get routing table from node
|
Script |
getScript(long scriptId)
Get script from library
|
List<Script> |
getScriptLibrary()
Get list of all scripts in script library.
|
String |
getServerAddress()
Get server address
|
byte[] |
getServerChallenge() |
String |
getServerConfigClob(String name)
Get server config CLOB
|
long |
getServerId()
Get NetXMS server UID.
|
ServerJob[] |
getServerJobList()
Get list of server jobs
|
Map<String,Object> |
getServerStats()
Get server stats.
|
long |
getServerTime()
Get server time
|
String |
getServerTimeZone()
Get server time zone.
|
Map<String,ServerVariable> |
getServerVariables()
Get server configuration variables
|
String |
getServerVersion()
Get NetXMS server version.
|
int |
getSessionId()
Get this session's ID on server.
|
String |
getShortTimeFormat()
Get time format for short form (usually without seconds).
|
List<Situation> |
getSituations()
Get list of all configured situations
|
List<String> |
getSnmpCommunities()
Get list of well-known SNMP communities configured on server.
|
List<SnmpTrap> |
getSnmpTrapsConfiguration()
Get list of configured SNMP traps
|
List<SnmpTrap> |
getSnmpTrapsConfigurationSummary()
Get summary of SNMP trap mapping.
|
List<SnmpUsmCredential> |
getSnmpUsmCredentials()
Get list of well-known SNMP USM (user security model) credentials
configured on server.
|
long[] |
getSubnetAddressMap(long subnetId)
Get address map for subnet.
|
List<AgentParameter> |
getSupportedParameters(long nodeId)
Get list of parameters supported by agent running on given node.
|
List<AgentTable> |
getSupportedTables(long nodeId)
Get list of tables supported by agent running on given node.
|
List<FdbEntry> |
getSwitchForwardingDatabase(long nodeId)
Get switch forwarding database (MAC address table) from node
|
Table |
getTableLastValues(long nodeId,
long dciId)
Get last values for given table DCI on given node
|
Threshold[] |
getThresholds(long nodeId,
long dciId)
Get list of thresholds configured for given DCI
|
List<ThresholdViolationSummary> |
getThresholdSummary(long objectId)
Get threshold violation summary for all nodes under given parent object.
|
String |
getTileServerURL() |
String |
getTimeFormat()
Get default time format provided by server
|
AbstractObject[] |
getTopLevelObjects()
Get list of top-level objects.
|
AbstractObject[] |
getTopLevelObjects(Set<Integer> classFilter)
Get list of top-level objects matching given class filter.
|
AbstractUserObject[] |
getUserDatabaseObjects()
Get list of all user database objects
|
int |
getUserId()
Get identifier of logged in user.
|
String |
getUserName() |
long |
getUserSystemRights()
Get system-wide rights of currently logged in user.
|
List<VlanInfo> |
getVlans(long nodeId)
Get list of VLANs configured on given node
|
List<WirelessStation> |
getWirelessStations(long nodeId)
Get list of wireless stations registered at given wireless controller.
|
void |
handover(NXCSession target)
Handover object cache to new session.
|
void |
holdServerJob(long jobId)
Put server job on hold
|
void |
importConfiguration(String config,
int flags)
Import server configuration (events, traps, thresholds) from XML
|
long |
installPackage(PackageInfo info,
File pkgFile,
ProgressListener listener)
Install (upload) package on server
|
boolean |
isConnected()
Get connection state
|
boolean |
isEncrypted()
Get encryption state for current session.
|
boolean |
isHelpdeskLinkActive()
Get status of helpdesk integration module on server.
|
boolean |
isIgnoreProtocolVersion() |
boolean |
isObjectsSynchronized() |
boolean |
isPasswordExpired()
Check if password is expired for currently logged in user.
|
boolean |
isServerConsoleConnected() |
boolean |
isStrictAlarmStatusFlow() |
boolean |
isTimedAlarmAckEnabled() |
boolean |
isZoningEnabled() |
AgentFile[] |
listAgentFiles(AgentFile file,
String fullPath,
long objectId)
List files on agent file store.
|
List<DciSummaryTableDescriptor> |
listDciSummaryTables()
Get list of all configured DCI summary tables
|
List<MappingTableDescriptor> |
listMappingTables()
Get list of all configured mapping tables.
|
List<ReportResult> |
listReportResults(UUID reportId) |
List<UUID> |
listReports() |
List<String> |
listScheduleCallbacks()
Lists possible scheduled callbacks.
|
List<ReportingJob> |
listScheduledJobs(UUID reportId) |
List<ScheduledTask> |
listScheduleTasks() |
ServerFile[] |
listServerFiles()
List files in server's file store.
|
ServerFile[] |
listServerFiles(String[] filter)
List files in server's file store.
|
void |
lockPackageDatabase()
Lock package database
|
void |
lockUserDatabase()
Lock user database
|
void |
login(AuthenticationType authType,
String login,
String password,
Certificate certificate,
Signature signature)
Login to server.
|
void |
login(String login,
Certificate certificate,
Signature signature)
Login to server using certificate.
|
void |
login(String login,
String password)
Login to server using login name and password.
|
void |
modifyAction(ServerAction action)
Modify server action
|
protected void |
modifyCustomObject(NXCObjectModificationData data,
Object userData,
org.netxms.base.NXCPMessage msg)
Hook method to populate NXCP message with custom object's data on object modification.
|
int |
modifyDciSummaryTable(DciSummaryTable table)
Modify DCI summary table configuration.
|
void |
modifyEventTemplate(EventTemplate evt)
Modify event template.
|
void |
modifyImage(LibraryImage image,
ProgressListener listener) |
void |
modifyObject(NXCObjectModificationData data)
Modify object (generic interface, in most cases wrapper functions should
be used instead).
|
void |
modifyObject(NXCObjectModificationData data,
Object userData)
Modify object (generic interface, in most cases wrapper functions should
be used instead).
|
void |
modifyObjectTool(ObjectToolDetails tool)
Modify object tool.
|
long |
modifyScript(long scriptId,
String name,
String source)
Modify script.
|
void |
modifySituation(long id,
String name,
String comments)
Modify situation object.
|
void |
modifySnmpTrapConfiguration(SnmpTrap trap)
Modify SNMP trap configuration record.
|
void |
modifyUserDBObject(AbstractUserObject object)
Modify user database object
|
void |
modifyUserDBObject(AbstractUserObject object,
int fields)
Modify user database object
|
void |
moveAgentFile(long nodeId,
String oldName,
String newFileName)
Move file from agent
|
org.netxms.base.NXCPMessage |
newMessage(int code)
Create new NXCP message with unique id
|
void |
openConsole()
Open server console.
|
DataCollectionConfiguration |
openDataCollectionConfiguration(long nodeId)
Open data collection configuration for given node.
|
EventProcessingPolicy |
openEventProcessingPolicy()
Open event processing policy for editing.
|
String |
openHelpdeskIssue(long alarmId)
Open issue in helpdesk system from given alarm
|
Log |
openServerLog(String logName)
Open server log by name.
|
void |
pollNode(long nodeId,
NodePollType pollType,
TextOutputListener listener)
Perform a forced node poll.
|
boolean |
processConsoleCommand(String command)
Process console command on server.
|
void |
pushDciData(DciPushData[] data)
Push data to server.
|
void |
pushDciData(long nodeId,
long dciId,
String value)
Push value for single DCI.
|
void |
pushDciData(String nodeName,
String dciName,
String value)
Push value for single DCI.
|
Table |
queryAdHocDciSummaryTable(long baseObjectId,
List<DciSummaryTableColumn> columns,
AggregationFunction function,
Date periodStart,
Date periodEnd,
boolean multiInstance)
Query ad-hoc DCI summary table.
|
Table |
queryAgentTable(long nodeId,
String name)
Query agent's table immediately.
|
Table |
queryDciSummaryTable(int tableId,
long baseObjectId)
Query DCI summary table.
|
NetworkMapPage |
queryLayer2Topology(long nodeId)
Query layer 2 topology for node
|
String |
queryParameter(long nodeId,
int origin,
String name)
Query parameter immediately.
|
Table |
receiveTable(long requestId,
int msgCode)
Receive table from server.
|
void |
removeClusterNode(long clusterId,
long nodeId)
Remove node from cluster.
|
void |
removeConsoleListener(ServerConsoleListener listener)
Remove server console listener
|
void |
removeListener(SessionListener listener)
Remove notification listener
|
void |
removeMessageSubscription(int messageCode,
long messageId) |
void |
removePackage(long packageId)
Remove agent package from server
|
void |
removeSchedule(long scheduleId) |
void |
removeTemplate(long templateId,
long nodeId,
boolean removeDci)
Remove data collection template from node.
|
void |
renameAgentFile(long nodeId,
String oldName,
String newFileName)
Rename file from agent
|
void |
renameScript(long scriptId,
String name)
Rename script in script library.
|
File |
renderReport(UUID reportId,
UUID jobId,
ReportRenderFormat format) |
void |
resetServerComponent(int component)
Reset server's internal component (defined by SERVER_COMPONENT_xxx)
|
void |
resolveAlarm(long alarmId)
Resolve alarm.
|
void |
resolveAlarm(String helpdeskReference)
Resolve alarm by helpdesk reference.
|
String[] |
resolveDciNames(Collection<ConditionDciInfo> dciList)
Resolve names of given DCIs
|
String[] |
resolveDciNames(long[] nodeIds,
long[] dciIds)
Resolve names of given DCIs
|
void |
resyncAgentDataCollectionConfiguration(long nodeId)
Force re-synchronization of data collection configuration with agent.
|
void |
saveAgentConfig(ConfigContent conf)
Saves or creates new agent's config
|
void |
saveEventProcessingPolicy(EventProcessingPolicy epp)
Save event processing policy.
|
long |
saveGraph(GraphSettings graph,
boolean overwrite)
Checks if graph with specified name can be created/overwritten and creates/overwrites it in DB.
|
void |
scheduleReport(ReportingJob job,
Map<String,String> parameters) |
void |
sendEvent(long eventCode,
String[] parameters)
Convenience wrapper for sendEvent interface.
|
void |
sendEvent(long eventCode,
String eventName,
long objectId,
String[] parameters,
String userTag)
Send event to server.
|
void |
sendEvent(String eventName,
String[] parameters)
Convenience wrapper for sendEvent interface.
|
protected void |
sendFile(long requestId,
byte[] data,
ProgressListener listener)
Send block of data as binary message
|
protected void |
sendFile(long requestId,
File file,
ProgressListener listener)
Send file over CSCP
|
void |
sendMessage(org.netxms.base.NXCPMessage msg)
Send message to server
|
protected void |
sendNotification(SessionNotification n)
Call notification handlers on all registered listeners
|
void |
sendSMS(String phoneNumber,
String message)
Send SMS via server.
|
void |
setAddressList(int listId,
List<IpAddressListElement> list)
Set content of address list.
|
void |
setAlarmFlowState(int state)
Changes state of alarm status flow.
|
void |
setAttributeForCurrentUser(String name,
String value)
Set custom attribute for currently logged in user.
|
void |
setClientAddress(String clientAddress) |
void |
setClientInfo(String connClientInfo)
Set client information string
|
void |
setClientLanguage(String clientLanguage) |
void |
setClientType(int clientType)
Set client type.
|
void |
setCommandTimeout(int commandTimeout)
Set command execution timeout.
|
void |
setIgnoreProtocolVersion(boolean ignoreProtocolVersion)
If set to true, protocol version is not checked at connect.
|
void |
setObjectACL(long objectId,
AccessListElement[] acl,
boolean inheritAccessRights)
Change object's ACL (wrapper for modifyObject())
|
void |
setObjectCustomAttributes(long objectId,
Map<String,String> attrList)
Change object's custom attributes (wrapper for modifyObject())
|
void |
setObjectMaintenance(long objectId,
boolean maintenance) |
void |
setObjectManaged(long objectId,
boolean isManaged)
Set object's managed status.
|
void |
setObjectName(long objectId,
String name)
Change object's name (wrapper for modifyObject())
|
void |
setRecvBufferSize(int defaultBufferSize,
int maxBufferSize)
Set receiver buffer size.
|
void |
setServerConfigClob(String name,
String value)
Set server config CLOB
|
void |
setServerVariable(String name,
String value)
Set server configuration variable
|
void |
setUserPassword(long id,
String newPassword,
String oldPassword)
Set password for user
|
void |
snmpWalk(long nodeId,
String rootOid,
SnmpWalkListener listener)
Do SNMP walk.
|
void |
subscribe(int channels)
Subscribe to notification channel(s)
|
void |
swapAgentConfigs(long id1,
long id2)
Swaps 2 configs sequence numbers
|
void |
syncEventTemplates()
Synchronize event templates configuration.
|
void |
syncMissingObjects(long[] objects,
boolean syncComments)
Synchronize only those objects from given set which are not synchronized yet.
|
void |
syncMissingObjects(long[] objects,
boolean syncComments,
int options)
Synchronize only those objects from given set which are not synchronized yet.
|
void |
syncObjects()
Synchronizes NetXMS objects between server and client.
|
void |
syncObjectSet(long[] objects,
boolean syncComments)
Synchronizes selected object set with the server.
|
void |
syncObjectSet(long[] objects,
boolean syncComments,
int options)
Synchronizes selected object set with the server.
|
void |
syncUserDatabase()
Synchronize user database
|
byte[] |
takeScreenshot(long nodeId,
String sessionName)
Take screenshot from given node.
|
void |
terminateAlarm(long alarmId)
Terminate alarm.
|
void |
terminateAlarm(String helpdeskReference)
Terminate alarm by helpdesk reference.
|
TransformationTestResult |
testTransformationScript(long nodeId,
String script,
String inputValue)
Test DCI transformation script.
|
void |
unbindObject(long parentId,
long childId)
Unbind object.
|
void |
unholdServerJob(long jobId)
Put server on hold job to pending state
|
void |
uninstallAgentPolicy(long policyId,
long nodeId)
Uninstall policy from agent
|
void |
unlinkHelpdeskIssue(long alarmId)
Unlink helpdesk issue from alarm.
|
void |
unlinkHelpdeskIssue(String helpdeskReference)
Unlink helpdesk issue from alarm.
|
void |
unlockPackageDatabase()
Unlock package database
|
void |
unlockUserDatabase()
Unlock user database
|
void |
unsubscribe(int channels)
Unsubscribe from notification channel(s)
|
void |
updateAgentConfig(long nodeId,
String config,
boolean apply)
Update agent's master configuration file.
|
void |
updateAlarmComment(long alarmId,
long commentId,
String text)
Update alarm comment.
|
void |
updateCertificate(long id,
String comment)
Update certificate
|
int |
updateMappingTable(MappingTable table)
Create or update mapping table.
|
void |
updateObjectComments(long objectId,
String comments)
Change object's comments.
|
void |
updateSchedule(ScheduledTask task) |
void |
updateSnmpCommunities(List<String> list)
Update list of well-known SNMP community strings on server.
|
void |
updateSnmpUsmCredentials(List<SnmpUsmCredential> list)
Update list of well-known SNMP USM credentials on server.
|
long |
uploadFileToAgent(long nodeId,
String serverFileName,
String remoteFileName,
boolean jobOnHold)
Start file upload from server's file store to agent.
|
void |
uploadFileToServer(File localFile,
String serverFileName,
ProgressListener listener)
Upload local file to server's file store
|
void |
uploadLocalFileToAgent(File localFile,
String agentFileName,
long nodeId,
ProgressListener listener)
Upload local file to server's file store
|
boolean |
validateProtocolVersions(int[] versions)
Validate protocol versions
|
boolean |
validateUserPassword(String password)
Validate password for currently logged in user
|
File |
waitForFile(long id,
int timeout)
Wait for specific file to arrive
|
String |
waitForFileTail(String fileName,
int timeout)
Wait for specific file tail to arrive
|
org.netxms.base.NXCPMessage |
waitForMessage(int code,
long id)
Wait for message with specific code and id.
|
org.netxms.base.NXCPMessage |
waitForMessage(int code,
long id,
int timeout)
Wait for message with specific code and id.
|
org.netxms.base.NXCPMessage |
waitForRCC(long id)
Wait for CMD_REQUEST_COMPLETED message with given id using default timeout
|
org.netxms.base.NXCPMessage |
waitForRCC(long id,
int timeout)
Wait for CMD_REQUEST_COMPLETED message with given id
|
void |
wakeupNode(long objectId)
Wakeup node by sending wake-on-LAN magic packet.
|
public static final int DEFAULT_CONN_PORT
public static final int CHANNEL_EVENTS
public static final int CHANNEL_SYSLOG
public static final int CHANNEL_ALARMS
public static final int CHANNEL_OBJECTS
public static final int CHANNEL_SNMP_TRAPS
public static final int CHANNEL_AUDIT_LOG
public static final int CHANNEL_SITUATIONS
public static final int OBJECT_SYNC_NOTIFY
public static final int OBJECT_SYNC_WAIT
public static final int CFG_IMPORT_REPLACE_EVENT_BY_CODE
public static final int CFG_IMPORT_REPLACE_EVENT_BY_NAME
public static final int ADDRESS_LIST_DISCOVERY_TARGETS
public static final int ADDRESS_LIST_DISCOVERY_FILTER
public static final int SERVER_COMPONENT_DISCOVERY_MANAGER
public static final int DESKTOP_CLIENT
public static final int WEB_CLIENT
public static final int MOBILE_CLIENT
public static final int TABLET_CLIENT
public static final int APPLICATION_CLIENT
public NXCSession(String connAddress)
connAddress
- connLoginName
- connPassword
- public NXCSession(String connAddress, int connPort)
connAddress
- connPort
- connLoginName
- connPassword
- public NXCSession(String connAddress, int connPort, boolean connUseEncryption)
connAddress
- connPort
- connLoginName
- connPassword
- connUseEncryption
- protected void finalize() throws Throwable
protected AbstractObject createCustomObjectFromMessage(int objectClass, org.netxms.base.NXCPMessage msg)
objectClass
- NetXMS object class IDmsg
- Source NXCP messagepublic void addListener(SessionListener listener)
listener
- Listener to addpublic void removeListener(SessionListener listener)
listener
- Listener to removepublic void addConsoleListener(ServerConsoleListener listener)
listener
- public void removeConsoleListener(ServerConsoleListener listener)
listener
- public void addMessageSubscription(int messageCode, long messageId, MessageHandler handler)
messageCode
- messageId
- handler
- public void removeMessageSubscription(int messageCode, long messageId)
messageCode
- messageId
- protected void sendNotification(SessionNotification n)
n
- Notification objectpublic void sendMessage(org.netxms.base.NXCPMessage msg) throws IOException, NXCException
msg
- Message to sentIOException
- in case of socket communication failureNXCException
- in case of encryption errorprotected void sendFile(long requestId, File file, ProgressListener listener) throws IOException, NXCException
requestId
- file
- source file to be sentIOException
NXCException
protected void sendFile(long requestId, byte[] data, ProgressListener listener) throws IOException, NXCException
requestId
- data
- IOException
NXCException
public org.netxms.base.NXCPMessage waitForMessage(int code, long id, int timeout) throws NXCException
code
- Message codeid
- Message idtimeout
- Wait timeout in millisecondsNXCException
- if message was not arrived within timeout intervalpublic org.netxms.base.NXCPMessage waitForMessage(int code, long id) throws NXCException
code
- Message codeid
- Message idNXCException
- if message was not arrived within timeout intervalpublic org.netxms.base.NXCPMessage waitForRCC(long id) throws NXCException
id
- Message idNXCException
- if message was not arrived within timeout interval or contains RCC other than RCC.SUCCESSpublic org.netxms.base.NXCPMessage waitForRCC(long id, int timeout) throws NXCException
id
- Message idtimeout
- Timeout in millisecondsNXCException
- if message was not arrived within timeout interval or contains RCC other than RCC.SUCCESSpublic final org.netxms.base.NXCPMessage newMessage(int code)
code
- Message codepublic File waitForFile(long id, int timeout)
id
- Message IDtimeout
- Wait timeout in millisecondspublic String waitForFileTail(String fileName, int timeout)
fileName
- Waiting file nametimeout
- Wait timeout in millisecondsprotected void executeSimpleCommand(int command) throws IOException, NXCException
command
- Command codeIOException
NXCException
public Table receiveTable(long requestId, int msgCode) throws NXCException
requestId
- request IDmsgCode
- Message codeNXCException
- if operation was timed outpublic void connect() throws IOException, UnknownHostException, NXCException, IllegalStateException
public void connect(int[] componentVersions) throws IOException, UnknownHostException, NXCException, IllegalStateException
componentVersions
- IOException
UnknownHostException
NXCException
IllegalStateException
public void login(String login, String password) throws NXCException, IOException, IllegalStateException
login
- login namepassword
- passwordNXCException
IOException
IllegalStateException
public void login(String login, Certificate certificate, Signature signature) throws NXCException, IOException, IllegalStateException
authType
- authentication typelogin
- login namecertificate
- user's certificatesignature
- user's digital signatureNXCException
IOException
IllegalStateException
public void login(AuthenticationType authType, String login, String password, Certificate certificate, Signature signature) throws NXCException, IOException, IllegalStateException
authType
- authentication typelogin
- login namepassword
- passwordcertificate
- user's certificatesignature
- user's digital signatureNXCException
IOException
IllegalStateException
public void disconnect()
public boolean isConnected()
public boolean isEncrypted()
public boolean isIgnoreProtocolVersion()
public void setIgnoreProtocolVersion(boolean ignoreProtocolVersion)
ignoreProtocolVersion
- public boolean validateProtocolVersions(int[] versions)
versions
- public int getDefaultRecvBufferSize()
public int getMaxRecvBufferSize()
public void setRecvBufferSize(int defaultBufferSize, int maxBufferSize)
defaultBufferSize
- default size of receiver buffer in bytes.maxBufferSize
- max size of receiver buffer in bytes.public String getServerAddress()
public String getServerVersion()
public long getServerId()
public String getServerTimeZone()
public long getServerTime()
public byte[] getServerChallenge()
public String getTileServerURL()
public boolean isZoningEnabled()
public boolean isHelpdeskLinkActive()
public String getClientInfo()
public void setClientInfo(String connClientInfo)
connClientInfo
- public void setCommandTimeout(int commandTimeout)
commandTimeout
- New command timeoutpublic int getUserId()
public String getUserName()
public AuthenticationType getAuthenticationMethod()
public long getUserSystemRights()
public boolean isPasswordExpired()
public int getAlarmListDisplayLimit()
public void syncObjects() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void syncObjectSet(long[] objects, boolean syncComments) throws IOException, NXCException
objects
- identifiers of objects need to be synchronizedsyncComments
- if true, comments for objects will be synchronized as wellIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void syncObjectSet(long[] objects, boolean syncComments, int options) throws IOException, NXCException
objects
- identifiers of objects need to be synchronizedsyncComments
- if true, comments for objects will be synchronized as welloptions
- sync options (see above)IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void syncMissingObjects(long[] objects, boolean syncComments) throws IOException, NXCException
objects
- identifiers of objects need to be synchronizedsyncComments
- if true, comments for objects will be synchronized as wellIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void syncMissingObjects(long[] objects, boolean syncComments, int options) throws IOException, NXCException
objects
- identifiers of objects need to be synchronizedsyncComments
- if true, comments for objects will be synchronized as welloptions
- sync options (see comments for syncObjectSet)IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic AbstractObject findObjectById(long id)
id
- Object identifierpublic <T extends AbstractObject> T findObjectById(long id, Class<T> requiredClass)
id
- object identifierrequiredClass
- required object classpublic List<AbstractObject> findMultipleObjects(long[] idList, boolean returnUnknown)
idList
- array of object identifiersreturnUnknown
- if true, this method will return UnknownObject placeholders for unknown object identifierspublic List<AbstractObject> findMultipleObjects(long[] idList, Class<? extends AbstractObject> classFilter, boolean returnUnknown)
idList
- array of object identifiersclassFilter
- class filter for objects, or null to disable filteringreturnUnknown
- if true, this method will return UnknownObject placeholders for unknown object identifierspublic List<AbstractObject> findMultipleObjects(Long[] idList, boolean returnUnknown)
idList
- array of object identifiersreturnUnknown
- if true, this method will return UnknownObject placeholders for unknown object identifierspublic List<AbstractObject> findMultipleObjects(Long[] idList, Class<? extends AbstractObject> classFilter, boolean returnUnknown)
idList
- array of object identifiersclassFilter
- class filter for objects, or null to disable filteringreturnUnknown
- if true, this method will return UnknownObject placeholders for unknown object identifierspublic Zone findZone(long zoneId)
zoneId
- zone ID to findpublic AbstractObject findObjectByName(String name)
name
- object name to findpublic AbstractObject findObjectByNamePattern(String pattern)
pattern
- regular expression for matching object namepublic AbstractObject findObject(ObjectFilter filter)
filter
- public List<AbstractObject> filterObjects(ObjectFilter filter)
filter
- public AbstractObject[] getTopLevelObjects(Set<Integer> classFilter)
public AbstractObject[] getTopLevelObjects()
public AbstractObject[] getAllObjects()
public String getObjectName(long objectId)
objectId
- object IDpublic HashMap<Long,Alarm> getAlarms() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic Alarm getAlarm(long alarmId) throws IOException, NXCException
alarmId
- alarm IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<EventInfo> getAlarmEvents(long alarmId) throws IOException, NXCException
alarmId
- alarm IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void acknowledgeAlarm(long alarmId, boolean sticky, int time) throws IOException, NXCException
alarmId
- Identifier of alarm to be acknowledged.sticky
- if set to true, acknowledged state will be made "sticky" (duplicate alarms with same key will not revert it back to outstanding)time
- timeout for sticky acknowledge in seconds (0 for infinite)IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void acknowledgeAlarm(long alarmId) throws IOException, NXCException
alarmId
- Identifier of alarm to be acknowledged.IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void acknowledgeAlarm(String helpdeskReference) throws IOException, NXCException
helpdeskReference
- Helpdesk issue reference (e.g. JIRA issue key)IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void resolveAlarm(long alarmId) throws IOException, NXCException
alarmId
- Identifier of alarm to be resolved.IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void resolveAlarm(String helpdeskReference) throws IOException, NXCException
helpdeskReference
- Identifier of alarm to be resolved.IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void terminateAlarm(long alarmId) throws IOException, NXCException
alarmId
- Identifier of alarm to be terminated.IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void terminateAlarm(String helpdeskReference) throws IOException, NXCException
helpdeskReference
- Identifier of alarm to be resolved.IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteAlarm(long alarmId) throws IOException, NXCException
alarmId
- Identifier of alarm to be deleted.IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic String openHelpdeskIssue(long alarmId) throws IOException, NXCException
alarmId
- alarm identifierIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic String getHelpdeskIssueUrl(long alarmId) throws IOException, NXCException
alarmId
- IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void unlinkHelpdeskIssue(String helpdeskReference) throws IOException, NXCException
helpdeskReference
- IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void unlinkHelpdeskIssue(long alarmId) throws IOException, NXCException
helpdeskReference
- IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<AlarmComment> getAlarmComments(long alarmId) throws IOException, NXCException
alarmId
- alarm IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteAlarmComment(long alarmId, long commentId) throws IOException, NXCException
alarmId
- alarm IDcommentId
- comment IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void createAlarmComment(long alarmId, String text) throws IOException, NXCException
alarmId
- text
- IOException
NXCException
public void createAlarmComment(String helpdeskReference, String text) throws IOException, NXCException
helpdeskReference
- text
- IOException
NXCException
public void updateAlarmComment(long alarmId, long commentId, String text) throws IOException, NXCException
alarmId
- alarm IDcommentId
- comment ID or 0 for creating new commenttext
- message textIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void setAlarmFlowState(int state) throws IOException, NXCException
state
- state of alarm status flow - strict or not (1 or 0)IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic Map<String,ServerVariable> getServerVariables() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic String getPublicServerVariable(String name) throws IOException, NXCException
name
- configuration variable nameIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic boolean getPublicServerVariableAsBoolean(String name) throws IOException, NXCException
name
- configuration variable nameIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void setServerVariable(String name, String value) throws IOException, NXCException
name
- value
- IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteServerVariable(String name) throws IOException, NXCException
name
- IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic String getServerConfigClob(String name) throws IOException, NXCException
name
- IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void setServerConfigClob(String name, String value) throws IOException, NXCException
name
- value
- IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void subscribe(int channels) throws IOException, NXCException
channels
- Notification channels to subscribe to. Multiple channels can be
specified by combining them with OR operation.IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void unsubscribe(int channels) throws IOException, NXCException
channels
- Notification channels to unsubscribe from. Multiple channels can
be specified by combining them with OR operation.IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void syncUserDatabase() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic AbstractUserObject findUserDBObjectById(long id)
public AbstractUserObject[] getUserDatabaseObjects()
public long createUser(String name) throws IOException, NXCException
name
- Login name for new userIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic long createUserGroup(String name) throws IOException, NXCException
name
- Name for new user groupIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteUserDBObject(long id) throws IOException, NXCException
id
- User or group IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void setUserPassword(long id, String newPassword, String oldPassword) throws IOException, NXCException
id
- User IDnewPassword
- New passwordoldPassword
- Old passwordIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic boolean validateUserPassword(String password) throws IOException, NXCException
password
- password to validateIOException
NXCException
public void modifyUserDBObject(AbstractUserObject object, int fields) throws IOException, NXCException
object
- User datafields
- bit mask indicating fields to modifyIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void detachUserFromLdap(AbstractUserObject object) throws IOException, NXCException
object
- User datafields
- bit mask indicating fields to modifyIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void modifyUserDBObject(AbstractUserObject object) throws IOException, NXCException
object
- User dataIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void lockUserDatabase() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void unlockUserDatabase() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void setAttributeForCurrentUser(String name, String value) throws IOException, NXCException
name
- Attribute's namevalue
- New attribute's valueIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic String getAttributeForCurrentUser(String name) throws IOException, NXCException
name
- Attribute's nameIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic DciValue[] getLastValues(long nodeId, boolean objectTooltipOnly, boolean overviewOnly, boolean includeNoValueObjects) throws IOException, NXCException
nodeId
- ID of the node to get DCI values forobjectTooltipOnly
- if set to true, only DCIs with DCF_SHOW_ON_OBJECT_TOOLTIP flag set are returnedoverviewOnly
- if set to true, only DCIs with DCF_SHOW_IN_OBJECT_OVERVIEW flag set are returnedincludeNoValueObjects
- if set to true, objects with no value (like instance discovery DCIs) will be returned as wellIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic DciValue[] getLastValues(long nodeId) throws IOException, NXCException
nodeId
- ID of the node to get DCI values forIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic DciValue[] getLastValues(Set<MapDCIInstance> dciIDList) throws IOException, NXCException
dciIDList
- List with all required data to get last DCI idIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic Table getTableLastValues(long nodeId, long dciId) throws IOException, NXCException
nodeId
- ID of the node to get DCI values fordciId
- DCI IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic PerfTabDci[] getPerfTabItems(long nodeId) throws IOException, NXCException
nodeId
- Node object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<ThresholdViolationSummary> getThresholdSummary(long objectId) throws IOException, NXCException
objectId
- parent object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic DciData getCollectedData(long nodeId, long dciId, Date from, Date to, int maxRows) throws IOException, NXCException
nodeId
- Node IDdciId
- DCI IDfrom
- Start of time range or null for no limitto
- End of time range or null for no limitmaxRows
- Maximum number of rows to retrieve or 0 for no limitIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic DciData getCollectedTableData(long nodeId, long dciId, String instance, String dataColumn, Date from, Date to, int maxRows) throws IOException, NXCException
nodeId
- Node IDdciId
- DCI IDinstance
- instance valuedataColumn
- name of column to retrieve data fromfrom
- Start of time range or null for no limitto
- End of time range or null for no limitmaxRows
- Maximum number of rows to retrieve or 0 for no limitIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void clearCollectedData(long nodeId, long dciId) throws IOException, NXCException
nodeId
- Node object IDdciId
- DCI IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void forceDCIPoll(long nodeId, long dciId) throws IOException, NXCException
nodeId
- Node object IDdciId
- DCI IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic Threshold[] getThresholds(long nodeId, long dciId) throws IOException, NXCException
nodeId
- Node object IDdciId
- DCI IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic String[] resolveDciNames(long[] nodeIds, long[] dciIds) throws IOException, NXCException
nodeIds
- node identifiersdciIds
- DCI identifiers (length must match length of node identifiers list)IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic String[] resolveDciNames(Collection<ConditionDciInfo> dciList) throws IOException, NXCException
dciList
- DCI listIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic String queryParameter(long nodeId, int origin, String name) throws IOException, NXCException
nodeId
- node object IDorigin
- parameter's origin (NetXMS agent, SNMP, etc.)name
- parameter's nameIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic Table queryAgentTable(long nodeId, String name) throws IOException, NXCException
nodeId
- node object IDname
- table's nameIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outprotected void createCustomObject(NXCObjectCreationData data, Object userData, org.netxms.base.NXCPMessage msg)
data
- object creation data passed to createObjectuserData
- user-defined data for object creation passed to createObjectmsg
- NXCP message that will be sent to serverpublic long createObject(NXCObjectCreationData data, Object userData) throws IOException, NXCException
data
- Object creation datauserData
- User-defined data for custom object creationIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic long createObject(NXCObjectCreationData data) throws IOException, NXCException
data
- Object creation dataIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteObject(long objectId) throws IOException, NXCException
objectId
- ID of an object which should be deletedIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outprotected void modifyCustomObject(NXCObjectModificationData data, Object userData, org.netxms.base.NXCPMessage msg)
data
- object modification data passed to modifyObjectuserData
- user-defined data passed to modifyObjectmsg
- NXCP message to be sent to serverpublic void modifyObject(NXCObjectModificationData data, Object userData) throws IOException, NXCException
data
- Object modification datauserData
- user-defined data for custom object modificationIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void modifyObject(NXCObjectModificationData data) throws IOException, NXCException
data
- Object modification dataIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void setObjectName(long objectId, String name) throws IOException, NXCException
objectId
- ID of object to be changedname
- New object's nameIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void setObjectCustomAttributes(long objectId, Map<String,String> attrList) throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void setObjectACL(long objectId, AccessListElement[] acl, boolean inheritAccessRights) throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void changeObjectZone(long objectId, long zoneId) throws IOException, NXCException
objectId
- Node or cluster object IDzoneId
- IOException
NXCException
public void updateObjectComments(long objectId, String comments) throws IOException, NXCException
objectId
- Object's IDcomments
- New commentsIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void setObjectManaged(long objectId, boolean isManaged) throws IOException, NXCException
objectId
- object's identifierisManaged
- object's managed statusIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic int getEffectiveRights(long objectId) throws IOException, NXCException
objectId
- IOException
NXCException
public void bindObject(long parentId, long childId) throws IOException, NXCException
parentId
- parent object's identifierchildId
- Child object's identifierIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void unbindObject(long parentId, long childId) throws IOException, NXCException
parentId
- parent object's identifierchildId
- Child object's identifierIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void removeTemplate(long templateId, long nodeId, boolean removeDci) throws IOException, NXCException
templateId
- template object identifiernodeId
- node object identifierremoveDci
- true if DCIs created from this template should be removedIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void applyTemplate(long templateId, long nodeId) throws IOException, NXCException
templateId
- template object IDnodeId
- node object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void addClusterNode(long clusterId, long nodeId) throws IOException, NXCException
clusterId
- cluster object IDnodeId
- node object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void removeClusterNode(long clusterId, long nodeId) throws IOException, NXCException
clusterId
- cluster object IDnodeId
- node object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic NetworkMapPage queryLayer2Topology(long nodeId) throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void executeAction(long nodeId, String action) throws IOException, NXCException
nodeId
- Node object IDaction
- Action nameIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void executeAction(long nodeId, String action, boolean receiveOutput, TextOutputListener listener, Writer writer) throws IOException, NXCException
nodeId
- Node object IDaction
- Action namereceiveOutput
- true if action's output has to be readlistener
- listener for action's output or nullwriter
- writer for action's output or nullIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void wakeupNode(long objectId) throws IOException, NXCException
objectId
- node or interface IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic PhysicalComponent getNodePhysicalComponents(long nodeId) throws IOException, NXCException
nodeId
- node object identifierIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<WinPerfObject> getNodeWinPerfObjects(long nodeId) throws IOException, NXCException
nodeId
- node object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<SoftwarePackage> getNodeSoftwarePackages(long nodeId) throws IOException, NXCException
nodeId
- node object identifierIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic ServerJob[] getServerJobList() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void cancelServerJob(long jobId) throws IOException, NXCException
jobId
- Job IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void holdServerJob(long jobId) throws IOException, NXCException
jobId
- Job IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void unholdServerJob(long jobId) throws IOException, NXCException
jobId
- Job IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deployAgentPolicy(long policyId, long nodeId) throws IOException, NXCException
policyId
- Policy object IDnodeId
- Node object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void uninstallAgentPolicy(long policyId, long nodeId) throws IOException, NXCException
policyId
- Policy object IDnodeId
- Node object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic EventProcessingPolicy getEventProcessingPolicy() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic EventProcessingPolicy openEventProcessingPolicy() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void saveEventProcessingPolicy(EventProcessingPolicy epp) throws IOException, NXCException
epp
- Modified event processing policyIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void closeEventProcessingPolicy() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic DataCollectionConfiguration openDataCollectionConfiguration(long nodeId) throws IOException, NXCException
nodeId
- Node object identifierIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void clearAgentDataCollectionConfiguration(long nodeId) throws IOException, NXCException
nodeId
- node object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void resyncAgentDataCollectionConfiguration(long nodeId) throws IOException, NXCException
nodeId
- node object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic TransformationTestResult testTransformationScript(long nodeId, String script, String inputValue) throws IOException, NXCException
nodeId
- ID of the node object to test script onscript
- script source codeinputValue
- input value for the scriptIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void executeScript(long nodeId, String script, TextOutputListener listener) throws IOException, NXCException
nodeId
- ID of the node object to test script onscript
- script source codeIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic ScriptCompilationResult compileScript(String source, boolean serialize) throws IOException, NXCException
source
- script sourceserialize
- flag to indicate if compiled script should be serialized and sent back to clientIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic Log openServerLog(String logName) throws IOException, NXCException
logName
- Log nameIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void syncEventTemplates() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic EventTemplate[] getCachedEventTemplates()
public EventTemplate findEventTemplateByName(String name)
name
- Event namepublic String getEventName(long code)
code
- event codepublic EventTemplate findEventTemplateByCode(long code)
code
- Event codepublic List<EventTemplate> findMultipleEventTemplates(Long[] codes)
codes
- List of event codespublic List<EventTemplate> findMultipleEventTemplates(long[] codes)
codes
- List of event codespublic List<EventTemplate> getEventTemplates() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic long generateEventCode() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteEventTemplate(long eventCode) throws IOException, NXCException
eventCode
- Event codeIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void modifyEventTemplate(EventTemplate evt) throws IOException, NXCException
evt
- Event templateIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void sendEvent(long eventCode, String eventName, long objectId, String[] parameters, String userTag) throws IOException, NXCException
eventCode
- event code. Ignored if event name is not null.eventName
- event name. Must be set to null if event identified by code.objectId
- Object ID to send event on behalf of. If set to 0, server will determine object ID by client IP address.parameters
- event's parametersuserTag
- event's user tagIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void sendEvent(long eventCode, String[] parameters) throws IOException, NXCException
eventCode
- event codeparameters
- event's parametersIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void sendEvent(String eventName, String[] parameters) throws IOException, NXCException
eventName
- event nameparameters
- event's parametersIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<String> getSnmpCommunities() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void updateSnmpCommunities(List<String> list) throws IOException, NXCException
list
- New list of SNMP community stringsIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<SnmpUsmCredential> getSnmpUsmCredentials() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void updateSnmpUsmCredentials(List<SnmpUsmCredential> list) throws IOException, NXCException
list
- New list of SNMP USM credentialsIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic String getAgentConfig(long nodeId) throws IOException, NXCException
nodeId
- Node IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void updateAgentConfig(long nodeId, String config, boolean apply) throws IOException, NXCException
nodeId
- Node IDconfig
- New configuration file contentapply
- Apply flag - if set to true, agent will restart automatically to
apply changesIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<AgentParameter> getSupportedParameters(long nodeId) throws IOException, NXCException
nodeId
- Node IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<AgentTable> getSupportedTables(long nodeId) throws IOException, NXCException
nodeId
- Node IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic long[] getDataCollectionEvents(long objectId) throws IOException, NXCException
objectId
- node, cluster, or template object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<Script> getDataCollectionScripts(long objectId) throws IOException, NXCException
objectId
- node, cluster, or template object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic String exportConfiguration(String description, long[] events, long[] traps, long[] templates, UUID[] rules, long[] scripts, long[] objectTools, long[] dciSummaryTables) throws IOException, NXCException
description
- Description of exported configurationevents
- List of event codestraps
- List of trap identifierstemplates
- List of template object identifiersrules
- List of event processing rule GUIDsscripts
- List of library script identifiersobjectTools
- List of object tool identifiersdciSummaryTables
- List of DCI summary table identifiersIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void importConfiguration(String config, int flags) throws IOException, NXCException
config
- Configuration in XML formatflags
- Import flagsIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic Map<String,Object> getServerStats() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<ServerAction> getActions() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic long createAction(String name) throws IOException, NXCException
name
- action nameIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void modifyAction(ServerAction action) throws IOException, NXCException
action
- Action objectIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteAction(long actionId) throws IOException, NXCException
actionId
- Action IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<AuthCertificate> getCertificateList() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void createNewCertificate(byte[] data, String comments) throws IOException, NXCException
data
- certificate file contentcomments
- comment for certificateIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteCertificate(long id) throws IOException, NXCException
id
- the certificate idIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void updateCertificate(long id, String comment) throws IOException, NXCException
id
- the certificate idcomment
- the certificate commentIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<ObjectTool> getObjectTools() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic ObjectToolDetails getObjectToolDetails(long toolId) throws IOException, NXCException
toolId
- Tool IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic long generateObjectToolId() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void modifyObjectTool(ObjectToolDetails tool) throws IOException, NXCException
tool
- Object toolIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteObjectTool(long toolId) throws IOException, NXCException
toolId
- Object tool IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void changeObjecToolDisableStatuss(long toolId, boolean enable) throws IOException, NXCException
toolId
- Object tool IDenable
- true if object tool should be enabled, false if disabledIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic Table executeTableTool(long toolId, long nodeId) throws IOException, NXCException
toolId
- Tool IDnodeId
- Node object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void executeServerCommand(long objectId, String command, Map<String,String> inputFields) throws IOException, NXCException
objectId
- object IDcommand
- commandinputFields
- values for input fields (can be null)IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void executeServerCommand(long objectId, String command, Map<String,String> inputFields, boolean receiveOutput, TextOutputListener listener, Writer writer) throws IOException, NXCException
objectId
- object IDcommand
- commandinputFields
- values for input fields (can be null)receiveOutput
- true if command's output has to be readlistener
- listener for command's output or nullwriter
- writer for command's output or nullIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<SnmpTrap> getSnmpTrapsConfigurationSummary() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<SnmpTrap> getSnmpTrapsConfiguration() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic long createSnmpTrapConfiguration() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteSnmpTrapConfiguration(long trapId) throws IOException, NXCException
trapId
- Trap configuration record IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void modifySnmpTrapConfiguration(SnmpTrap trap) throws IOException, NXCException
trap
- Modified trap configuration recordIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic Date getMibFileTimestamp() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic File downloadMibFile() throws IOException, NXCException
IOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<GraphSettings> getPredefinedGraphs() throws IOException, NXCException
IOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic long saveGraph(GraphSettings graph, boolean overwrite) throws IOException, NXCException
graph
- predefined graph configurationoverwrite
- defines if existing graph should be overwrittenIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deletePredefinedGraph(long graphId) throws IOException, NXCException
graphId
- predefined graph object IDIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<Script> getScriptLibrary() throws IOException, NXCException
IOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic Script getScript(long scriptId) throws IOException, NXCException
scriptId
- script IDIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic long modifyScript(long scriptId, String name, String source) throws IOException, NXCException
scriptId
- script IDname
- script namesource
- script source codeIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void renameScript(long scriptId, String name) throws IOException, NXCException
scriptId
- script IDname
- new script nameIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteScript(long scriptId) throws IOException, NXCException
scriptId
- script IDIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic ConnectionPoint findConnectionPoint(long objectId) throws IOException, NXCException
objectId
- Node or interface object IDIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic ConnectionPoint findConnectionPoint(MacAddress macAddr) throws IOException, NXCException
macAddr
- MAC addressIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic ConnectionPoint findConnectionPoint(int zoneId, InetAddress ipAddr) throws IOException, NXCException
zoneId
- zone IDipAddr
- IP address to findIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic boolean checkConnection()
public List<LibraryImage> getImageLibrary() throws IOException, NXCException
IOException
NXCException
public List<LibraryImage> getImageLibrary(String category) throws IOException, NXCException
category
- IOException
NXCException
public LibraryImage getImage(UUID guid) throws IOException, NXCException
guid
- IOException
NXCException
public LibraryImage createImage(LibraryImage image, ProgressListener listener) throws IOException, NXCException
image
- listener
- IOException
NXCException
public void deleteImage(LibraryImage image) throws IOException, NXCException
image
- IOException
NXCException
public void modifyImage(LibraryImage image, ProgressListener listener) throws IOException, NXCException
image
- listener
- IOException
NXCException
public void pollNode(long nodeId, NodePollType pollType, TextOutputListener listener) throws IOException, NXCException
nodeId
- node object IDpollType
- poll typelistener
- listenerIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<Situation> getSituations() throws IOException, NXCException
IOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic long createSituation(String name, String comments) throws IOException, NXCException
name
- name for new situation objectcomments
- comments for new situation objectIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void modifySituation(long id, String name, String comments) throws IOException, NXCException
id
- situation idname
- new name or null to leave unchangedcomments
- new comments or null to leave unchangedIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteSituation(long id) throws IOException, NXCException
id
- situation idIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteSituationInstance(long id, String instance) throws IOException, NXCException
id
- situation idinstance
- situation instanceIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic ServerFile[] listServerFiles() throws IOException, NXCException
IOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic ServerFile[] listServerFiles(String[] filter) throws IOException, NXCException
filter
- array with required extension. Will be used as file filter. Give empty array or null if no filter should be
applyed.IOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic AgentFile[] listAgentFiles(AgentFile file, String fullPath, long objectId) throws IOException, NXCException
file
- parent of new coomming listfullPath
- path that will be used on an agent to get list of subfilesobjectId
- the ID of the nodeIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic long uploadFileToAgent(long nodeId, String serverFileName, String remoteFileName, boolean jobOnHold) throws IOException, NXCException
nodeId
- node object IDserverFileName
- file name in server's file storeremoteFileName
- fully qualified file name on target system or null to upload
file to agent's file storejobOnHold
- if true, upload job will be created in "hold" statusIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void uploadFileToServer(File localFile, String serverFileName, ProgressListener listener) throws IOException, NXCException
localFile
- local fileserverFileName
- name under which file will be stored on serverIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void uploadLocalFileToAgent(File localFile, String agentFileName, long nodeId, ProgressListener listener) throws IOException, NXCException
localFile
- local fileserverFileName
- name under which file will be stored on serverIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void createFolderOnAgent(String folder, long nodeId) throws IOException, NXCException
localFile
- local fileserverFileName
- name under which file will be stored on serverIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic AgentFileData downloadFileFromAgent(long nodeId, String remoteFileName, long maxFileSize, boolean follow) throws IOException, NXCException
nodeId
- node object IDremoteFileName
- fully qualified file name on remote systemmaxFileSize
- maximum download size, 0 == UNLIMITEDfollow
- if set to true, server will send file updates as they appear (like for tail -f command)IOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic File downloadFileFromServer(String remoteFileName) throws IOException, NXCException
remoteFileName
- fully qualified file name on remote systemIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void cancelFileMonitoring(long nodeId, String remoteFileName) throws IOException, NXCException
nodeId
- node object IDremoteFileName
- fully qualified file name on remote systemIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteServerFile(String serverFileName) throws IOException, NXCException
serverFileName
- name of server fileIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteAgentFile(long nodeId, String fileName) throws IOException, NXCException
serverFileName
- name of server fileIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void renameAgentFile(long nodeId, String oldName, String newFileName) throws IOException, NXCException
serverFileName
- name of server fileIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void moveAgentFile(long nodeId, String oldName, String newFileName) throws IOException, NXCException
serverFileName
- name of server fileIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void openConsole() throws IOException, NXCException
IOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void closeConsole() throws IOException, NXCException
IOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic boolean processConsoleCommand(String command) throws IOException, NXCException
command
- command to processIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic boolean isServerConsoleConnected()
public void snmpWalk(long nodeId, String rootOid, SnmpWalkListener listener) throws IOException, NXCException
nodeId
- node object IDrootOid
- root SNMP object ID (as text)listener
- listenerIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<VlanInfo> getVlans(long nodeId) throws IOException, NXCException
nodeId
- node object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic boolean isObjectsSynchronized()
public List<IpAddressListElement> getAddressList(int listId) throws IOException, NXCException
list
- list identifier (defined in NXCSession as ADDRESS_LIST_xxx)IOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void setAddressList(int listId, List<IpAddressListElement> list) throws IOException, NXCException
listId
- list IDlist
- new list contentIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void resetServerComponent(int component) throws IOException, NXCException
component
- component idIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic NetworkPath getNetworkPath(long node1, long node2) throws IOException, NXCException
node1
- source nodenode2
- destination nodeIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<Route> getRoutingTable(long nodeId) throws IOException, NXCException
nodeId
- node object IDIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<FdbEntry> getSwitchForwardingDatabase(long nodeId) throws IOException, NXCException
nodeId
- node object IDIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<WirelessStation> getWirelessStations(long nodeId) throws IOException, NXCException
nodeId
- controller node IDIOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void removePackage(long packageId) throws IOException, NXCException
packageId
- IOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic long installPackage(PackageInfo info, File pkgFile, ProgressListener listener) throws IOException, NXCException
info
- package informationpkgFile
- package filelistener
- progress listener (may be null)IOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<PackageInfo> getInstalledPackages() throws IOException, NXCException
IOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deployPackage(long packageId, Long[] nodeList, PackageDeploymentListener listener) throws IOException, NXCException
packageId
- package IDnodeList
- list of nodeslistener
- deployment progress listener (may be null)IOException
- if socket or file I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void lockPackageDatabase() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void unlockPackageDatabase() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void sendSMS(String phoneNumber, String message) throws IOException, NXCException
phoneNumber
- target phone numbermessage
- message textIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void pushDciData(DciPushData[] data) throws IOException, NXCException
data
- push dataIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void pushDciData(long nodeId, long dciId, String value) throws IOException, NXCException
nodeId
- node IDdciId
- DCI IDvalue
- value to pushIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void pushDciData(String nodeName, String dciName, String value) throws IOException, NXCException
nodeName
- node namedciName
- DCI namevalue
- value to pushIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic int getClientType()
public void setClientType(int clientType)
clientType
- the clientType to setpublic String getDateFormat()
public String getTimeFormat()
public String getShortTimeFormat()
public void handover(NXCSession target)
target
- target session objectpublic int getSessionId()
public List<MappingTableDescriptor> listMappingTables() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic MappingTable getMappingTable(int id) throws IOException, NXCException
id
- IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic int createMappingTable(String name, String description, int flags) throws IOException, NXCException
name
- name of new tabledescription
- description for new tableflags
- flags for new tableIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic int updateMappingTable(MappingTable table) throws IOException, NXCException
table
- mapping tableIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteMappingTable(int id) throws IOException, NXCException
id
- mapping table IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic final int getDefaultDciRetentionTime()
public final int getDefaultDciPollingInterval()
public int getMinViewRefreshInterval()
public final boolean isStrictAlarmStatusFlow()
public boolean isTimedAlarmAckEnabled()
public List<DciSummaryTableDescriptor> listDciSummaryTables() throws IOException, NXCException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic DciSummaryTable getDciSummaryTable(int id) throws IOException, NXCException
id
- DCI summary table ID.IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic int modifyDciSummaryTable(DciSummaryTable table) throws IOException, NXCException
table
- DCI summary table configurationIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteDciSummaryTable(int id) throws IOException, NXCException
id
- IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic Table queryDciSummaryTable(int tableId, long baseObjectId) throws IOException, NXCException
tableId
- DCI summary table IDbaseObjectId
- base container object IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic Table queryAdHocDciSummaryTable(long baseObjectId, List<DciSummaryTableColumn> columns, AggregationFunction function, Date periodStart, Date periodEnd, boolean multiInstance) throws IOException, NXCException
baseObjectId
- base container object IDcolumns
- columns for resulting tablefunction
- data aggregation functionperiodStart
- start of query periodperiodEnd
- end of query periodIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<UUID> listReports() throws NXCException, IOException
NXCException
IOException
public ReportDefinition getReportDefinition(UUID reportId) throws NXCException, IOException
reportId
- NXCException
IOException
public UUID executeReport(UUID reportId, Map<String,String> parameters) throws NXCException, IOException
reportId
- parameters
- NXCException
IOException
public List<ReportResult> listReportResults(UUID reportId) throws NXCException, IOException
reportId
- NXCException
IOException
public void deleteReportResult(UUID reportId, UUID jobId) throws NXCException, IOException
reportId
- jobId
- NXCException
IOException
public File renderReport(UUID reportId, UUID jobId, ReportRenderFormat format) throws NXCException, IOException
reportId
- jobId
- format
- NXCException
IOException
public void scheduleReport(ReportingJob job, Map<String,String> parameters) throws NXCException, IOException
job
- parameters
- NXCException
IOException
public List<ReportingJob> listScheduledJobs(UUID reportId) throws NXCException, IOException
reportId
- NXCException
IOException
public void deleteReportSchedule(UUID reportId, UUID jobId) throws NXCException, IOException
reportId
- jobId
- NXCException
IOException
public void setClientAddress(String clientAddress)
clientAddress
- the clientAddress to setpublic String getClientLanguage()
public void setClientLanguage(String clientLanguage)
clientLanguage
- the clientLanguage to setpublic long[] getSubnetAddressMap(long subnetId) throws NXCException, IOException
subnetId
- IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<ConfigListElement> getConfigList() throws NXCException, IOException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic ConfigContent getConfigContent(long id) throws NXCException, IOException
id
- config idIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void saveAgentConfig(ConfigContent conf) throws NXCException, IOException
conf
- contents of configIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteAgentConfig(long id) throws NXCException, IOException
id
- agent configuration IDIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic void swapAgentConfigs(long id1, long id2) throws NXCException, IOException
id1
- id2
- IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<org.netxms.base.GeoLocation> getLocationHistory(long objectId, Date from, Date to) throws NXCException, IOException
objectId
- from
- to
- IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic byte[] takeScreenshot(long nodeId, String sessionName) throws NXCException, IOException
nodeId
- node object IDsessionId
- session ID for session to take screenshot fromsessionName
- session name for session to take screenshot fromIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<String> listScheduleCallbacks() throws NXCException, IOException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outpublic List<ScheduledTask> listScheduleTasks() throws IOException, NXCException
IOException
NXCException
public void addSchedule(ScheduledTask task) throws NXCException, IOException
NXCException
IOException
public void updateSchedule(ScheduledTask task) throws IOException, NXCException
IOException
NXCException
public void removeSchedule(long scheduleId) throws NXCException, IOException
NXCException
IOException
public void setObjectMaintenance(long objectId, boolean maintenance) throws NXCException, IOException
NXCException
IOException
Copyright © 2015. All rights reserved.