public class NXCSession extends Object implements org.netxms.api.client.Session, org.netxms.api.client.scripts.ScriptLibraryManager, org.netxms.api.client.users.UserManager, org.netxms.api.client.servermanager.ServerManager, org.netxms.api.client.images.ImageLibraryManager, org.netxms.api.client.reporting.ReportingServerManager
Modifier and Type | Field and Description |
---|---|
static int |
ADDRESS_LIST_DISCOVERY_FILTER |
static int |
ADDRESS_LIST_DISCOVERY_TARGETS |
static int |
APPLICATION_CLIENT |
static int |
AUTH_TYPE_CERTIFICATE |
static int |
AUTH_TYPE_PASSWORD |
static int |
AUTH_TYPE_SSO_TICKET |
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 |
CLIENT_PROTOCOL_VERSION |
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 |
USER_MODIFY_ACCESS_RIGHTS, USER_MODIFY_AUTH_METHOD, USER_MODIFY_CERT_MAPPING, USER_MODIFY_CUSTOM_ATTRIBUTES, USER_MODIFY_DESCRIPTION, USER_MODIFY_FLAGS, USER_MODIFY_FULL_NAME, USER_MODIFY_GROUP_MEMBERSHIP, USER_MODIFY_LOGIN_NAME, USER_MODIFY_MEMBERS, USER_MODIFY_PASSWD_LENGTH, USER_MODIFY_TEMP_DISABLE, USER_MODIFY_XMPP_ID
Constructor and Description |
---|
NXCSession(String connAddress,
int connPort,
String connLoginName) |
NXCSession(String connAddress,
int connPort,
String connLoginName,
String connPassword) |
NXCSession(String connAddress,
int connPort,
String connLoginName,
String connPassword,
boolean connUseEncryption) |
NXCSession(String connAddress,
String connLoginName,
String connPassword) |
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(org.netxms.api.client.SessionListener listener) |
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() |
void |
clearCollectedData(long nodeId,
long dciId)
Clear collected data for given DCI
|
void |
closeConsole()
Close server console.
|
void |
closeEventProcessingPolicy()
Close event processing policy.
|
void |
connect() |
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.
|
org.netxms.api.client.images.LibraryImage |
createImage(org.netxms.api.client.images.LibraryImage image,
org.netxms.api.client.ProgressListener listener) |
int |
createMappingTable(String name,
String description,
int flags) |
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) |
long |
createUserGroup(String name) |
void |
deleteAction(long actionId)
Delete server action
|
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(org.netxms.api.client.images.LibraryImage image) |
void |
deleteMappingTable(int id) |
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) |
void |
deleteServerFile(String serverFileName)
Delete file from server's file store
|
void |
deleteServerVariable(String name) |
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) |
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 |
disconnect() |
AgentFile |
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
|
UUID |
executeReport(UUID reportId,
Map<String,String> parameters) |
void |
executeServerCommand(long objectId,
String command)
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)
Export server configuration.
|
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 |
findObjectById(long id)
Find NetXMS object by it's identifier.
|
AbstractObject |
findObjectById(long id,
Class<? extends AbstractObject> 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.
|
org.netxms.api.client.users.AbstractUserObject |
findUserDBObjectById(long id) |
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.
|
HashMap<Long,Alarm> |
getAlarms()
Get list of active alarms.
|
AbstractObject[] |
getAllObjects()
Get list of all objects
|
String |
getAttributeForCurrentUser(String name) |
int |
getAuthType() |
EventTemplate[] |
getCachedEventTemplates()
Get cached list event templates
|
List<org.netxms.api.client.users.AuthCertificate> |
getCertificateList()
Get list of certificates
|
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.
|
String |
getConnClientInfo() |
long[] |
getDataCollectionEvents(long objectId)
Get all events used in data collection by given node, cluster, or template object.
|
String |
getDateFormat() |
DciSummaryTable |
getDciSummaryTable(int id)
Get DCI summary table configuration.
|
int |
getDefaultDciPollingInterval() |
int |
getDefaultDciRetentionTime() |
int |
getEffectiveRights(long objectId)
Get effective rights of currently logged in user to given object.
|
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
|
org.netxms.api.client.images.LibraryImage |
getImage(UUID guid) |
List<org.netxms.api.client.images.LibraryImage> |
getImageLibrary() |
List<org.netxms.api.client.images.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)
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)
|
org.netxms.api.client.mt.MappingTable |
getMappingTable(int id) |
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.
|
int |
getRecvBufferSize() |
org.netxms.api.client.reporting.ReportDefinition |
getReportDefinition(UUID reportId) |
org.netxms.api.client.scripts.Script |
getScript(long scriptId) |
List<org.netxms.api.client.scripts.Script> |
getScriptLibrary() |
String |
getServerAddress() |
byte[] |
getServerChallenge() |
String |
getServerConfigClob(String name)
Get server config CLOB
|
byte[] |
getServerId() |
ServerJob[] |
getServerJobList()
Get list of server jobs
|
Map<String,Object> |
getServerStats()
Get server stats.
|
long |
getServerTime() |
String |
getServerTimeZone() |
Map<String,org.netxms.api.client.servermanager.ServerVariable> |
getServerVariables() |
String |
getServerVersion() |
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.
|
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() |
AbstractObject[] |
getTopLevelObjects()
Get list of top-level objects.
|
AbstractObject[] |
getTopLevelObjects(Set<Integer> classFilter)
Get list of top-level objects matching given class filter.
|
org.netxms.api.client.users.AbstractUserObject[] |
getUserDatabaseObjects() |
int |
getUserId() |
String |
getUserName() |
long |
getUserSystemRights() |
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,
org.netxms.api.client.ProgressListener listener)
Install (upload) package on server
|
boolean |
isConnected() |
boolean |
isEncrypted() |
boolean |
isHelpdeskLinkActive()
Get status of helpdesk integration module on server.
|
boolean |
isIgnoreProtocolVersion() |
boolean |
isObjectsSynchronized() |
boolean |
isPasswordExpired() |
boolean |
isServerConsoleConnected() |
boolean |
isStrictAlarmStatusFlow() |
boolean |
isTimedAlarmAckEnabled() |
boolean |
isZoningEnabled() |
List<DciSummaryTableDescriptor> |
listDciSummaryTables()
Get list of all configured DCI summary tables
|
List<org.netxms.api.client.mt.MappingTableDescriptor> |
listMappingTables() |
List<org.netxms.api.client.reporting.ReportResult> |
listReportResults(UUID reportId) |
List<UUID> |
listReports() |
List<org.netxms.api.client.reporting.ReportingJob> |
listScheduledJobs(UUID reportId) |
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() |
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(org.netxms.api.client.images.LibraryImage image,
org.netxms.api.client.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) |
void |
modifySituation(long id,
String name,
String comments)
Modify situation object.
|
void |
modifySnmpTrapConfiguration(SnmpTrap trap)
Modify SNMP trap configuration record.
|
void |
modifyUserDBObject(org.netxms.api.client.users.AbstractUserObject object) |
void |
modifyUserDBObject(org.netxms.api.client.users.AbstractUserObject object,
int fields) |
org.netxms.base.NXCPMessage |
newMessage(int code) |
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,
int pollType,
NodePollListener 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 |
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(org.netxms.api.client.SessionListener listener) |
void |
removePackage(long packageId)
Remove agent package from server
|
void |
removeTemplate(long templateId,
long nodeId,
boolean removeDci)
Remove data collection template from node.
|
void |
renameScript(long scriptId,
String name) |
File |
renderReport(UUID reportId,
UUID jobId,
org.netxms.api.client.reporting.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 |
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(org.netxms.api.client.reporting.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,
org.netxms.api.client.ProgressListener listener)
Send block of data as binary message
|
protected void |
sendFile(long requestId,
File file,
org.netxms.api.client.ProgressListener listener)
Send file over CSCP
|
void |
sendMessage(org.netxms.base.NXCPMessage msg)
Send message to server
|
protected void |
sendNotification(NXCNotification 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) |
void |
setAuthType(int authType) |
void |
setCertificate(Certificate certificate,
Signature signature)
Set certificate and signature to use in the authentication process.
|
void |
setClientAddress(String clientAddress) |
void |
setClientType(int clientType)
Set client type.
|
void |
setCommandTimeout(int commandTimeout) |
void |
setConnClientInfo(String connClientInfo) |
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 |
setObjectManaged(long objectId,
boolean isManaged)
Set object's managed status.
|
void |
setObjectName(long objectId,
String name)
Change object's name (wrapper for modifyObject())
|
void |
setPassword(String password)
Set the password to use in the authentication process.
|
void |
setRecvBufferSize(int recvBufferSize) |
void |
setServerConfigClob(String name,
String value)
Set server config CLOB
|
void |
setServerVariable(String name,
String value) |
void |
setUserPassword(long id,
String newPassword,
String oldPassword) |
void |
snmpWalk(long nodeId,
String rootOid,
SnmpWalkListener listener)
Do SNMP walk.
|
void |
subscribe(int channels)
Subscribe to notification channel(s)
|
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() |
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() |
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(org.netxms.api.client.mt.MappingTable table) |
void |
updateObjectComments(long objectId,
String comments)
Change object's comments.
|
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,
org.netxms.api.client.ProgressListener listener)
Upload local file to server's file store
|
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) |
org.netxms.base.NXCPMessage |
waitForMessage(int code,
long id,
int timeout) |
org.netxms.base.NXCPMessage |
waitForRCC(long id) |
org.netxms.base.NXCPMessage |
waitForRCC(long id,
int timeout) |
void |
wakeupNode(long objectId)
Wakeup node by sending wake-on-LAN magic packet.
|
public static final int DEFAULT_CONN_PORT
public static final int CLIENT_PROTOCOL_VERSION
public static final int AUTH_TYPE_PASSWORD
public static final int AUTH_TYPE_CERTIFICATE
public static final int AUTH_TYPE_SSO_TICKET
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, int connPort, String connLoginName)
connAddress
- connPort
- connLoginName
- public NXCSession(String connAddress, String connLoginName, String connPassword)
connAddress
- connLoginName
- connPassword
- public NXCSession(String connAddress, int connPort, String connLoginName, String connPassword)
connAddress
- connPort
- connLoginName
- connPassword
- protected void finalize() throws Throwable
protected AbstractObject createCustomObjectFromMessage(int objectClass, org.netxms.base.NXCPMessage msg)
objectClass
- NetXMS object class IDmsg
- Source NXCP messagepublic int getAuthType()
public void setAuthType(int authType)
authType
- the authType to setpublic void addListener(org.netxms.api.client.SessionListener listener)
addListener
in interface org.netxms.api.client.Session
public void removeListener(org.netxms.api.client.SessionListener listener)
removeListener
in interface org.netxms.api.client.Session
public void addConsoleListener(ServerConsoleListener listener)
listener
- public void removeConsoleListener(ServerConsoleListener listener)
listener
- protected void sendNotification(NXCNotification 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, org.netxms.api.client.ProgressListener listener) throws IOException, NXCException
requestId
- file
- source file to be sentIOException
NXCException
protected void sendFile(long requestId, byte[] data, org.netxms.api.client.ProgressListener listener) throws IOException, NXCException
requestId
- data
- IOException
NXCException
public org.netxms.base.NXCPMessage waitForMessage(int code, long id, int timeout) throws NXCException
waitForMessage
in interface org.netxms.api.client.Session
NXCException
public org.netxms.base.NXCPMessage waitForMessage(int code, long id) throws NXCException
waitForMessage
in interface org.netxms.api.client.Session
NXCException
public org.netxms.base.NXCPMessage waitForRCC(long id) throws NXCException
waitForRCC
in interface org.netxms.api.client.Session
NXCException
public org.netxms.base.NXCPMessage waitForRCC(long id, int timeout) throws NXCException
waitForRCC
in interface org.netxms.api.client.Session
NXCException
public final org.netxms.base.NXCPMessage newMessage(int code)
newMessage
in interface org.netxms.api.client.Session
public 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, org.netxms.api.client.NetXMSClientException
connect
in interface org.netxms.api.client.Session
IOException
UnknownHostException
org.netxms.api.client.NetXMSClientException
public void disconnect()
disconnect
in interface org.netxms.api.client.Session
public boolean isIgnoreProtocolVersion()
public void setIgnoreProtocolVersion(boolean ignoreProtocolVersion)
ignoreProtocolVersion
- public int getRecvBufferSize()
getRecvBufferSize
in interface org.netxms.api.client.Session
public void setRecvBufferSize(int recvBufferSize)
setRecvBufferSize
in interface org.netxms.api.client.Session
public String getServerAddress()
getServerAddress
in interface org.netxms.api.client.Session
public String getUserName()
getUserName
in interface org.netxms.api.client.Session
public String getServerVersion()
getServerVersion
in interface org.netxms.api.client.Session
public byte[] getServerId()
getServerId
in interface org.netxms.api.client.Session
public String getServerTimeZone()
getServerTimeZone
in interface org.netxms.api.client.Session
public long getServerTime()
public byte[] getServerChallenge()
public String getTileServerURL()
public boolean isZoningEnabled()
public boolean isHelpdeskLinkActive()
public String getConnClientInfo()
getConnClientInfo
in interface org.netxms.api.client.Session
public void setConnClientInfo(String connClientInfo)
setConnClientInfo
in interface org.netxms.api.client.Session
public void setCommandTimeout(int commandTimeout)
setCommandTimeout
in interface org.netxms.api.client.Session
public int getUserId()
getUserId
in interface org.netxms.api.client.Session
public long getUserSystemRights()
getUserSystemRights
in interface org.netxms.api.client.Session
public boolean isPasswordExpired()
isPasswordExpired
in interface org.netxms.api.client.Session
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 AbstractObject findObjectById(long id, Class<? extends AbstractObject> 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 AbstractObject findObjectByName(String name)
name
- object name to findpublic AbstractObject findObjectByNamePattern(String pattern)
pattern
- regular expression for matching object namepublic 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,org.netxms.api.client.servermanager.ServerVariable> getServerVariables() throws IOException, NXCException
getServerVariables
in interface org.netxms.api.client.servermanager.ServerManager
IOException
NXCException
public void setServerVariable(String name, String value) throws IOException, NXCException
setServerVariable
in interface org.netxms.api.client.servermanager.ServerManager
IOException
NXCException
public void deleteServerVariable(String name) throws IOException, NXCException
deleteServerVariable
in interface org.netxms.api.client.servermanager.ServerManager
IOException
NXCException
public String getServerConfigClob(String name) throws IOException, NXCException
name
- IOException
NXCException
public void setServerConfigClob(String name, String value) throws IOException, NXCException
name
- value
- IOException
NXCException
public 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
syncUserDatabase
in interface org.netxms.api.client.users.UserManager
IOException
NXCException
public org.netxms.api.client.users.AbstractUserObject findUserDBObjectById(long id)
findUserDBObjectById
in interface org.netxms.api.client.users.UserManager
public org.netxms.api.client.users.AbstractUserObject[] getUserDatabaseObjects()
getUserDatabaseObjects
in interface org.netxms.api.client.users.UserManager
public long createUser(String name) throws IOException, NXCException
createUser
in interface org.netxms.api.client.users.UserManager
IOException
NXCException
public long createUserGroup(String name) throws IOException, NXCException
createUserGroup
in interface org.netxms.api.client.users.UserManager
IOException
NXCException
public void deleteUserDBObject(long id) throws IOException, NXCException
deleteUserDBObject
in interface org.netxms.api.client.users.UserManager
IOException
NXCException
public void setUserPassword(long id, String newPassword, String oldPassword) throws IOException, NXCException
setUserPassword
in interface org.netxms.api.client.users.UserManager
IOException
NXCException
public void modifyUserDBObject(org.netxms.api.client.users.AbstractUserObject object, int fields) throws IOException, NXCException
modifyUserDBObject
in interface org.netxms.api.client.users.UserManager
IOException
NXCException
public void modifyUserDBObject(org.netxms.api.client.users.AbstractUserObject object) throws IOException, NXCException
modifyUserDBObject
in interface org.netxms.api.client.users.UserManager
IOException
NXCException
public void lockUserDatabase() throws IOException, NXCException
lockUserDatabase
in interface org.netxms.api.client.users.UserManager
IOException
NXCException
public void unlockUserDatabase() throws IOException, NXCException
unlockUserDatabase
in interface org.netxms.api.client.users.UserManager
IOException
NXCException
public void setAttributeForCurrentUser(String name, String value) throws IOException, NXCException
setAttributeForCurrentUser
in interface org.netxms.api.client.Session
IOException
NXCException
public String getAttributeForCurrentUser(String name) throws IOException, NXCException
getAttributeForCurrentUser
in interface org.netxms.api.client.Session
IOException
NXCException
public DciValue[] getLastValues(long nodeId, boolean objectTooltipOnly) 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 returnedIOException
- 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 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 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 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 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 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 String exportConfiguration(String description, long[] events, long[] traps, long[] templates, UUID[] rules) throws IOException, NXCException
description
- Description of exported configurationevents
- List of event codestraps
- List of trap identifierstemplates
- List of template object 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<org.netxms.api.client.users.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) throws IOException, NXCException
objectId
- object IDcommand
- commandIOException
- 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<org.netxms.api.client.scripts.Script> getScriptLibrary() throws IOException, NXCException
getScriptLibrary
in interface org.netxms.api.client.scripts.ScriptLibraryManager
IOException
NXCException
public org.netxms.api.client.scripts.Script getScript(long scriptId) throws IOException, NXCException
getScript
in interface org.netxms.api.client.scripts.ScriptLibraryManager
IOException
NXCException
public long modifyScript(long scriptId, String name, String source) throws IOException, NXCException
modifyScript
in interface org.netxms.api.client.scripts.ScriptLibraryManager
IOException
NXCException
public void renameScript(long scriptId, String name) throws IOException, NXCException
renameScript
in interface org.netxms.api.client.scripts.ScriptLibraryManager
IOException
NXCException
public void deleteScript(long scriptId) throws IOException, NXCException
deleteScript
in interface org.netxms.api.client.scripts.ScriptLibraryManager
IOException
NXCException
public boolean isConnected()
isConnected
in interface org.netxms.api.client.Session
public boolean isEncrypted()
isEncrypted
in interface org.netxms.api.client.Session
public 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()
checkConnection
in interface org.netxms.api.client.Session
public List<org.netxms.api.client.images.LibraryImage> getImageLibrary() throws IOException, NXCException
getImageLibrary
in interface org.netxms.api.client.images.ImageLibraryManager
IOException
NXCException
public List<org.netxms.api.client.images.LibraryImage> getImageLibrary(String category) throws IOException, NXCException
getImageLibrary
in interface org.netxms.api.client.images.ImageLibraryManager
IOException
NXCException
public org.netxms.api.client.images.LibraryImage getImage(UUID guid) throws IOException, NXCException
getImage
in interface org.netxms.api.client.images.ImageLibraryManager
IOException
NXCException
public org.netxms.api.client.images.LibraryImage createImage(org.netxms.api.client.images.LibraryImage image, org.netxms.api.client.ProgressListener listener) throws IOException, NXCException
createImage
in interface org.netxms.api.client.images.ImageLibraryManager
IOException
NXCException
public void deleteImage(org.netxms.api.client.images.LibraryImage image) throws IOException, NXCException
deleteImage
in interface org.netxms.api.client.images.ImageLibraryManager
IOException
NXCException
public void modifyImage(org.netxms.api.client.images.LibraryImage image, org.netxms.api.client.ProgressListener listener) throws IOException, NXCException
modifyImage
in interface org.netxms.api.client.images.ImageLibraryManager
IOException
NXCException
public void pollNode(long nodeId, int pollType, NodePollListener listener) throws IOException, NXCException
nodeId
- node object IDpollType
- poll type (defined in org.netxms.client.constants.NodePoller)listener
- 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 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, org.netxms.api.client.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 AgentFile 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 sizefollow
- 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 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<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, org.netxms.api.client.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()
getDateFormat
in interface org.netxms.api.client.Session
public String getTimeFormat()
getTimeFormat
in interface org.netxms.api.client.Session
public String getShortTimeFormat()
public void handover(NXCSession target)
target
- target session objectpublic int getSessionId()
public List<org.netxms.api.client.mt.MappingTableDescriptor> listMappingTables() throws IOException, org.netxms.api.client.NetXMSClientException
listMappingTables
in interface org.netxms.api.client.Session
IOException
org.netxms.api.client.NetXMSClientException
public org.netxms.api.client.mt.MappingTable getMappingTable(int id) throws IOException, org.netxms.api.client.NetXMSClientException
getMappingTable
in interface org.netxms.api.client.Session
IOException
org.netxms.api.client.NetXMSClientException
public int createMappingTable(String name, String description, int flags) throws IOException, org.netxms.api.client.NetXMSClientException
createMappingTable
in interface org.netxms.api.client.Session
IOException
org.netxms.api.client.NetXMSClientException
public int updateMappingTable(org.netxms.api.client.mt.MappingTable table) throws IOException, org.netxms.api.client.NetXMSClientException
updateMappingTable
in interface org.netxms.api.client.Session
IOException
org.netxms.api.client.NetXMSClientException
public void deleteMappingTable(int id) throws IOException, org.netxms.api.client.NetXMSClientException
deleteMappingTable
in interface org.netxms.api.client.Session
IOException
org.netxms.api.client.NetXMSClientException
public final int getDefaultDciRetentionTime()
public final int getDefaultDciPollingInterval()
public int getMinViewRefreshInterval()
public final boolean isStrictAlarmStatusFlow()
public boolean isTimedAlarmAckEnabled()
public List<DciSummaryTableDescriptor> listDciSummaryTables() throws IOException, org.netxms.api.client.NetXMSClientException
IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outorg.netxms.api.client.NetXMSClientException
public DciSummaryTable getDciSummaryTable(int id) throws IOException, org.netxms.api.client.NetXMSClientException
id
- DCI summary table ID.IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outorg.netxms.api.client.NetXMSClientException
public int modifyDciSummaryTable(DciSummaryTable table) throws IOException, org.netxms.api.client.NetXMSClientException
table
- DCI summary table configurationIOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outorg.netxms.api.client.NetXMSClientException
public void deleteDciSummaryTable(int id) throws IOException, org.netxms.api.client.NetXMSClientException
id
- IOException
- if socket I/O error occursNXCException
- if NetXMS server returns an error or operation was timed outorg.netxms.api.client.NetXMSClientException
public Table queryDciSummaryTable(int tableId, long baseObjectId) throws IOException, org.netxms.api.client.NetXMSClientException
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 outorg.netxms.api.client.NetXMSClientException
public List<UUID> listReports() throws NXCException, IOException
listReports
in interface org.netxms.api.client.reporting.ReportingServerManager
NXCException
IOException
public org.netxms.api.client.reporting.ReportDefinition getReportDefinition(UUID reportId) throws org.netxms.api.client.NetXMSClientException, IOException
getReportDefinition
in interface org.netxms.api.client.reporting.ReportingServerManager
org.netxms.api.client.NetXMSClientException
IOException
public UUID executeReport(UUID reportId, Map<String,String> parameters) throws org.netxms.api.client.NetXMSClientException, IOException
executeReport
in interface org.netxms.api.client.reporting.ReportingServerManager
org.netxms.api.client.NetXMSClientException
IOException
public List<org.netxms.api.client.reporting.ReportResult> listReportResults(UUID reportId) throws org.netxms.api.client.NetXMSClientException, IOException
listReportResults
in interface org.netxms.api.client.reporting.ReportingServerManager
org.netxms.api.client.NetXMSClientException
IOException
public void deleteReportResult(UUID reportId, UUID jobId) throws org.netxms.api.client.NetXMSClientException, IOException
deleteReportResult
in interface org.netxms.api.client.reporting.ReportingServerManager
org.netxms.api.client.NetXMSClientException
IOException
public File renderReport(UUID reportId, UUID jobId, org.netxms.api.client.reporting.ReportRenderFormat format) throws org.netxms.api.client.NetXMSClientException, IOException
renderReport
in interface org.netxms.api.client.reporting.ReportingServerManager
org.netxms.api.client.NetXMSClientException
IOException
public void scheduleReport(org.netxms.api.client.reporting.ReportingJob job, Map<String,String> parameters) throws org.netxms.api.client.NetXMSClientException, IOException
scheduleReport
in interface org.netxms.api.client.reporting.ReportingServerManager
reportId
- - current report uuidorg.netxms.api.client.NetXMSClientException
IOException
public List<org.netxms.api.client.reporting.ReportingJob> listScheduledJobs(UUID reportId) throws org.netxms.api.client.NetXMSClientException, IOException
listScheduledJobs
in interface org.netxms.api.client.reporting.ReportingServerManager
org.netxms.api.client.NetXMSClientException
IOException
public void deleteReportSchedule(UUID reportId, UUID jobId) throws org.netxms.api.client.NetXMSClientException, IOException
deleteReportSchedule
in interface org.netxms.api.client.reporting.ReportingServerManager
org.netxms.api.client.NetXMSClientException
IOException
public void setClientAddress(String clientAddress)
clientAddress
- the clientAddress to setpublic void setPassword(String password)
password
- password string to usepublic void setCertificate(Certificate certificate, Signature signature)
signature
- signature to usepublic long[] getSubnetAddressMap(long subnetId) throws NXCException, IOException
subnetId
- NXCException
IOException
Copyright © 2014. All rights reserved.