public class NXCSession extends java.lang.Object implements Session, ScriptLibraryManager, UserManager, ServerManager, ImageLibraryManager, 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(java.lang.String connAddress,
int connPort,
java.lang.String connLoginName) |
NXCSession(java.lang.String connAddress,
int connPort,
java.lang.String connLoginName,
java.lang.String connPassword) |
NXCSession(java.lang.String connAddress,
int connPort,
java.lang.String connLoginName,
java.lang.String connPassword,
boolean connUseEncryption) |
NXCSession(java.lang.String connAddress,
java.lang.String connLoginName,
java.lang.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 |
addClusterNode(long clusterId,
long nodeId)
Add node to cluster.
|
void |
addConsoleListener(ServerConsoleListener listener)
Add server console listener
|
void |
addListener(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,
java.lang.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 |
closeAlarm(long alarmId)
Set alarm's helpdesk state to "Closed".
|
void |
closeConsole()
Close server console.
|
void |
closeEventProcessingPolicy()
Close event processing policy.
|
void |
connect() |
long |
createAction(java.lang.String name)
Create new server action.
|
protected void |
createCustomObject(NXCObjectCreationData data,
java.lang.Object userData,
NXCPMessage msg)
Hook method to allow adding of custom object creation data to NXCP message.
|
protected AbstractObject |
createCustomObjectFromMessage(int objectClass,
NXCPMessage msg)
Create custom object from NXCP message.
|
LibraryImage |
createImage(LibraryImage image,
ProgressListener listener) |
int |
createMappingTable(java.lang.String name,
java.lang.String description,
int flags) |
void |
createNewCertificate(byte[] data,
java.lang.String comments)
Create new certificate
|
long |
createObject(NXCObjectCreationData data)
Create new NetXMS object.
|
long |
createObject(NXCObjectCreationData data,
java.lang.Object userData)
Create new NetXMS object.
|
long |
createSituation(java.lang.String name,
java.lang.String comments)
Create new situation object.
|
long |
createSnmpTrapConfiguration()
Create new trap configuration record.
|
long |
createUser(java.lang.String name) |
long |
createUserGroup(java.lang.String name) |
void |
deleteAction(long actionId)
Delete server action
|
void |
deleteAlarm(long alarmId)
Delete alarm.
|
void |
deleteAlarmNote(long alarmId,
long noteId)
Delete alarm's note (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) |
void |
deleteObject(long objectId)
Delete object
|
void |
deleteObjectTool(long toolId)
Delete object tool.
|
void |
deletePredefinedGraph(long graphId)
Delete predefined graph.
|
void |
deleteReportResult(java.util.UUID reportId,
java.util.UUID jobId) |
void |
deleteReportResults(long reportId,
java.util.Collection<java.lang.Long> resultIdList)
Delete report execution results.
|
void |
deleteScript(long scriptId) |
void |
deleteServerFile(java.lang.String serverFileName)
Delete file from server's file store
|
void |
deleteServerVariable(java.lang.String name) |
void |
deleteSituation(long id)
Delete situation object
|
void |
deleteSituationInstance(long id,
java.lang.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,
java.lang.Long[] nodeList,
PackageDeploymentListener listener)
Deploy agent packages onto given nodes
|
void |
disconnect() |
AgentFile |
downloadFileFromAgent(long nodeId,
java.lang.String remoteFileName,
long maxFileSize,
boolean follow)
Download file from remote host via agent.
|
java.io.File |
downloadFileFromServer(java.lang.String remoteFileName)
Download file from server file storage.
|
java.io.File |
downloadMibFile()
Download MIB file from server.
|
void |
executeAction(long nodeId,
java.lang.String action)
Execute action on remote agent
|
long |
executeReport(long reportId,
java.util.Map<java.lang.String,java.lang.String> parameters)
Execute report.
|
java.util.UUID |
executeReport(java.util.UUID reportId,
java.util.Map<java.lang.String,java.lang.String> parameters) |
void |
executeServerCommand(long objectId,
java.lang.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.
|
java.lang.String |
exportConfiguration(java.lang.String description,
long[] events,
long[] traps,
long[] templates,
java.util.UUID[] rules)
Export server configuration.
|
protected void |
finalize() |
ConnectionPoint |
findConnectionPoint(int zoneId,
java.net.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(java.lang.String name)
Find event template by name in event template database internally
maintained by session object.
|
java.util.List<EventTemplate> |
findMultipleEventTemplates(long[] codes)
Find multiple event templates by event codes in event template database
internally maintained by session object.
|
java.util.List<EventTemplate> |
findMultipleEventTemplates(java.lang.Long[] codes)
Find multiple event templates by event codes in event template database
internally maintained by session object.
|
java.util.List<AbstractObject> |
findMultipleObjects(long[] idList,
boolean returnUnknown)
Find multiple NetXMS objects by identifiers
|
java.util.List<AbstractObject> |
findMultipleObjects(java.lang.Long[] idList,
boolean returnUnknown)
Find multiple NetXMS objects by identifiers
|
java.util.List<AbstractObject> |
findMultipleObjects(long[] idList,
java.lang.Class<? extends AbstractObject> classFilter,
boolean returnUnknown)
Find multiple NetXMS objects by identifiers
|
java.util.List<AbstractObject> |
findMultipleObjects(java.lang.Long[] idList,
java.lang.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,
java.lang.Class<? extends AbstractObject> requiredClass)
Find NetXMS object by it's identifier with additional class checking.
|
AbstractObject |
findObjectByName(java.lang.String name)
Find object by name.
|
AbstractObject |
findObjectByNamePattern(java.lang.String pattern)
Find object by name using regular expression.
|
AbstractUserObject |
findUserDBObjectById(long id) |
long |
generateEventCode()
Generate code for new event template.
|
long |
generateObjectToolId()
Generate unique ID for new object tool.
|
java.util.List<ServerAction> |
getActions()
Get list of configured actions from server
|
java.util.List<IpAddressListElement> |
getAddressList(int listId)
Get address list.
|
java.lang.String |
getAgentConfig(long nodeId)
Get agent's master configuration file.
|
Alarm |
getAlarm(long alarmId)
Get information about single active alarm.
|
java.util.List<EventInfo> |
getAlarmEvents(long alarmId)
Get information about events related to single active alarm.
|
java.util.List<AlarmNote> |
getAlarmNotes(long alarmId)
Get list of notes (comments) for given alarm.
|
java.util.HashMap<java.lang.Long,Alarm> |
getAlarms()
Get list of active alarms.
|
AbstractObject[] |
getAllObjects()
Get list of all objects
|
java.lang.String |
getAttributeForCurrentUser(java.lang.String name) |
int |
getAuthType() |
EventTemplate[] |
getCachedEventTemplates()
Get cached list event templates
|
java.util.List<AuthCertificate> |
getCertificateList()
Get list of certificates
|
int |
getClientType() |
DciData |
getCollectedData(long nodeId,
long dciId,
java.util.Date from,
java.util.Date to,
int maxRows)
Get collected DCI data from server.
|
DciData |
getCollectedTableData(long nodeId,
long dciId,
java.lang.String instance,
java.lang.String dataColumn,
java.util.Date from,
java.util.Date to,
int maxRows)
Get collected table DCI data from server.
|
java.lang.String |
getConnClientInfo() |
long[] |
getDataCollectionEvents(long objectId)
Get all events used in data collection by given node, cluster, or template object.
|
java.lang.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.
|
java.util.List<EventTemplate> |
getEventTemplates()
Get event templates from server
|
LibraryImage |
getImage(java.util.UUID guid) |
java.util.List<LibraryImage> |
getImageLibrary() |
java.util.List<LibraryImage> |
getImageLibrary(java.lang.String category) |
java.util.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
|
MappingTable |
getMappingTable(int id) |
java.util.Date |
getMibFileTimestamp()
Get timestamp of server's MIB file.
|
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).
|
java.util.List<SoftwarePackage> |
getNodeSoftwarePackages(long nodeId)
Get list of software packages installed on node.
|
java.util.List<WinPerfObject> |
getNodeWinPerfObjects(long nodeId)
Get list of available Windows performance objects.
|
java.lang.String |
getObjectName(long objectId)
Get object name by ID.
|
ObjectToolDetails |
getObjectToolDetails(long toolId)
Get object tool details
|
java.util.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.
|
java.util.List<GraphSettings> |
getPredefinedGraphs()
Get list of predefined graphs.
|
int |
getRecvBufferSize() |
ReportDefinition |
getReportDefinition(java.util.UUID reportId) |
Script |
getScript(long scriptId) |
java.util.List<Script> |
getScriptLibrary() |
java.lang.String |
getServerAddress() |
byte[] |
getServerChallenge() |
java.lang.String |
getServerConfigClob(java.lang.String name)
Get server config CLOB
|
byte[] |
getServerId() |
ServerJob[] |
getServerJobList()
Get list of server jobs
|
java.util.Map<java.lang.String,java.lang.Object> |
getServerStats()
Get server stats.
|
long |
getServerTime() |
java.lang.String |
getServerTimeZone() |
java.util.Map<java.lang.String,ServerVariable> |
getServerVariables() |
java.lang.String |
getServerVersion() |
int |
getSessionId()
Get this session's ID on server.
|
java.lang.String |
getShortTimeFormat()
Get time format for short form (usually without seconds).
|
java.util.List<Situation> |
getSituations()
Get list of all configured situations
|
java.util.List<java.lang.String> |
getSnmpCommunities()
Get list of well-known SNMP communities configured on server.
|
java.util.List<SnmpTrap> |
getSnmpTrapsConfiguration()
Get list of configured SNMP traps
|
java.util.List<SnmpTrap> |
getSnmpTrapsConfigurationSummary()
Get summary of SNMP trap mapping.
|
java.util.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.
|
java.util.List<AgentParameter> |
getSupportedParameters(long nodeId)
Get list of parameters supported by agent running on given node.
|
java.util.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
|
java.util.List<ThresholdViolationSummary> |
getThresholdSummary(long objectId)
Get threshold violation summary for all nodes under given parent object.
|
java.lang.String |
getTileServerURL() |
java.lang.String |
getTimeFormat() |
AbstractObject[] |
getTopLevelObjects()
Get list of top-level objects.
|
AbstractObject[] |
getTopLevelObjects(java.util.Set<java.lang.Integer> classFilter)
Get list of top-level objects matching given class filter.
|
AbstractUserObject[] |
getUserDatabaseObjects() |
int |
getUserId() |
java.lang.String |
getUserName() |
long |
getUserSystemRights() |
java.util.List<VlanInfo> |
getVlans(long nodeId)
Get list of VLANs configured on given node
|
java.util.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(java.lang.String config,
int flags)
Import server configuration (events, traps, thresholds) from XML
|
long |
installPackage(PackageInfo info,
java.io.File pkgFile,
ProgressListener listener)
Install (upload) package on server
|
boolean |
isConnected() |
boolean |
isEncrypted() |
boolean |
isIgnoreProtocolVersion() |
boolean |
isObjectsSynchronized() |
boolean |
isPasswordExpired() |
boolean |
isServerConsoleConnected() |
boolean |
isStrictAlarmStatusFlow() |
boolean |
isTimedAlarmAckEnabled() |
boolean |
isZoningEnabled() |
java.util.List<DciSummaryTableDescriptor> |
listDciSummaryTables()
Get list of all configured DCI summary tables
|
java.util.List<MappingTableDescriptor> |
listMappingTables() |
java.util.List<ReportResult> |
listReportResults(java.util.UUID reportId) |
java.util.List<java.util.UUID> |
listReports() |
java.util.List<ReportingJob> |
listScheduledJobs() |
ServerFile[] |
listServerFiles()
List files in server's file store.
|
ServerFile[] |
listServerFiles(java.lang.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,
java.lang.Object userData,
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,
java.lang.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,
java.lang.String name,
java.lang.String source) |
void |
modifySituation(long id,
java.lang.String name,
java.lang.String comments)
Modify situation object.
|
void |
modifySnmpTrapConfiguration(SnmpTrap trap)
Modify SNMP trap configuration record.
|
void |
modifyUserDBObject(AbstractUserObject object) |
void |
modifyUserDBObject(AbstractUserObject object,
int fields) |
NXCPMessage |
newMessage(int code) |
void |
openAlarm(long alarmId,
java.lang.String reference)
Set alarm's helpdesk state to "Open".
|
void |
openConsole()
Open server console.
|
DataCollectionConfiguration |
openDataCollectionConfiguration(long nodeId)
Open data collection configuration for given node.
|
EventProcessingPolicy |
openEventProcessingPolicy()
Open event processing policy for editing.
|
Log |
openServerLog(java.lang.String logName)
Open server log by name.
|
void |
pollNode(long nodeId,
int pollType,
NodePollListener listener)
Perform a forced node poll.
|
boolean |
processConsoleCommand(java.lang.String command)
Process console command on server.
|
void |
pushDciData(DciPushData[] data)
Push data to server.
|
void |
pushDciData(long nodeId,
long dciId,
java.lang.String value)
Push value for single DCI.
|
void |
pushDciData(java.lang.String nodeName,
java.lang.String dciName,
java.lang.String value)
Push value for single DCI.
|
Table |
queryAgentTable(long nodeId,
java.lang.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
|
java.lang.String |
queryParameter(long nodeId,
int origin,
java.lang.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) |
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,
java.lang.String name) |
java.io.File |
renderReport(java.util.UUID reportId,
java.util.UUID jobId,
ReportRenderFormat format) |
void |
resetServerComponent(int component)
Reset server's internal component (defined by SERVER_COMPONENT_xxx)
|
void |
resolveAlarm(long alarmId)
Resolve alarm.
|
java.lang.String[] |
resolveDciNames(java.util.Collection<ConditionDciInfo> dciList)
Resolve names of given DCIs
|
java.lang.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(java.util.UUID reportId,
java.util.Date startTime,
int daysOfWeek,
int daysOfMonth,
java.util.Map<java.lang.String,java.lang.String> parameters) |
void |
sendEvent(long eventCode,
java.lang.String[] parameters)
Convenience wrapper for sendEvent interface.
|
void |
sendEvent(long eventCode,
java.lang.String eventName,
long objectId,
java.lang.String[] parameters,
java.lang.String userTag)
Send event to server.
|
void |
sendEvent(java.lang.String eventName,
java.lang.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,
java.io.File file,
ProgressListener listener)
Send file over CSCP
|
void |
sendMessage(NXCPMessage msg)
Send message to server
|
protected void |
sendNotification(NXCNotification n)
Call notification handlers on all registered listeners
|
void |
sendSMS(java.lang.String phoneNumber,
java.lang.String message)
Send SMS via server.
|
void |
setAddressList(int listId,
java.util.List<IpAddressListElement> list)
Set content of address list.
|
void |
setAlarmFlowState(int state)
Changes state of alarm status flow.
|
void |
setAttributeForCurrentUser(java.lang.String name,
java.lang.String value) |
void |
setAuthType(int authType) |
void |
setCertificate(java.security.cert.Certificate certificate,
java.security.Signature signature)
Set certificate and signature to use in the authentication process.
|
void |
setClientAddress(java.lang.String clientAddress) |
void |
setClientType(int clientType)
Set client type.
|
void |
setCommandTimeout(int commandTimeout) |
void |
setConnClientInfo(java.lang.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,
java.util.Map<java.lang.String,java.lang.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,
java.lang.String name)
Change object's name (wrapper for modifyObject())
|
void |
setPassword(java.lang.String password)
Set the password to use in the authentication process.
|
void |
setRecvBufferSize(int recvBufferSize) |
void |
setReportDefinition(long objectId,
java.io.File file)
Change report's definition (wrapper for modifyObject())
|
void |
setReportDefinition(long objectId,
java.lang.String definition)
Change report's definition (wrapper for modifyObject())
|
void |
setServerConfigClob(java.lang.String name,
java.lang.String value)
Set server config CLOB
|
void |
setServerVariable(java.lang.String name,
java.lang.String value) |
void |
setUserPassword(long id,
java.lang.String newPassword,
java.lang.String oldPassword) |
void |
snmpWalk(long nodeId,
java.lang.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.
|
TransformationTestResult |
testTransformationScript(long nodeId,
java.lang.String script,
java.lang.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 |
unlockPackageDatabase()
Unlock package database
|
void |
unlockUserDatabase() |
void |
unsubscribe(int channels)
Unsubscribe from notification channel(s)
|
void |
updateAgentConfig(long nodeId,
java.lang.String config,
boolean apply)
Update agent's master configuration file.
|
void |
updateAlarmNote(long alarmId,
long noteId,
java.lang.String text)
Create or update alarm's note (comment).
|
void |
updateCertificate(long id,
java.lang.String comment)
Update certificate
|
int |
updateMappingTable(MappingTable table) |
void |
updateObjectComments(long objectId,
java.lang.String comments)
Change object's comments.
|
void |
updateSnmpCommunities(java.util.List<java.lang.String> list)
Update list of well-known SNMP community strings on server.
|
void |
updateSnmpUsmCredentials(java.util.List<SnmpUsmCredential> list)
Update list of well-known SNMP USM credentials on server.
|
long |
uploadFileToAgent(long nodeId,
java.lang.String serverFileName,
java.lang.String remoteFileName,
boolean jobOnHold)
Start file upload from server's file store to agent.
|
void |
uploadFileToServer(java.io.File localFile,
java.lang.String serverFileName,
ProgressListener listener)
Upload local file to server's file store
|
java.io.File |
waitForFile(long id,
int timeout)
Wait for specific file to arrive
|
java.lang.String |
waitForFileTail(java.lang.String fileName,
int timeout)
Wait for specific file tail to arrive
|
NXCPMessage |
waitForMessage(int code,
long id) |
NXCPMessage |
waitForMessage(int code,
long id,
int timeout) |
NXCPMessage |
waitForRCC(long id) |
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(java.lang.String connAddress,
int connPort,
java.lang.String connLoginName)
connAddress - connPort - connLoginName - public NXCSession(java.lang.String connAddress,
java.lang.String connLoginName,
java.lang.String connPassword)
connAddress - connLoginName - connPassword - public NXCSession(java.lang.String connAddress,
int connPort,
java.lang.String connLoginName,
java.lang.String connPassword)
connAddress - connPort - connLoginName - connPassword - public NXCSession(java.lang.String connAddress,
int connPort,
java.lang.String connLoginName,
java.lang.String connPassword,
boolean connUseEncryption)
connAddress - connPort - connLoginName - connPassword - connUseEncryption - protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwableprotected AbstractObject createCustomObjectFromMessage(int objectClass, NXCPMessage msg)
objectClass - NetXMS object class IDmsg - Source NXCP messagepublic int getAuthType()
public void setAuthType(int authType)
authType - the authType to setpublic void addListener(SessionListener listener)
addListener in interface Sessionpublic void removeListener(SessionListener listener)
removeListener in interface Sessionpublic void addConsoleListener(ServerConsoleListener listener)
listener - public void removeConsoleListener(ServerConsoleListener listener)
listener - protected void sendNotification(NXCNotification n)
n - Notification objectpublic void sendMessage(NXCPMessage msg) throws java.io.IOException, NXCException
msg - Message to sentjava.io.IOException - in case of socket communication failureNXCException - in case of encryption errorprotected void sendFile(long requestId,
java.io.File file,
ProgressListener listener)
throws java.io.IOException,
NXCException
requestId - file - source file to be sentjava.io.IOExceptionNXCExceptionprotected void sendFile(long requestId,
byte[] data,
ProgressListener listener)
throws java.io.IOException,
NXCException
requestId - data - java.io.IOExceptionNXCExceptionpublic NXCPMessage waitForMessage(int code, long id, int timeout) throws NXCException
waitForMessage in interface SessionNXCExceptionpublic NXCPMessage waitForMessage(int code, long id) throws NXCException
waitForMessage in interface SessionNXCExceptionpublic NXCPMessage waitForRCC(long id) throws NXCException
waitForRCC in interface SessionNXCExceptionpublic NXCPMessage waitForRCC(long id, int timeout) throws NXCException
waitForRCC in interface SessionNXCExceptionpublic final NXCPMessage newMessage(int code)
newMessage in interface Sessionpublic java.io.File waitForFile(long id,
int timeout)
id - Message IDtimeout - Wait timeout in millisecondspublic java.lang.String waitForFileTail(java.lang.String fileName,
int timeout)
fileName - Waiting file nametimeout - Wait timeout in millisecondsprotected void executeSimpleCommand(int command)
throws java.io.IOException,
NXCException
command - Command codejava.io.IOExceptionNXCExceptionpublic Table receiveTable(long requestId, int msgCode) throws NXCException
requestId - request IDmsgCode - Message codeNXCException - if operation was timed outpublic void connect()
throws java.io.IOException,
java.net.UnknownHostException,
NetXMSClientException
connect in interface Sessionjava.io.IOExceptionjava.net.UnknownHostExceptionNetXMSClientExceptionpublic void disconnect()
disconnect in interface Sessionpublic boolean isIgnoreProtocolVersion()
public void setIgnoreProtocolVersion(boolean ignoreProtocolVersion)
ignoreProtocolVersion - public int getRecvBufferSize()
getRecvBufferSize in interface Sessionpublic void setRecvBufferSize(int recvBufferSize)
setRecvBufferSize in interface Sessionpublic java.lang.String getServerAddress()
getServerAddress in interface Sessionpublic java.lang.String getUserName()
getUserName in interface Sessionpublic java.lang.String getServerVersion()
getServerVersion in interface Sessionpublic byte[] getServerId()
getServerId in interface Sessionpublic java.lang.String getServerTimeZone()
getServerTimeZone in interface Sessionpublic long getServerTime()
public byte[] getServerChallenge()
public java.lang.String getTileServerURL()
public boolean isZoningEnabled()
public java.lang.String getConnClientInfo()
getConnClientInfo in interface Sessionpublic void setConnClientInfo(java.lang.String connClientInfo)
setConnClientInfo in interface Sessionpublic void setCommandTimeout(int commandTimeout)
setCommandTimeout in interface Sessionpublic long getUserSystemRights()
getUserSystemRights in interface Sessionpublic boolean isPasswordExpired()
isPasswordExpired in interface Sessionpublic void syncObjects()
throws java.io.IOException,
NXCException
java.io.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 java.io.IOException,
NXCException
objects - identifiers of objects need to be synchronizedsyncComments - if true, comments for objects will be synchronized as welljava.io.IOException - 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 java.io.IOException,
NXCException
objects - identifiers of objects need to be synchronizedsyncComments - if true, comments for objects will be synchronized as welloptions - sync options (see above)java.io.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 java.io.IOException,
NXCException
objects - identifiers of objects need to be synchronizedsyncComments - if true, comments for objects will be synchronized as welljava.io.IOException - 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 java.io.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)java.io.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, java.lang.Class<? extends AbstractObject> requiredClass)
id - object identifierrequiredClass - required object classpublic java.util.List<AbstractObject> findMultipleObjects(long[] idList, boolean returnUnknown)
idList - array of object identifiersreturnUnknown - if true, this method will return UnknownObject placeholders for unknown object identifierspublic java.util.List<AbstractObject> findMultipleObjects(long[] idList, java.lang.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 java.util.List<AbstractObject> findMultipleObjects(java.lang.Long[] idList, boolean returnUnknown)
idList - array of object identifiersreturnUnknown - if true, this method will return UnknownObject placeholders for unknown object identifierspublic java.util.List<AbstractObject> findMultipleObjects(java.lang.Long[] idList, java.lang.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(java.lang.String name)
name - object name to findpublic AbstractObject findObjectByNamePattern(java.lang.String pattern)
pattern - regular expression for matching object namepublic AbstractObject[] getTopLevelObjects(java.util.Set<java.lang.Integer> classFilter)
public AbstractObject[] getTopLevelObjects()
public AbstractObject[] getAllObjects()
public java.lang.String getObjectName(long objectId)
objectId - object IDpublic java.util.HashMap<java.lang.Long,Alarm> getAlarms() throws java.io.IOException, NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic Alarm getAlarm(long alarmId) throws java.io.IOException, NXCException
alarmId - alarm IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<EventInfo> getAlarmEvents(long alarmId) throws java.io.IOException, NXCException
alarmId - alarm IDjava.io.IOException - 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 java.io.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)java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void acknowledgeAlarm(long alarmId)
throws java.io.IOException,
NXCException
alarmId - Identifier of alarm to be acknowledged.java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void resolveAlarm(long alarmId)
throws java.io.IOException,
NXCException
alarmId - Identifier of alarm to be resolved.java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void terminateAlarm(long alarmId)
throws java.io.IOException,
NXCException
alarmId - Identifier of alarm to be terminated.java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deleteAlarm(long alarmId)
throws java.io.IOException,
NXCException
alarmId - Identifier of alarm to be deleted.java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void openAlarm(long alarmId,
java.lang.String reference)
throws java.io.IOException,
NXCException
alarmId - Identifier of alarm to be changed.reference - Helpdesk reference string.java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void closeAlarm(long alarmId)
throws java.io.IOException,
NXCException
alarmId - Identifier of alarm to be changed.java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<AlarmNote> getAlarmNotes(long alarmId) throws java.io.IOException, NXCException
alarmId - alarm IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deleteAlarmNote(long alarmId,
long noteId)
throws java.io.IOException,
NXCException
alarmId - alarm IDnoteId - note ID or 0 for creating new notejava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void updateAlarmNote(long alarmId,
long noteId,
java.lang.String text)
throws java.io.IOException,
NXCException
alarmId - alarm IDnoteId - note ID or 0 for creating new notetext - message textjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void setAlarmFlowState(int state)
throws java.io.IOException,
NXCException
state - state of alarm status flow - strict or not (1 or 0)java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.Map<java.lang.String,ServerVariable> getServerVariables() throws java.io.IOException, NXCException
getServerVariables in interface ServerManagerjava.io.IOExceptionNXCExceptionpublic void setServerVariable(java.lang.String name,
java.lang.String value)
throws java.io.IOException,
NXCException
setServerVariable in interface ServerManagerjava.io.IOExceptionNXCExceptionpublic void deleteServerVariable(java.lang.String name)
throws java.io.IOException,
NXCException
deleteServerVariable in interface ServerManagerjava.io.IOExceptionNXCExceptionpublic java.lang.String getServerConfigClob(java.lang.String name)
throws java.io.IOException,
NXCException
name - java.io.IOExceptionNXCExceptionpublic void setServerConfigClob(java.lang.String name,
java.lang.String value)
throws java.io.IOException,
NXCException
name - value - java.io.IOExceptionNXCExceptionpublic void subscribe(int channels)
throws java.io.IOException,
NXCException
channels - Notification channels to subscribe to. Multiple channels can be
specified by combining them with OR operation.java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void unsubscribe(int channels)
throws java.io.IOException,
NXCException
channels - Notification channels to unsubscribe from. Multiple channels can
be specified by combining them with OR operation.java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void syncUserDatabase()
throws java.io.IOException,
NXCException
syncUserDatabase in interface UserManagerjava.io.IOExceptionNXCExceptionpublic AbstractUserObject findUserDBObjectById(long id)
findUserDBObjectById in interface UserManagerpublic AbstractUserObject[] getUserDatabaseObjects()
getUserDatabaseObjects in interface UserManagerpublic long createUser(java.lang.String name)
throws java.io.IOException,
NXCException
createUser in interface UserManagerjava.io.IOExceptionNXCExceptionpublic long createUserGroup(java.lang.String name)
throws java.io.IOException,
NXCException
createUserGroup in interface UserManagerjava.io.IOExceptionNXCExceptionpublic void deleteUserDBObject(long id)
throws java.io.IOException,
NXCException
deleteUserDBObject in interface UserManagerjava.io.IOExceptionNXCExceptionpublic void setUserPassword(long id,
java.lang.String newPassword,
java.lang.String oldPassword)
throws java.io.IOException,
NXCException
setUserPassword in interface UserManagerjava.io.IOExceptionNXCExceptionpublic void modifyUserDBObject(AbstractUserObject object, int fields) throws java.io.IOException, NXCException
modifyUserDBObject in interface UserManagerjava.io.IOExceptionNXCExceptionpublic void modifyUserDBObject(AbstractUserObject object) throws java.io.IOException, NXCException
modifyUserDBObject in interface UserManagerjava.io.IOExceptionNXCExceptionpublic void lockUserDatabase()
throws java.io.IOException,
NXCException
lockUserDatabase in interface UserManagerjava.io.IOExceptionNXCExceptionpublic void unlockUserDatabase()
throws java.io.IOException,
NXCException
unlockUserDatabase in interface UserManagerjava.io.IOExceptionNXCExceptionpublic void setAttributeForCurrentUser(java.lang.String name,
java.lang.String value)
throws java.io.IOException,
NXCException
setAttributeForCurrentUser in interface Sessionjava.io.IOExceptionNXCExceptionpublic java.lang.String getAttributeForCurrentUser(java.lang.String name)
throws java.io.IOException,
NXCException
getAttributeForCurrentUser in interface Sessionjava.io.IOExceptionNXCExceptionpublic DciValue[] getLastValues(long nodeId, boolean objectTooltipOnly) throws java.io.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 returnedjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic DciValue[] getLastValues(long nodeId) throws java.io.IOException, NXCException
nodeId - ID of the node to get DCI values forjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic Table getTableLastValues(long nodeId, long dciId) throws java.io.IOException, NXCException
nodeId - ID of the node to get DCI values fordciId - DCI IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic PerfTabDci[] getPerfTabItems(long nodeId) throws java.io.IOException, NXCException
nodeId - Node object IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<ThresholdViolationSummary> getThresholdSummary(long objectId) throws java.io.IOException, NXCException
objectId - parent object IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic DciData getCollectedData(long nodeId, long dciId, java.util.Date from, java.util.Date to, int maxRows) throws java.io.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 limitjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic DciData getCollectedTableData(long nodeId, long dciId, java.lang.String instance, java.lang.String dataColumn, java.util.Date from, java.util.Date to, int maxRows) throws java.io.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 limitjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void clearCollectedData(long nodeId,
long dciId)
throws java.io.IOException,
NXCException
nodeId - Node object IDdciId - DCI IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic Threshold[] getThresholds(long nodeId, long dciId) throws java.io.IOException, NXCException
nodeId - Node object IDdciId - DCI IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.lang.String[] resolveDciNames(long[] nodeIds,
long[] dciIds)
throws java.io.IOException,
NXCException
nodeIds - node identifiersdciIds - DCI identifiers (length must match length of node identifiers list)java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.lang.String[] resolveDciNames(java.util.Collection<ConditionDciInfo> dciList) throws java.io.IOException, NXCException
dciList - DCI listjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.lang.String queryParameter(long nodeId,
int origin,
java.lang.String name)
throws java.io.IOException,
NXCException
nodeId - node object IDorigin - parameter's origin (NetXMS agent, SNMP, etc.)name - parameter's namejava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic Table queryAgentTable(long nodeId, java.lang.String name) throws java.io.IOException, NXCException
nodeId - node object IDname - table's namejava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outprotected void createCustomObject(NXCObjectCreationData data, java.lang.Object userData, 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, java.lang.Object userData) throws java.io.IOException, NXCException
data - Object creation datauserData - User-defined data for custom object creationjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic long createObject(NXCObjectCreationData data) throws java.io.IOException, NXCException
data - Object creation datajava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deleteObject(long objectId)
throws java.io.IOException,
NXCException
objectId - ID of an object which should be deletedjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outprotected void modifyCustomObject(NXCObjectModificationData data, java.lang.Object userData, 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, java.lang.Object userData) throws java.io.IOException, NXCException
data - Object modification datauserData - user-defined data for custom object modificationjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void modifyObject(NXCObjectModificationData data) throws java.io.IOException, NXCException
data - Object modification datajava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void setObjectName(long objectId,
java.lang.String name)
throws java.io.IOException,
NXCException
objectId - ID of object to be changedname - New object's namejava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void setObjectCustomAttributes(long objectId,
java.util.Map<java.lang.String,java.lang.String> attrList)
throws java.io.IOException,
NXCException
java.io.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 java.io.IOException,
NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void setReportDefinition(long objectId,
java.lang.String definition)
throws java.io.IOException,
NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void setReportDefinition(long objectId,
java.io.File file)
throws java.io.FileNotFoundException,
java.io.IOException,
NXCException
java.io.FileNotFoundException - if given file does not exist or is inaccessiblejava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void changeObjectZone(long objectId,
long zoneId)
throws java.io.IOException,
NXCException
objectId - Node or cluster object IDzoneId - java.io.IOExceptionNXCExceptionpublic void updateObjectComments(long objectId,
java.lang.String comments)
throws java.io.IOException,
NXCException
objectId - Object's IDcomments - New commentsjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void setObjectManaged(long objectId,
boolean isManaged)
throws java.io.IOException,
NXCException
objectId - object's identifierisManaged - object's managed statusjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic int getEffectiveRights(long objectId)
throws java.io.IOException,
NXCException
objectId - java.io.IOExceptionNXCExceptionpublic void bindObject(long parentId,
long childId)
throws java.io.IOException,
NXCException
parentId - parent object's identifierchildId - Child object's identifierjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void unbindObject(long parentId,
long childId)
throws java.io.IOException,
NXCException
parentId - parent object's identifierchildId - Child object's identifierjava.io.IOException - 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 java.io.IOException,
NXCException
templateId - template object identifiernodeId - node object identifierremoveDci - true if DCIs created from this template should be removedjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void applyTemplate(long templateId,
long nodeId)
throws java.io.IOException,
NXCException
templateId - template object IDnodeId - node object IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void addClusterNode(long clusterId,
long nodeId)
throws java.io.IOException,
NXCException
clusterId - cluster object IDnodeId - node object IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void removeClusterNode(long clusterId,
long nodeId)
throws java.io.IOException,
NXCException
clusterId - cluster object IDnodeId - node object IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic NetworkMapPage queryLayer2Topology(long nodeId) throws java.io.IOException, NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void executeAction(long nodeId,
java.lang.String action)
throws java.io.IOException,
NXCException
nodeId - Node object IDaction - Action namejava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void wakeupNode(long objectId)
throws java.io.IOException,
NXCException
objectId - node or interface IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic PhysicalComponent getNodePhysicalComponents(long nodeId) throws java.io.IOException, NXCException
nodeId - node object identifierjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<WinPerfObject> getNodeWinPerfObjects(long nodeId) throws java.io.IOException, NXCException
nodeId - node object IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<SoftwarePackage> getNodeSoftwarePackages(long nodeId) throws java.io.IOException, NXCException
nodeId - node object identifierjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic ServerJob[] getServerJobList() throws java.io.IOException, NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void cancelServerJob(long jobId)
throws java.io.IOException,
NXCException
jobId - Job IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void holdServerJob(long jobId)
throws java.io.IOException,
NXCException
jobId - Job IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void unholdServerJob(long jobId)
throws java.io.IOException,
NXCException
jobId - Job IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deployAgentPolicy(long policyId,
long nodeId)
throws java.io.IOException,
NXCException
policyId - Policy object IDnodeId - Node object IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void uninstallAgentPolicy(long policyId,
long nodeId)
throws java.io.IOException,
NXCException
policyId - Policy object IDnodeId - Node object IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic EventProcessingPolicy getEventProcessingPolicy() throws java.io.IOException, NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic EventProcessingPolicy openEventProcessingPolicy() throws java.io.IOException, NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void saveEventProcessingPolicy(EventProcessingPolicy epp) throws java.io.IOException, NXCException
epp - Modified event processing policyjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void closeEventProcessingPolicy()
throws java.io.IOException,
NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic DataCollectionConfiguration openDataCollectionConfiguration(long nodeId) throws java.io.IOException, NXCException
nodeId - Node object identifierjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic TransformationTestResult testTransformationScript(long nodeId, java.lang.String script, java.lang.String inputValue) throws java.io.IOException, NXCException
nodeId - ID of the node object to test script onscript - script source codeinputValue - input value for the scriptjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic Log openServerLog(java.lang.String logName) throws java.io.IOException, NXCException
logName - Log namejava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void syncEventTemplates()
throws java.io.IOException,
NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic EventTemplate[] getCachedEventTemplates()
public EventTemplate findEventTemplateByName(java.lang.String name)
name - Event namepublic EventTemplate findEventTemplateByCode(long code)
code - Event codepublic java.util.List<EventTemplate> findMultipleEventTemplates(java.lang.Long[] codes)
codes - List of event codespublic java.util.List<EventTemplate> findMultipleEventTemplates(long[] codes)
codes - List of event codespublic java.util.List<EventTemplate> getEventTemplates() throws java.io.IOException, NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic long generateEventCode()
throws java.io.IOException,
NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deleteEventTemplate(long eventCode)
throws java.io.IOException,
NXCException
eventCode - Event codejava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void modifyEventTemplate(EventTemplate evt) throws java.io.IOException, NXCException
evt - Event templatejava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void sendEvent(long eventCode,
java.lang.String eventName,
long objectId,
java.lang.String[] parameters,
java.lang.String userTag)
throws java.io.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 tagjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void sendEvent(long eventCode,
java.lang.String[] parameters)
throws java.io.IOException,
NXCException
eventCode - event codeparameters - event's parametersjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void sendEvent(java.lang.String eventName,
java.lang.String[] parameters)
throws java.io.IOException,
NXCException
eventName - event nameparameters - event's parametersjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<java.lang.String> getSnmpCommunities()
throws java.io.IOException,
NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void updateSnmpCommunities(java.util.List<java.lang.String> list)
throws java.io.IOException,
NXCException
list - New list of SNMP community stringsjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<SnmpUsmCredential> getSnmpUsmCredentials() throws java.io.IOException, NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void updateSnmpUsmCredentials(java.util.List<SnmpUsmCredential> list) throws java.io.IOException, NXCException
list - New list of SNMP USM credentialsjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.lang.String getAgentConfig(long nodeId)
throws java.io.IOException,
NXCException
nodeId - Node IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void updateAgentConfig(long nodeId,
java.lang.String config,
boolean apply)
throws java.io.IOException,
NXCException
nodeId - Node IDconfig - New configuration file contentapply - Apply flag - if set to true, agent will restart automatically to
apply changesjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<AgentParameter> getSupportedParameters(long nodeId) throws java.io.IOException, NXCException
nodeId - Node IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<AgentTable> getSupportedTables(long nodeId) throws java.io.IOException, NXCException
nodeId - Node IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic long[] getDataCollectionEvents(long objectId)
throws java.io.IOException,
NXCException
objectId - node, cluster, or template object IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.lang.String exportConfiguration(java.lang.String description,
long[] events,
long[] traps,
long[] templates,
java.util.UUID[] rules)
throws java.io.IOException,
NXCException
description - Description of exported configurationevents - List of event codestraps - List of trap identifierstemplates - List of template object identifiersjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void importConfiguration(java.lang.String config,
int flags)
throws java.io.IOException,
NXCException
config - Configuration in XML formatflags - Import flagsjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.Map<java.lang.String,java.lang.Object> getServerStats()
throws java.io.IOException,
NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<ServerAction> getActions() throws java.io.IOException, NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic long createAction(java.lang.String name)
throws java.io.IOException,
NXCException
name - action namejava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void modifyAction(ServerAction action) throws java.io.IOException, NXCException
action - Action objectjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deleteAction(long actionId)
throws java.io.IOException,
NXCException
actionId - Action IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<AuthCertificate> getCertificateList() throws java.io.IOException, NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void createNewCertificate(byte[] data,
java.lang.String comments)
throws java.io.IOException,
NXCException
data - certificate file contentcomments - comment for certificatejava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deleteCertificate(long id)
throws java.io.IOException,
NXCException
id - the certificate idjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void updateCertificate(long id,
java.lang.String comment)
throws java.io.IOException,
NXCException
id - the certificate idcomment - the certificate commentjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<ObjectTool> getObjectTools() throws java.io.IOException, NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic ObjectToolDetails getObjectToolDetails(long toolId) throws java.io.IOException, NXCException
toolId - Tool IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic long generateObjectToolId()
throws java.io.IOException,
NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void modifyObjectTool(ObjectToolDetails tool) throws java.io.IOException, NXCException
tool - Object tooljava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deleteObjectTool(long toolId)
throws java.io.IOException,
NXCException
toolId - Object tool IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void changeObjecToolDisableStatuss(long toolId,
boolean enable)
throws java.io.IOException,
NXCException
toolId - Object tool IDenable - true if object tool should be enabled, false if disabledjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic Table executeTableTool(long toolId, long nodeId) throws java.io.IOException, NXCException
toolId - Tool IDnodeId - Node object IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void executeServerCommand(long objectId,
java.lang.String command)
throws java.io.IOException,
NXCException
objectId - object IDcommand - commandjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<SnmpTrap> getSnmpTrapsConfigurationSummary() throws java.io.IOException, NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<SnmpTrap> getSnmpTrapsConfiguration() throws java.io.IOException, NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic long createSnmpTrapConfiguration()
throws java.io.IOException,
NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deleteSnmpTrapConfiguration(long trapId)
throws java.io.IOException,
NXCException
trapId - Trap configuration record IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void modifySnmpTrapConfiguration(SnmpTrap trap) throws java.io.IOException, NXCException
trap - Modified trap configuration recordjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.Date getMibFileTimestamp()
throws java.io.IOException,
NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.io.File downloadMibFile()
throws java.io.IOException,
NXCException
java.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<GraphSettings> getPredefinedGraphs() throws java.io.IOException, NXCException
java.io.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 java.io.IOException, NXCException
graph - predefined graph configurationoverwrite - defines if existing graph should be overwrittenjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deletePredefinedGraph(long graphId)
throws java.io.IOException,
NXCException
graphId - predefined graph object IDjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<Script> getScriptLibrary() throws java.io.IOException, NXCException
getScriptLibrary in interface ScriptLibraryManagerjava.io.IOExceptionNXCExceptionpublic Script getScript(long scriptId) throws java.io.IOException, NXCException
getScript in interface ScriptLibraryManagerjava.io.IOExceptionNXCExceptionpublic long modifyScript(long scriptId,
java.lang.String name,
java.lang.String source)
throws java.io.IOException,
NXCException
modifyScript in interface ScriptLibraryManagerjava.io.IOExceptionNXCExceptionpublic void renameScript(long scriptId,
java.lang.String name)
throws java.io.IOException,
NXCException
renameScript in interface ScriptLibraryManagerjava.io.IOExceptionNXCExceptionpublic void deleteScript(long scriptId)
throws java.io.IOException,
NXCException
deleteScript in interface ScriptLibraryManagerjava.io.IOExceptionNXCExceptionpublic boolean isConnected()
isConnected in interface Sessionpublic boolean isEncrypted()
isEncrypted in interface Sessionpublic ConnectionPoint findConnectionPoint(long objectId) throws java.io.IOException, NXCException
objectId - Node or interface object IDjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic ConnectionPoint findConnectionPoint(MacAddress macAddr) throws java.io.IOException, NXCException
macAddr - MAC addressjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic ConnectionPoint findConnectionPoint(int zoneId, java.net.InetAddress ipAddr) throws java.io.IOException, NXCException
zoneId - zone IDipAddr - IP address to findjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic boolean checkConnection()
checkConnection in interface Sessionpublic java.util.List<LibraryImage> getImageLibrary() throws java.io.IOException, NXCException
getImageLibrary in interface ImageLibraryManagerjava.io.IOExceptionNXCExceptionpublic java.util.List<LibraryImage> getImageLibrary(java.lang.String category) throws java.io.IOException, NXCException
getImageLibrary in interface ImageLibraryManagerjava.io.IOExceptionNXCExceptionpublic LibraryImage getImage(java.util.UUID guid) throws java.io.IOException, NXCException
getImage in interface ImageLibraryManagerjava.io.IOExceptionNXCExceptionpublic LibraryImage createImage(LibraryImage image, ProgressListener listener) throws java.io.IOException, NXCException
createImage in interface ImageLibraryManagerjava.io.IOExceptionNXCExceptionpublic void deleteImage(LibraryImage image) throws java.io.IOException, NXCException
deleteImage in interface ImageLibraryManagerjava.io.IOExceptionNXCExceptionpublic void modifyImage(LibraryImage image, ProgressListener listener) throws java.io.IOException, NXCException
modifyImage in interface ImageLibraryManagerjava.io.IOExceptionNXCExceptionpublic void pollNode(long nodeId,
int pollType,
NodePollListener listener)
throws java.io.IOException,
NXCException
nodeId - node object IDpollType - poll type (defined in org.netxms.client.constants.NodePoller)listener - listenerjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<Situation> getSituations() throws java.io.IOException, NXCException
java.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic long createSituation(java.lang.String name,
java.lang.String comments)
throws java.io.IOException,
NXCException
name - name for new situation objectcomments - comments for new situation objectjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void modifySituation(long id,
java.lang.String name,
java.lang.String comments)
throws java.io.IOException,
NXCException
id - situation idname - new name or null to leave unchangedcomments - new comments or null to leave unchangedjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deleteSituation(long id)
throws java.io.IOException,
NXCException
id - situation idjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deleteSituationInstance(long id,
java.lang.String instance)
throws java.io.IOException,
NXCException
id - situation idinstance - situation instancejava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic ServerFile[] listServerFiles() throws java.io.IOException, NXCException
java.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic ServerFile[] listServerFiles(java.lang.String[] filter) throws java.io.IOException, NXCException
filter - array with required extension. Will be used as file filter. Give empty array or null if no filter should be
applyed.java.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic long uploadFileToAgent(long nodeId,
java.lang.String serverFileName,
java.lang.String remoteFileName,
boolean jobOnHold)
throws java.io.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" statusjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void uploadFileToServer(java.io.File localFile,
java.lang.String serverFileName,
ProgressListener listener)
throws java.io.IOException,
NXCException
localFile - local fileserverFileName - name under which file will be stored on serverjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic AgentFile downloadFileFromAgent(long nodeId, java.lang.String remoteFileName, long maxFileSize, boolean follow) throws java.io.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)java.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.io.File downloadFileFromServer(java.lang.String remoteFileName)
throws java.io.IOException,
NXCException
remoteFileName - fully qualified file name on remote systemjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void cancelFileMonitoring(long nodeId,
java.lang.String remoteFileName)
throws java.io.IOException,
NXCException
nodeId - node object IDremoteFileName - fully qualified file name on remote systemjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deleteServerFile(java.lang.String serverFileName)
throws java.io.IOException,
NXCException
serverFileName - name of server filejava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void openConsole()
throws java.io.IOException,
NXCException
java.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void closeConsole()
throws java.io.IOException,
NXCException
java.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic boolean processConsoleCommand(java.lang.String command)
throws java.io.IOException,
NXCException
command - command to processjava.io.IOException - 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,
java.lang.String rootOid,
SnmpWalkListener listener)
throws java.io.IOException,
NXCException
nodeId - node object IDrootOid - root SNMP object ID (as text)listener - listenerjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<VlanInfo> getVlans(long nodeId) throws java.io.IOException, NXCException
nodeId - node object IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic boolean isObjectsSynchronized()
public long executeReport(long reportId,
java.util.Map<java.lang.String,java.lang.String> parameters)
throws java.io.IOException,
NXCException
reportId - report object IDparameters - report parametersjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deleteReportResults(long reportId,
java.util.Collection<java.lang.Long> resultIdList)
throws java.io.IOException,
NXCException
reportId - report object IDresultIdList - result identifiers to be deletedjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<IpAddressListElement> getAddressList(int listId) throws java.io.IOException, NXCException
list - list identifier (defined in NXCSession as ADDRESS_LIST_xxx)java.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void setAddressList(int listId,
java.util.List<IpAddressListElement> list)
throws java.io.IOException,
NXCException
listId - list IDlist - new list contentjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void resetServerComponent(int component)
throws java.io.IOException,
NXCException
component - component idjava.io.IOException - 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 java.io.IOException, NXCException
node1 - source nodenode2 - destination nodejava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<WirelessStation> getWirelessStations(long nodeId) throws java.io.IOException, NXCException
nodeId - controller node IDjava.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void removePackage(long packageId)
throws java.io.IOException,
NXCException
packageId - java.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic long installPackage(PackageInfo info, java.io.File pkgFile, ProgressListener listener) throws java.io.IOException, NXCException
info - package informationpkgFile - package filelistener - progress listener (may be null)java.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic java.util.List<PackageInfo> getInstalledPackages() throws java.io.IOException, NXCException
java.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void deployPackage(long packageId,
java.lang.Long[] nodeList,
PackageDeploymentListener listener)
throws java.io.IOException,
NXCException
packageId - package IDnodeList - list of nodeslistener - deployment progress listener (may be null)java.io.IOException - if socket or file I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void lockPackageDatabase()
throws java.io.IOException,
NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void unlockPackageDatabase()
throws java.io.IOException,
NXCException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void sendSMS(java.lang.String phoneNumber,
java.lang.String message)
throws java.io.IOException,
NXCException
phoneNumber - target phone numbermessage - message textjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void pushDciData(DciPushData[] data) throws java.io.IOException, NXCException
data - push datajava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void pushDciData(long nodeId,
long dciId,
java.lang.String value)
throws java.io.IOException,
NXCException
nodeId - node IDdciId - DCI IDvalue - value to pushjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outpublic void pushDciData(java.lang.String nodeName,
java.lang.String dciName,
java.lang.String value)
throws java.io.IOException,
NXCException
nodeName - node namedciName - DCI namevalue - value to pushjava.io.IOException - 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 java.lang.String getDateFormat()
getDateFormat in interface Sessionpublic java.lang.String getTimeFormat()
getTimeFormat in interface Sessionpublic java.lang.String getShortTimeFormat()
public void handover(NXCSession target)
target - target session objectpublic int getSessionId()
public java.util.List<MappingTableDescriptor> listMappingTables() throws java.io.IOException, NetXMSClientException
listMappingTables in interface Sessionjava.io.IOExceptionNetXMSClientExceptionpublic MappingTable getMappingTable(int id) throws java.io.IOException, NetXMSClientException
getMappingTable in interface Sessionjava.io.IOExceptionNetXMSClientExceptionpublic int createMappingTable(java.lang.String name,
java.lang.String description,
int flags)
throws java.io.IOException,
NetXMSClientException
createMappingTable in interface Sessionjava.io.IOExceptionNetXMSClientExceptionpublic int updateMappingTable(MappingTable table) throws java.io.IOException, NetXMSClientException
updateMappingTable in interface Sessionjava.io.IOExceptionNetXMSClientExceptionpublic void deleteMappingTable(int id)
throws java.io.IOException,
NetXMSClientException
deleteMappingTable in interface Sessionjava.io.IOExceptionNetXMSClientExceptionpublic final int getDefaultDciRetentionTime()
public final int getDefaultDciPollingInterval()
public final boolean isStrictAlarmStatusFlow()
public boolean isTimedAlarmAckEnabled()
public java.util.List<DciSummaryTableDescriptor> listDciSummaryTables() throws java.io.IOException, NetXMSClientException
java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outNetXMSClientExceptionpublic DciSummaryTable getDciSummaryTable(int id) throws java.io.IOException, NetXMSClientException
id - DCI summary table ID.java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outNetXMSClientExceptionpublic int modifyDciSummaryTable(DciSummaryTable table) throws java.io.IOException, NetXMSClientException
table - DCI summary table configurationjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outNetXMSClientExceptionpublic void deleteDciSummaryTable(int id)
throws java.io.IOException,
NetXMSClientException
id - java.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outNetXMSClientExceptionpublic Table queryDciSummaryTable(int tableId, long baseObjectId) throws java.io.IOException, NetXMSClientException
tableId - DCI summary table IDbaseObjectId - base container object IDjava.io.IOException - if socket I/O error occursNXCException - if NetXMS server returns an error or operation was timed outNetXMSClientExceptionpublic java.util.List<java.util.UUID> listReports()
throws NXCException,
java.io.IOException
listReports in interface ReportingServerManagerNXCExceptionjava.io.IOExceptionpublic ReportDefinition getReportDefinition(java.util.UUID reportId) throws NetXMSClientException, java.io.IOException
getReportDefinition in interface ReportingServerManagerNetXMSClientExceptionjava.io.IOExceptionpublic java.util.UUID executeReport(java.util.UUID reportId,
java.util.Map<java.lang.String,java.lang.String> parameters)
throws NetXMSClientException,
java.io.IOException
executeReport in interface ReportingServerManagerNetXMSClientExceptionjava.io.IOExceptionpublic java.util.List<ReportResult> listReportResults(java.util.UUID reportId) throws NetXMSClientException, java.io.IOException
listReportResults in interface ReportingServerManagerNetXMSClientExceptionjava.io.IOExceptionpublic void deleteReportResult(java.util.UUID reportId,
java.util.UUID jobId)
throws NetXMSClientException,
java.io.IOException
deleteReportResult in interface ReportingServerManagerNetXMSClientExceptionjava.io.IOExceptionpublic java.io.File renderReport(java.util.UUID reportId,
java.util.UUID jobId,
ReportRenderFormat format)
throws NetXMSClientException,
java.io.IOException
renderReport in interface ReportingServerManagerNetXMSClientExceptionjava.io.IOExceptionpublic void scheduleReport(java.util.UUID reportId,
java.util.Date startTime,
int daysOfWeek,
int daysOfMonth,
java.util.Map<java.lang.String,java.lang.String> parameters)
throws NetXMSClientException,
java.io.IOException
scheduleReport in interface ReportingServerManagerNetXMSClientExceptionjava.io.IOExceptionpublic java.util.List<ReportingJob> listScheduledJobs()
listScheduledJobs in interface ReportingServerManagerpublic void setClientAddress(java.lang.String clientAddress)
clientAddress - the clientAddress to setpublic void setPassword(java.lang.String password)
password - password string to usepublic void setCertificate(java.security.cert.Certificate certificate,
java.security.Signature signature)
signature - signature to usepublic long[] getSubnetAddressMap(long subnetId)
throws NXCException,
java.io.IOException
subnetId - NXCExceptionjava.io.IOExceptionCopyright © 2014. All Rights Reserved.