|
||||||||||
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 |
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
|
Fields inherited from interface org.netxms.api.client.users.UserManager |
---|
USER_MODIFY_ACCESS_RIGHTS, USER_MODIFY_AUTH_METHOD, USER_MODIFY_CERT_MAPPING, USER_MODIFY_DESCRIPTION, USER_MODIFY_FLAGS, USER_MODIFY_FULL_NAME, USER_MODIFY_LOGIN_NAME, USER_MODIFY_MEMBERS |
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 |
addClusterNode(long clusterId,
long nodeId)
Add node to cluster. |
void |
addListener(SessionListener lst)
|
void |
bindObject(long parentId,
long childId)
Bind object. |
void |
cancelServerJob(long jobId)
Cancel server job |
void |
changeNodeIpAddress(long nodeId,
java.net.InetAddress addr)
Change primary IP address of a node. |
void |
checkConnection()
|
void |
closeAlarm(long alarmId)
Set alarm's helpdesk state to "Closed". |
void |
closeEventProcessingPolicy()
Close event processing policy. |
void |
connect()
|
long |
createAction(java.lang.String name)
Create new server action. |
LibraryImage |
createImage(LibraryImage image)
|
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 |
deleteScript(long scriptId)
|
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 |
disconnect()
|
java.io.File |
downloadMibFile()
Download MIB file from server. |
void |
executeAction(long nodeId,
java.lang.String action)
Execute action on remote agent |
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(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(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)
Find multiple NetXMS objects by identifiers |
java.util.List<GenericObject> |
findMultipleObjects(java.lang.Long[] idList)
Find multiple NetXMS objects by identifiers |
GenericObject |
findObjectById(long id)
Find NetXMS object by it's identifier. |
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.lang.String |
getAgentConfig(long nodeId)
Get agent's master configuration file. |
java.util.HashMap<java.lang.Long,Alarm> |
getAlarms(boolean getTerminated)
Get alarm list. |
GenericObject[] |
getAllObjects()
Get list of all objects |
java.lang.String |
getAttributeForCurrentUser(java.lang.String name)
|
EventTemplate[] |
getCachedEventTemplates()
Get cached list event templates |
DciData |
getCollectedData(long nodeId,
long dciId,
java.util.Date from,
java.util.Date to,
int maxRows)
Get collected DCI data from server. |
java.lang.String |
getConnClientInfo()
|
java.util.List<EventTemplate> |
getEventTemplates()
Get event templates from server |
LibraryImage |
getImage(java.lang.String guid)
|
java.util.List<LibraryImage> |
getImageLibrary()
|
java.util.List<LibraryImage> |
getImageLibrary(java.lang.String category)
|
DciValue[] |
getLastValues(long nodeId)
Get last DCI values for given node |
java.util.Date |
getMibFileTimestamp()
Get timestamp of server's MIB file. |
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()
|
Script |
getScript(long scriptId)
|
java.util.List<Script> |
getScriptLibrary()
|
java.lang.String |
getServerAddress()
|
byte[] |
getServerChallenge()
|
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<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. |
Threshold[] |
getThresholds(long nodeId,
long dciId)
Get list of thresholds configured for given DCI |
GenericObject[] |
getTopLevelObjects()
Get list of top-level objects. |
AbstractUserObject[] |
getUserDatabaseObjects()
|
int |
getUserId()
|
java.lang.String |
getUserName()
|
int |
getUserSystemRights()
|
void |
importConfiguration(java.lang.String config,
int flags)
Import server configuration (events, traps, thresholds) from XML |
boolean |
isConnected()
|
boolean |
isPasswordExpired()
|
void |
lockUserDatabase()
|
void |
modifyAction(ServerAction action)
Modify server action |
void |
modifyEventTemplate(EventTemplate evt)
Modify event template. |
void |
modifyImage(LibraryImage image)
|
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 |
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". |
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. |
NetworkMapPage |
queryLayer2Topology(long nodeId)
Query layer 2 topology for node |
Table |
receiveTable(long requestId,
int msgCode)
Receive table from server. |
void |
removeClusterNode(long clusterId,
long nodeId)
Remove node from cluster. |
void |
removeListener(SessionListener lst)
|
void |
removeTemplate(long templateId,
long nodeId,
boolean removeDci)
Remove data collection template from node. |
void |
renameScript(long scriptId,
java.lang.String name)
|
void |
saveEventProcessingPolicy(EventProcessingPolicy epp)
Save event processing policy. |
void |
sendMessage(NXCPMessage msg)
Send message to server |
protected void |
sendNotification(NXCNotification n)
Call notification handlers on all registered listeners |
void |
setAttributeForCurrentUser(java.lang.String name,
java.lang.String value)
|
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 |
setServerVariable(java.lang.String name,
java.lang.String value)
|
void |
setUserPassword(long id,
java.lang.String newPassword,
java.lang.String oldPassword)
|
void |
subscribe(int channels)
Subscribe to notification channel(s) |
void |
syncEventTemplates()
Synchronize event templates configuration. |
void |
syncObjects()
Synchronizes NetXMS objects between server and client. |
void |
syncUserDatabase()
|
void |
terminateAlarm(long alarmId)
Terminate alarm. |
void |
unbindObject(long parentId,
long childId)
Unbind object. |
void |
uninstallAgentPolicy(long policyId,
long nodeId)
Uninstall policy from agent |
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 |
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. |
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)
|
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 CFG_IMPORT_REPLACE_EVENT_BY_CODE
public static final int CFG_IMPORT_REPLACE_EVENT_BY_NAME
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 lst)
addListener
in interface Session
public void removeListener(SessionListener lst)
removeListener
in interface Session
protected void sendNotification(NXCNotification n)
n
- Notification objectpublic void sendMessage(NXCPMessage msg) throws java.io.IOException
msg
- Message to sent
java.io.IOException
- if case of socket communication failurepublic 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 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 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 GenericObject findObjectById(long id)
id
- Object identifier
public java.util.List<GenericObject> findMultipleObjects(long[] idList)
idList
- array of object identifiers
public java.util.List<GenericObject> findMultipleObjects(java.lang.Long[] idList)
idList
- array of object identifiers
public GenericObject[] getTopLevelObjects()
public GenericObject[] getAllObjects()
public java.util.HashMap<java.lang.Long,Alarm> getAlarms(boolean getTerminated) throws java.io.IOException, NXCException
getTerminated
- if set to true, all alarms will be retrieved from database,
otherwise only active alarms
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 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.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 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 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 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 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 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 changeNodeIpAddress(long nodeId, java.net.InetAddress addr) throws java.io.IOException, NXCException
nodeId
- ID of node objectaddr
- New IP address
java.io.IOException
- if socket I/O error occurs
NXCException
- if NetXMS server returns an error or operation was timed outpublic 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 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 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 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> 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 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 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> 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 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 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.lang.String guid) throws java.io.IOException, NXCException
getImage
in interface ImageLibraryManager
java.io.IOException
NXCException
public LibraryImage createImage(LibraryImage image) 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) 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 out
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |