org.netxms.client.datacollection
Class DataCollectionConfiguration

java.lang.Object
  extended by org.netxms.client.datacollection.DataCollectionConfiguration

public class DataCollectionConfiguration
extends java.lang.Object

Data collection configuration for node


Constructor Summary
DataCollectionConfiguration(NXCSession session, long nodeId)
          Create empty data collection configuration.
 
Method Summary
 void clearCollectedData(long itemId)
          Clear collected data for given DCI.
 void close()
          Close data collection configuration.
 void copyObjects(long destNodeId, long[] items)
          Copy data collection objects.
 long createItem()
          Create new data collection item.
 long createTable()
          Create new data collection table.
 void deleteObject(long itemId)
          Delete data collection object.
protected  void finalize()
           
 DataCollectionObject findItem(long id)
          Find data collection object by ID.
 DataCollectionObject findItem(long id, java.lang.Class<? extends DataCollectionObject> classFilter)
          Find data collection object by ID.
 DataCollectionObject[] getItems()
          Get list of data collection items
 long getNodeId()
           
protected  NXCSession getSession()
           
 java.lang.Object getUserData()
           
 void modifyObject(DataCollectionObject dco)
          Modify data collection object.
 void modifyObject(long dcObjectId)
          Modify data collection object.
 void moveObjects(long destNodeId, long[] items)
          Move data collection objects.
 void open()
          Open data collection configuration.
 void setObjectStatus(long[] items, int status)
          Set status of data collection objects.
 void setUserData(java.lang.Object userData)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataCollectionConfiguration

public DataCollectionConfiguration(NXCSession session,
                                   long nodeId)
Create empty data collection configuration.

Parameters:
nodeId -
Method Detail

open

public void open()
          throws java.io.IOException,
                 NXCException
Open data collection configuration.

Throws:
java.io.IOException - if socket I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out

close

public void close()
           throws java.io.IOException,
                  NXCException
Close data collection configuration.

Throws:
java.io.IOException - if socket I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out

getItems

public DataCollectionObject[] getItems()
Get list of data collection items

Returns:
List of data collection items

findItem

public DataCollectionObject findItem(long id)
Find data collection object by ID.

Parameters:
id - DCI ID
Returns:
Data collection item or null if item with given ID does not exist

findItem

public DataCollectionObject findItem(long id,
                                     java.lang.Class<? extends DataCollectionObject> classFilter)
Find data collection object by ID.

Parameters:
id - data collection object ID
classFilter - class filter for found object
Returns:
Data collection item or null if item with given ID does not exist

createItem

public long createItem()
                throws java.io.IOException,
                       NXCException
Create new data collection item.

Returns:
Identifier assigned to created item
Throws:
java.io.IOException - if socket I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out

createTable

public long createTable()
                 throws java.io.IOException,
                        NXCException
Create new data collection table.

Returns:
Identifier assigned to created item
Throws:
java.io.IOException - if socket I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out

modifyObject

public void modifyObject(long dcObjectId)
                  throws java.io.IOException,
                         NXCException
Modify data collection object.

Parameters:
dcObjectId - Data collection object identifier
Throws:
java.io.IOException - if socket I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out

modifyObject

public void modifyObject(DataCollectionObject dco)
                  throws java.io.IOException,
                         NXCException
Modify data collection object.

Parameters:
dco - Data collection object
Throws:
java.io.IOException - if socket I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out

copyObjects

public void copyObjects(long destNodeId,
                        long[] items)
                 throws java.io.IOException,
                        NXCException
Copy data collection objects.

Parameters:
destNodeId - Destination node ID
items - List of data collection items to copy
Throws:
java.io.IOException - if socket I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out

moveObjects

public void moveObjects(long destNodeId,
                        long[] items)
                 throws java.io.IOException,
                        NXCException
Move data collection objects.

Parameters:
destNodeId - Destination node ID
items - List of data collection items to move
Throws:
java.io.IOException - if socket I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out

clearCollectedData

public void clearCollectedData(long itemId)
                        throws java.io.IOException,
                               NXCException
Clear collected data for given DCI.

Parameters:
itemId - Data collection item ID
Throws:
java.io.IOException - if socket I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out

setObjectStatus

public void setObjectStatus(long[] items,
                            int status)
                     throws java.io.IOException,
                            NXCException
Set status of data collection objects.

Parameters:
items - Data collection items' identifiers
status - New status
Throws:
java.io.IOException - if socket I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out

deleteObject

public void deleteObject(long itemId)
                  throws java.io.IOException,
                         NXCException
Delete data collection object.

Parameters:
itemId - Data collection item identifier
Throws:
java.io.IOException - if socket I/O error occurs
NXCException - if NetXMS server returns an error or operation was timed out

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

getNodeId

public long getNodeId()
Returns:
the nodeId

getUserData

public java.lang.Object getUserData()
Returns:
the userData

setUserData

public void setUserData(java.lang.Object userData)
Parameters:
userData - the userData to set

getSession

protected final NXCSession getSession()
Returns:
the session


Copyright © 2013. All Rights Reserved.