|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netxms.client.NXCSession
public class NXCSession
Communication session with NetXMS server.
Field Summary | |
---|---|
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 |
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
|
Fields inherited from interface org.netxms.api.client.users.UserManager |
---|
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_LOGIN_NAME, USER_MODIFY_MEMBERS, USER_MODIFY_PASSWD_LENGTH, USER_MODIFY_TEMP_DISABLE |
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
void |
acknowledgeAlarm(long alarmId)
Acknowledge alarm. |
void |
acknowledgeAlarm(long alarmId,
boolean sticky)
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 |
cancelServerJob(long jobId)
Cancel server job |
void |
changeObjectZone(long objectId,
long zoneId)
Move object to different zone. |
void |
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. |
LibraryImage |
createImage(LibraryImage image,
ProgressListener listener)
|
long |
createObject(NXCObjectCreationData data)
Create 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 |
deleteEventTemplate(long eventCode)
Delete event template. |
void |
deleteImage(LibraryImage image)
|
void |
deleteObject(long objectId)
Delete object |
void |
deleteObjectTool(long toolId)
Delete object tool. |
void |
deletePredefinedGraph(long graphId)
Delete predefined graph. |
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()
|
java.io.File |
downloadFileFromAgent(long nodeId,
java.lang.String remoteFileName)
Download file from remote host via agent. |
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. |
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)
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. |
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<GenericObject> |
findMultipleObjects(long[] idList,
boolean returnUnknown)
Find multiple NetXMS objects by identifiers |
java.util.List<GenericObject> |
findMultipleObjects(java.lang.Long[] idList,
boolean returnUnknown)
Find multiple NetXMS objects by identifiers |
java.util.List<GenericObject> |
findMultipleObjects(long[] idList,
java.lang.Class<? extends GenericObject> classFilter,
boolean returnUnknown)
Find multiple NetXMS objects by identifiers |
java.util.List<GenericObject> |
findMultipleObjects(java.lang.Long[] idList,
java.lang.Class<? extends GenericObject> classFilter,
boolean returnUnknown)
Find multiple NetXMS objects by identifiers |
GenericObject |
findObjectById(long id)
Find NetXMS object by it's identifier. |
GenericObject |
findObjectById(long id,
java.lang.Class<? extends GenericObject> requiredClass)
Find NetXMS object by it's identifier with additional class checking. |
GenericObject |
findObjectByName(java.lang.String name)
Find object by name. |
GenericObject |
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<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. |
GenericObject[] |
getAllObjects()
Get list of all objects |
java.lang.String |
getAttributeForCurrentUser(java.lang.String name)
|
EventTemplate[] |
getCachedEventTemplates()
Get cached list event templates |
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 obejct. |
java.lang.String |
getDateFormat()
|
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 |
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.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()
|
java.util.List<ReportResult> |
getReportResults(long reportId)
Get list of report execution results. |
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()
|
NXCServerJob[] |
getServerJobList()
Get list of server jobs |
java.util.Map<java.lang.String,java.lang.Object> |
getServerStats()
Get server stats. |
java.lang.String |
getServerTimeZone()
|
java.util.Map<java.lang.String,ServerVariable> |
getServerVariables()
|
java.lang.String |
getServerVersion()
|
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. |
java.util.List<AgentParameter> |
getSupportedParameters(long nodeId)
Get list of parameters 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()
|
GenericObject[] |
getTopLevelObjects()
Get list of top-level objects. |
GenericObject[] |
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()
|
int |
getUserSystemRights()
|
java.util.List<VlanInfo> |
getVlans(long nodeId)
Get list of VLANs configured on given node |
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 |
isObjectsSynchronized()
|
boolean |
isPasswordExpired()
|
boolean |
isServerConsoleConnected()
|
boolean |
isZoningEnabled()
|
ServerFile[] |
listServerFiles()
List files in server's file store. |
void |
lockPackageDatabase()
Lock package database |
void |
lockUserDatabase()
|
void |
modifyAction(ServerAction action)
Modify server action |
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 |
modifyObjectTool(ObjectToolDetails tool)
Modify object tool. |
long |
modifyPredefinedGraph(GraphSettings graph)
Create or modify predefined graph. |
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. |
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(long jobId,
ReportRenderFormat format)
Render report into desired 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. |
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 |
setAttributeForCurrentUser(java.lang.String name,
java.lang.String value)
|
void |
setClientType(int clientType)
Set client type. |
void |
setCommandTimeout(int commandTimeout)
|
void |
setConnClientInfo(java.lang.String connClientInfo)
|
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 |
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. |
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 |
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 |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 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
Constructor Detail |
---|
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
- Method Detail |
---|
protected void finalize()
finalize
in class java.lang.Object
public void addListener(SessionListener listener)
addListener
in interface Session
public void removeListener(SessionListener listener)
removeListener
in interface Session
public 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 sent
java.io.IOException
- in case of socket communication failure
NXCException
- 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 sent
java.io.IOException
NXCException
protected void sendFile(long requestId, byte[] data, ProgressListener listener) throws java.io.IOException, NXCException
requestId
- data
-
java.io.IOException
NXCException
public NXCPMessage waitForMessage(int code, long id, int timeout) throws NXCException
waitForMessage
in interface Session
NXCException
public NXCPMessage waitForMessage(int code, long id) throws NXCException
waitForMessage
in interface Session
NXCException
public NXCPMessage waitForRCC(long id) throws NXCException
waitForRCC
in interface Session
NXCException
public NXCPMessage waitForRCC(long id, int timeout) throws NXCException
waitForRCC
in interface Session
NXCException
public final NXCPMessage newMessage(int code)
newMessage
in interface Session
public java.io.File waitForFile(long id, int timeout)
id
- Message IDtimeout
- Wait timeout in milliseconds
protected void executeSimpleCommand(int command) throws java.io.IOException, NXCException
command
- Command code
java.io.IOException
NXCException
public Table receiveTable(long requestId, int msgCode) throws NXCException
requestId
- request IDmsgCode
- Message code
NXCException
- if operation was timed outpublic void connect() throws java.io.IOException, java.net.UnknownHostException, NetXMSClientException
connect
in interface Session
java.io.IOException
java.net.UnknownHostException
NetXMSClientException
public void disconnect()
disconnect
in interface Session
public int getRecvBufferSize()
getRecvBufferSize
in interface Session
public void setRecvBufferSize(int recvBufferSize)
setRecvBufferSize
in interface Session
public java.lang.String getServerAddress()
getServerAddress
in interface Session
public java.lang.String getUserName()
getUserName
in interface Session
public java.lang.String getServerVersion()
getServerVersion
in interface Session
public byte[] getServerId()
getServerId
in interface Session
public java.lang.String getServerTimeZone()
getServerTimeZone
in interface Session
public byte[] getServerChallenge()
public java.lang.String getTileServerURL()
public boolean isZoningEnabled()
public java.lang.String getConnClientInfo()
getConnClientInfo
in interface Session
public void setConnClientInfo(java.lang.String connClientInfo)
setConnClientInfo
in interface Session
public void setCommandTimeout(int commandTimeout)
setCommandTimeout
in interface Session
public int getUserId()
getUserId
in interface Session
public int getUserSystemRights()
getUserSystemRights
in interface Session
public boolean isPasswordExpired()
isPasswordExpired
in interface Session
public void syncObjects() throws java.io.IOException, NXCException
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 well
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- 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 well
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic GenericObject findObjectById(long id)
id
- Object identifier
public GenericObject findObjectById(long id, java.lang.Class<? extends GenericObject> requiredClass)
id
- object identifierrequiredClass
- required object class
public java.util.List<GenericObject> findMultipleObjects(long[] idList, boolean returnUnknown)
idList
- array of object identifiersreturnUnknown
- if true, this method will return UnknownObject placeholders for unknown object identifiers
public java.util.List<GenericObject> findMultipleObjects(long[] idList, java.lang.Class<? extends GenericObject> 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 identifiers
public java.util.List<GenericObject> findMultipleObjects(java.lang.Long[] idList, boolean returnUnknown)
idList
- array of object identifiersreturnUnknown
- if true, this method will return UnknownObject placeholders for unknown object identifiers
public java.util.List<GenericObject> findMultipleObjects(java.lang.Long[] idList, java.lang.Class<? extends GenericObject> 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 identifiers
public GenericObject findObjectByName(java.lang.String name)
name
- object name to find
public GenericObject findObjectByNamePattern(java.lang.String pattern)
pattern
- regular expression for matching object name
public GenericObject[] getTopLevelObjects(java.util.Set<java.lang.Integer> classFilter)
public GenericObject[] getTopLevelObjects()
public GenericObject[] getAllObjects()
public java.lang.String getObjectName(long objectId)
objectId
- object ID
public java.util.HashMap<java.lang.Long,Alarm> getAlarms() throws java.io.IOException, NXCException
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic Alarm getAlarm(long alarmId) throws java.io.IOException, NXCException
alarmId
- alarm ID
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void acknowledgeAlarm(long alarmId, boolean sticky) 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)
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 text
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 ServerManager
java.io.IOException
NXCException
public void setServerVariable(java.lang.String name, java.lang.String value) throws java.io.IOException, NXCException
setServerVariable
in interface ServerManager
java.io.IOException
NXCException
public void deleteServerVariable(java.lang.String name) throws java.io.IOException, NXCException
deleteServerVariable
in interface ServerManager
java.io.IOException
NXCException
public java.lang.String getServerConfigClob(java.lang.String name) throws java.io.IOException, NXCException
name
-
java.io.IOException
NXCException
public void setServerConfigClob(java.lang.String name, java.lang.String value) throws java.io.IOException, NXCException
name
- value
-
java.io.IOException
NXCException
public 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 occurs
NXCException
- 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 occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void syncUserDatabase() throws java.io.IOException, NXCException
syncUserDatabase
in interface UserManager
java.io.IOException
NXCException
public AbstractUserObject findUserDBObjectById(long id)
findUserDBObjectById
in interface UserManager
public AbstractUserObject[] getUserDatabaseObjects()
getUserDatabaseObjects
in interface UserManager
public long createUser(java.lang.String name) throws java.io.IOException, NXCException
createUser
in interface UserManager
java.io.IOException
NXCException
public long createUserGroup(java.lang.String name) throws java.io.IOException, NXCException
createUserGroup
in interface UserManager
java.io.IOException
NXCException
public void deleteUserDBObject(long id) throws java.io.IOException, NXCException
deleteUserDBObject
in interface UserManager
java.io.IOException
NXCException
public void setUserPassword(long id, java.lang.String newPassword, java.lang.String oldPassword) throws java.io.IOException, NXCException
setUserPassword
in interface UserManager
java.io.IOException
NXCException
public void modifyUserDBObject(AbstractUserObject object, int fields) throws java.io.IOException, NXCException
modifyUserDBObject
in interface UserManager
java.io.IOException
NXCException
public void modifyUserDBObject(AbstractUserObject object) throws java.io.IOException, NXCException
modifyUserDBObject
in interface UserManager
java.io.IOException
NXCException
public void lockUserDatabase() throws java.io.IOException, NXCException
lockUserDatabase
in interface UserManager
java.io.IOException
NXCException
public void unlockUserDatabase() throws java.io.IOException, NXCException
unlockUserDatabase
in interface UserManager
java.io.IOException
NXCException
public void setAttributeForCurrentUser(java.lang.String name, java.lang.String value) throws java.io.IOException, NXCException
setAttributeForCurrentUser
in interface Session
java.io.IOException
NXCException
public java.lang.String getAttributeForCurrentUser(java.lang.String name) throws java.io.IOException, NXCException
getAttributeForCurrentUser
in interface Session
java.io.IOException
NXCException
public DciValue[] getLastValues(long nodeId) throws java.io.IOException, NXCException
nodeId
- ID of the node to get DCI values for
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 ID
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic PerfTabDci[] getPerfTabItems(long nodeId) throws java.io.IOException, NXCException
nodeId
- Node object ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 limit
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 limit
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- 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 list
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 name
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 name
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic long createObject(NXCObjectCreationData data) throws java.io.IOException, NXCException
data
- Object creation data
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 deleted
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void modifyObject(NXCObjectModificationData data) throws java.io.IOException, NXCException
data
- Object modification data
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 name
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 inaccessible
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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.IOException
NXCException
public void updateObjectComments(long objectId, java.lang.String comments) throws java.io.IOException, NXCException
objectId
- Object's IDcomments
- New comments
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 status
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void bindObject(long parentId, long childId) throws java.io.IOException, NXCException
parentId
- parent object's identifierchildId
- Child object's identifier
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 identifier
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 removed
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- 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 name
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void wakeupNode(long objectId) throws java.io.IOException, NXCException
objectId
- node or interface ID
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic PhysicalComponent getNodePhysicalComponents(long nodeId) throws java.io.IOException, NXCException
nodeId
- node object identifier
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic NXCServerJob[] getServerJobList() throws java.io.IOException, NXCException
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void cancelServerJob(long jobId) throws java.io.IOException, NXCException
jobId
- Job ID
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void holdServerJob(long jobId) throws java.io.IOException, NXCException
jobId
- Job ID
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void unholdServerJob(long jobId) throws java.io.IOException, NXCException
jobId
- Job ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void saveEventProcessingPolicy(EventProcessingPolicy epp) throws java.io.IOException, NXCException
epp
- Modified event processing policy
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic DataCollectionConfiguration openDataCollectionConfiguration(long nodeId) throws java.io.IOException, NXCException
nodeId
- Node object identifier
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic Log openServerLog(java.lang.String logName) throws java.io.IOException, NXCException
logName
- Log name
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic EventTemplate[] getCachedEventTemplates()
public EventTemplate findEventTemplateByCode(long code)
code
- Event code
public java.util.List<EventTemplate> findMultipleEventTemplates(java.lang.Long[] codes)
codes
- List of event codes
public java.util.List<EventTemplate> findMultipleEventTemplates(long[] codes)
codes
- List of event codes
public java.util.List<EventTemplate> getEventTemplates() throws java.io.IOException, NXCException
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteEventTemplate(long eventCode) throws java.io.IOException, NXCException
eventCode
- Event code
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void modifyEventTemplate(EventTemplate evt) throws java.io.IOException, NXCException
evt
- Event template
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 tag
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 parameters
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 parameters
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- 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 strings
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- 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 credentials
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic java.lang.String getAgentConfig(long nodeId) throws java.io.IOException, NXCException
nodeId
- Node ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 changes
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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) throws java.io.IOException, NXCException
description
- Description of exported configurationevents
- List of event codestraps
- List of trap identifierstemplates
- List of template object identifiers
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 flags
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic long createAction(java.lang.String name) throws java.io.IOException, NXCException
name
- action name
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void modifyAction(ServerAction action) throws java.io.IOException, NXCException
action
- Action object
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteAction(long actionId) throws java.io.IOException, NXCException
actionId
- Action ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic ObjectToolDetails getObjectToolDetails(long toolId) throws java.io.IOException, NXCException
toolId
- Tool ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void modifyObjectTool(ObjectToolDetails tool) throws java.io.IOException, NXCException
tool
- Object tool
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteObjectTool(long toolId) throws java.io.IOException, NXCException
toolId
- Object tool ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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
- command
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteSnmpTrapConfiguration(long trapId) throws java.io.IOException, NXCException
trapId
- Trap configuration record ID
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void modifySnmpTrapConfiguration(SnmpTrap trap) throws java.io.IOException, NXCException
trap
- Modified trap configuration record
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic long modifyPredefinedGraph(GraphSettings graph) throws java.io.IOException, NXCException
graph
- predefined graph configuration
java.io.IOException
- if socket or file I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void deletePredefinedGraph(long graphId) throws java.io.IOException, NXCException
graphId
- predefined graph object ID
java.io.IOException
- if socket or file I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic java.util.List<Script> getScriptLibrary() throws java.io.IOException, NXCException
getScriptLibrary
in interface ScriptLibraryManager
java.io.IOException
NXCException
public Script getScript(long scriptId) throws java.io.IOException, NXCException
getScript
in interface ScriptLibraryManager
java.io.IOException
NXCException
public long modifyScript(long scriptId, java.lang.String name, java.lang.String source) throws java.io.IOException, NXCException
modifyScript
in interface ScriptLibraryManager
java.io.IOException
NXCException
public void renameScript(long scriptId, java.lang.String name) throws java.io.IOException, NXCException
renameScript
in interface ScriptLibraryManager
java.io.IOException
NXCException
public void deleteScript(long scriptId) throws java.io.IOException, NXCException
deleteScript
in interface ScriptLibraryManager
java.io.IOException
NXCException
public boolean isConnected()
isConnected
in interface Session
public ConnectionPoint findConnectionPoint(long objectId) throws java.io.IOException, NXCException
objectId
- Node or interface object ID
java.io.IOException
- if socket or file I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic ConnectionPoint findConnectionPoint(MacAddress macAddr) throws java.io.IOException, NXCException
macAddr
- MAC address
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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 find
java.io.IOException
- if socket or file I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void checkConnection() throws java.io.IOException, NXCException
checkConnection
in interface Session
java.io.IOException
NXCException
public java.util.List<LibraryImage> getImageLibrary() throws java.io.IOException, NXCException
getImageLibrary
in interface ImageLibraryManager
java.io.IOException
NXCException
public java.util.List<LibraryImage> getImageLibrary(java.lang.String category) throws java.io.IOException, NXCException
getImageLibrary
in interface ImageLibraryManager
java.io.IOException
NXCException
public LibraryImage getImage(java.util.UUID guid) throws java.io.IOException, NXCException
getImage
in interface ImageLibraryManager
java.io.IOException
NXCException
public LibraryImage createImage(LibraryImage image, ProgressListener listener) throws java.io.IOException, NXCException
createImage
in interface ImageLibraryManager
java.io.IOException
NXCException
public void deleteImage(LibraryImage image) throws java.io.IOException, NXCException
deleteImage
in interface ImageLibraryManager
java.io.IOException
NXCException
public void modifyImage(LibraryImage image, ProgressListener listener) throws java.io.IOException, NXCException
modifyImage
in interface ImageLibraryManager
java.io.IOException
NXCException
public 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
- listener
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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 occurs
NXCException
- 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 object
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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 unchanged
java.io.IOException
- if socket or file I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void deleteSituation(long id) throws java.io.IOException, NXCException
id
- situation id
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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 instance
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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 occurs
NXCException
- 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" status
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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 server
java.io.IOException
- if socket or file I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic java.io.File downloadFileFromAgent(long nodeId, java.lang.String remoteFileName) throws java.io.IOException, NXCException
nodeId
- node object IDremoteFileName
- fully qualified file name on remote system
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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 file
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 process
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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
- listener
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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 ID
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 parameters
java.io.IOException
- if socket or file I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic java.util.List<ReportResult> getReportResults(long reportId) throws java.io.IOException, NXCException
reportId
- report object ID
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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 deleted
java.io.IOException
- if socket or file I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic java.io.File renderReport(long jobId, ReportRenderFormat format) throws java.io.IOException, NXCException
jobId
-
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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 occurs
NXCException
- 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 content
java.io.IOException
- if socket or file I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void resetServerComponent(int component) throws java.io.IOException, NXCException
component
- component id
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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 node
java.io.IOException
- if socket or file I/O error occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 occurs
NXCException
- 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 text
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic void pushDciData(DciPushData[] data) throws java.io.IOException, NXCException
data
- push data
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 push
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 push
java.io.IOException
- if socket I/O error occurs
NXCException
- 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 Session
public java.lang.String getTimeFormat()
getTimeFormat
in interface Session
public void handover(NXCSession target)
target
- target session object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |